Revision: 23051
Author:   [email protected]
Date:     Mon Aug 11 15:55:28 2014 UTC
Log: Move MachineRepresentation to machine-type.h and rename to MachineType in preparation for merging it with RepType.

[email protected]
BUG=

Review URL: https://codereview.chromium.org/456333002
http://code.google.com/p/v8/source/detail?r=23051

Added:
 /branches/bleeding_edge/src/compiler/machine-type.h
Modified:
 /branches/bleeding_edge/src/compiler/arm/instruction-selector-arm.cc
 /branches/bleeding_edge/src/compiler/arm/linkage-arm.cc
 /branches/bleeding_edge/src/compiler/arm64/instruction-selector-arm64.cc
 /branches/bleeding_edge/src/compiler/arm64/linkage-arm64.cc
 /branches/bleeding_edge/src/compiler/ia32/instruction-selector-ia32.cc
 /branches/bleeding_edge/src/compiler/ia32/linkage-ia32.cc
 /branches/bleeding_edge/src/compiler/instruction-selector.cc
 /branches/bleeding_edge/src/compiler/instruction-selector.h
 /branches/bleeding_edge/src/compiler/linkage-impl.h
 /branches/bleeding_edge/src/compiler/linkage.cc
 /branches/bleeding_edge/src/compiler/linkage.h
 /branches/bleeding_edge/src/compiler/machine-node-factory.h
 /branches/bleeding_edge/src/compiler/machine-operator.h
 /branches/bleeding_edge/src/compiler/raw-machine-assembler.cc
 /branches/bleeding_edge/src/compiler/raw-machine-assembler.h
 /branches/bleeding_edge/src/compiler/representation-change.h
 /branches/bleeding_edge/src/compiler/simplified-lowering.cc
 /branches/bleeding_edge/src/compiler/simplified-operator.h
 /branches/bleeding_edge/src/compiler/structured-machine-assembler.cc
 /branches/bleeding_edge/src/compiler/structured-machine-assembler.h
 /branches/bleeding_edge/src/compiler/x64/instruction-selector-x64.cc
 /branches/bleeding_edge/src/compiler/x64/linkage-x64.cc
 /branches/bleeding_edge/test/cctest/compiler/call-tester.h
 /branches/bleeding_edge/test/cctest/compiler/codegen-tester.h
 /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.cc
 /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.h
 /branches/bleeding_edge/test/cctest/compiler/instruction-selector-tester.h
 /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc
 /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc
 /branches/bleeding_edge/test/cctest/compiler/test-run-machops.cc
 /branches/bleeding_edge/test/cctest/compiler/test-simplified-lowering.cc
/branches/bleeding_edge/test/compiler-unittests/instruction-selector-unittest.h
 /branches/bleeding_edge/tools/gyp/v8.gyp

=======================================
--- /dev/null
+++ /branches/bleeding_edge/src/compiler/machine-type.h Mon Aug 11 15:55:28 2014 UTC
@@ -0,0 +1,36 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_MACHINE_TYPE_H_
+#define V8_COMPILER_MACHINE_TYPE_H_
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// An enumeration of the storage representations at the machine level.
+// - Words are uninterpreted bits of a given fixed size that can be used
+//   to store integers and pointers. They are normally allocated to general
+//   purpose registers by the backend and are not tracked for GC.
+// - Floats are bits of a given fixed size that are used to store floating
+//   point numbers. They are normally allocated to the floating point
+//   registers of the machine and are not tracked for the GC.
+// - Tagged values are the size of a reference into the heap and can store
+// small words or references into the heap using a language and potentially
+//   machine-dependent tagging scheme. These values are tracked by the code
+//   generator for precise GC.
+enum MachineType {
+  kMachineWord8,
+  kMachineWord16,
+  kMachineWord32,
+  kMachineWord64,
+  kMachineFloat64,
+  kMachineTagged,
+  kMachineLast
+};
+}
+}
+}  // namespace v8::internal::compiler
+
+#endif  // V8_COMPILER_MACHINE_TYPE_H_
=======================================
--- /branches/bleeding_edge/src/compiler/arm/instruction-selector-arm.cc Tue Aug 5 13:26:55 2014 UTC +++ /branches/bleeding_edge/src/compiler/arm/instruction-selector-arm.cc Mon Aug 11 15:55:28 2014 UTC
@@ -305,7 +305,7 @@


 void InstructionSelector::VisitLoad(Node* node) {
-  MachineRepresentation rep = OpParameter<MachineRepresentation>(node);
+  MachineType rep = OpParameter<MachineType>(node);
   ArmOperandGenerator g(this);
   Node* base = node->InputAt(0);
   Node* index = node->InputAt(1);
@@ -354,7 +354,7 @@
   Node* value = node->InputAt(2);

   StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node);
-  MachineRepresentation rep = store_rep.rep;
+  MachineType rep = store_rep.rep;
   if (store_rep.write_barrier_kind == kFullWriteBarrier) {
     DCHECK(rep == kMachineTagged);
     // TODO(dcarney): refactor RecordWrite function to take temp registers
=======================================
--- /branches/bleeding_edge/src/compiler/arm/linkage-arm.cc Mon Aug 11 12:26:17 2014 UTC +++ /branches/bleeding_edge/src/compiler/arm/linkage-arm.cc Mon Aug 11 15:55:28 2014 UTC
@@ -57,8 +57,8 @@


 CallDescriptor* Linkage::GetSimplifiedCDescriptor(
-    Zone* zone, int num_params, MachineRepresentation return_type,
-    const MachineRepresentation* param_types) {
+    Zone* zone, int num_params, MachineType return_type,
+    const MachineType* param_types) {
   return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>(
       zone, num_params, return_type, param_types);
 }
=======================================
--- /branches/bleeding_edge/src/compiler/arm64/instruction-selector-arm64.cc Mon Aug 11 15:40:11 2014 UTC +++ /branches/bleeding_edge/src/compiler/arm64/instruction-selector-arm64.cc Mon Aug 11 15:55:28 2014 UTC
@@ -150,7 +150,7 @@


 void InstructionSelector::VisitLoad(Node* node) {
-  MachineRepresentation rep = OpParameter<MachineRepresentation>(node);
+  MachineType rep = OpParameter<MachineType>(node);
   Arm64OperandGenerator g(this);
   Node* base = node->InputAt(0);
   Node* index = node->InputAt(1);
@@ -201,7 +201,7 @@
   Node* value = node->InputAt(2);

   StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node);
-  MachineRepresentation rep = store_rep.rep;
+  MachineType rep = store_rep.rep;
   if (store_rep.write_barrier_kind == kFullWriteBarrier) {
     DCHECK(rep == kMachineTagged);
     // TODO(dcarney): refactor RecordWrite function to take temp registers
=======================================
--- /branches/bleeding_edge/src/compiler/arm64/linkage-arm64.cc Mon Aug 11 12:26:17 2014 UTC +++ /branches/bleeding_edge/src/compiler/arm64/linkage-arm64.cc Mon Aug 11 15:55:28 2014 UTC
@@ -57,8 +57,8 @@


 CallDescriptor* Linkage::GetSimplifiedCDescriptor(
-    Zone* zone, int num_params, MachineRepresentation return_type,
-    const MachineRepresentation* param_types) {
+    Zone* zone, int num_params, MachineType return_type,
+    const MachineType* param_types) {
   return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>(
       zone, num_params, return_type, param_types);
 }
=======================================
--- /branches/bleeding_edge/src/compiler/ia32/instruction-selector-ia32.cc Mon Aug 4 11:34:54 2014 UTC +++ /branches/bleeding_edge/src/compiler/ia32/instruction-selector-ia32.cc Mon Aug 11 15:55:28 2014 UTC
@@ -41,7 +41,7 @@


 void InstructionSelector::VisitLoad(Node* node) {
-  MachineRepresentation rep = OpParameter<MachineRepresentation>(node);
+  MachineType rep = OpParameter<MachineType>(node);
   IA32OperandGenerator g(this);
   Node* base = node->InputAt(0);
   Node* index = node->InputAt(1);
@@ -94,7 +94,7 @@
   Node* value = node->InputAt(2);

   StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node);
-  MachineRepresentation rep = store_rep.rep;
+  MachineType rep = store_rep.rep;
   if (store_rep.write_barrier_kind == kFullWriteBarrier) {
     DCHECK_EQ(kMachineTagged, rep);
     // TODO(dcarney): refactor RecordWrite function to take temp registers
=======================================
--- /branches/bleeding_edge/src/compiler/ia32/linkage-ia32.cc Mon Aug 11 12:26:17 2014 UTC +++ /branches/bleeding_edge/src/compiler/ia32/linkage-ia32.cc Mon Aug 11 15:55:28 2014 UTC
@@ -53,8 +53,8 @@


 CallDescriptor* Linkage::GetSimplifiedCDescriptor(
-    Zone* zone, int num_params, MachineRepresentation return_type,
-    const MachineRepresentation* param_types) {
+    Zone* zone, int num_params, MachineType return_type,
+    const MachineType* param_types) {
   return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>(
       zone, num_params, return_type, param_types);
 }
=======================================
--- /branches/bleeding_edge/src/compiler/instruction-selector.cc Thu Aug 7 09:14:47 2014 UTC +++ /branches/bleeding_edge/src/compiler/instruction-selector.cc Mon Aug 11 15:55:28 2014 UTC
@@ -230,8 +230,7 @@
 }


-void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep,
-                                               Node* node) {
+void InstructionSelector::MarkAsRepresentation(MachineType rep, Node* node) {
   DCHECK_NOT_NULL(node);
   if (rep == kMachineFloat64) MarkAsDouble(node);
   if (rep == kMachineTagged) MarkAsReference(node);
@@ -467,10 +466,10 @@
       return;
     case IrOpcode::kParameter: {
       int index = OpParameter<int>(node);
-      MachineRepresentation rep = linkage()
-                                      ->GetIncomingDescriptor()
-                                      ->GetInputLocation(index)
-                                      .representation();
+      MachineType rep = linkage()
+                            ->GetIncomingDescriptor()
+                            ->GetInputLocation(index)
+                            .representation();
       MarkAsRepresentation(rep, node);
       return VisitParameter(node);
     }
@@ -494,7 +493,7 @@
     case IrOpcode::kStateValues:
       return;
     case IrOpcode::kLoad: {
- MachineRepresentation load_rep = OpParameter<MachineRepresentation>(node);
+      MachineType load_rep = OpParameter<MachineType>(node);
       MarkAsRepresentation(load_rep, node);
       return VisitLoad(node);
     }
=======================================
--- /branches/bleeding_edge/src/compiler/instruction-selector.h Wed Aug 6 11:49:02 2014 UTC +++ /branches/bleeding_edge/src/compiler/instruction-selector.h Mon Aug 11 15:55:28 2014 UTC
@@ -130,7 +130,7 @@

// Inform the register allocation of the representation of the value produced
   // by {node}.
-  void MarkAsRepresentation(MachineRepresentation rep, Node* node);
+  void MarkAsRepresentation(MachineType rep, Node* node);

   // Initialize the call buffer with the InstructionOperands, nodes, etc,
   // corresponding
=======================================
--- /branches/bleeding_edge/src/compiler/linkage-impl.h Mon Aug 11 12:26:17 2014 UTC +++ /branches/bleeding_edge/src/compiler/linkage-impl.h Mon Aug 11 15:55:28 2014 UTC
@@ -25,7 +25,7 @@
                            Register::ToAllocationIndex(reg));
   }

-  static LinkageLocation UnconstrainedRegister(MachineRepresentation rep) {
+  static LinkageLocation UnconstrainedRegister(MachineType rep) {
     return LinkageLocation(rep, LinkageLocation::ANY_REGISTER);
   }

@@ -173,8 +173,8 @@

   template <typename LinkageTraits>
   static CallDescriptor* GetSimplifiedCDescriptor(
-      Zone* zone, int num_params, MachineRepresentation return_type,
-      const MachineRepresentation* param_types) {
+      Zone* zone, int num_params, MachineType return_type,
+      const MachineType* param_types) {
     LinkageLocation* locations =
         zone->NewArray<LinkageLocation>(num_params + 2);
     int index = 0;
=======================================
--- /branches/bleeding_edge/src/compiler/linkage.cc Mon Aug 11 12:26:17 2014 UTC +++ /branches/bleeding_edge/src/compiler/linkage.cc Mon Aug 11 15:55:28 2014 UTC
@@ -138,8 +138,8 @@


 CallDescriptor* Linkage::GetSimplifiedCDescriptor(
-    Zone* zone, int num_params, MachineRepresentation return_type,
-    const MachineRepresentation* param_types) {
+    Zone* zone, int num_params, MachineType return_type,
+    const MachineType* param_types) {
   UNIMPLEMENTED();
   return NULL;
 }
=======================================
--- /branches/bleeding_edge/src/compiler/linkage.h Mon Aug 11 12:26:17 2014 UTC +++ /branches/bleeding_edge/src/compiler/linkage.h Mon Aug 11 15:55:28 2014 UTC
@@ -22,17 +22,17 @@
 // TODO(titzer): replace with Radium locations when they are ready.
 class LinkageLocation {
  public:
-  LinkageLocation(MachineRepresentation rep, int location)
+  LinkageLocation(MachineType rep, int location)
       : rep_(rep), location_(location) {}

-  inline MachineRepresentation representation() const { return rep_; }
+  inline MachineType representation() const { return rep_; }

   static const int16_t ANY_REGISTER = 32767;

  private:
   friend class CallDescriptor;
   friend class OperandGenerator;
-  MachineRepresentation rep_;
+  MachineType rep_;
   int16_t location_;  // >= 0 implies register, otherwise stack slot.
 };

@@ -160,8 +160,8 @@
   // integers and pointers of one word size each, i.e. no floating point,
   // structs, pointers to members, etc.
   static CallDescriptor* GetSimplifiedCDescriptor(
-      Zone* zone, int num_params, MachineRepresentation return_type,
-      const MachineRepresentation* param_types);
+      Zone* zone, int num_params, MachineType return_type,
+      const MachineType* param_types);

   // Get the location of an (incoming) parameter to this function.
   LinkageLocation GetParameterLocation(int index) {
=======================================
--- /branches/bleeding_edge/src/compiler/machine-node-factory.h Thu Aug 7 11:01:02 2014 UTC +++ /branches/bleeding_edge/src/compiler/machine-node-factory.h Mon Aug 11 15:55:28 2014 UTC
@@ -22,17 +22,14 @@

 class MachineCallDescriptorBuilder : public ZoneObject {
  public:
-  MachineCallDescriptorBuilder(MachineRepresentation return_type,
-                               int parameter_count,
- const MachineRepresentation* parameter_types) + MachineCallDescriptorBuilder(MachineType return_type, int parameter_count,
+                               const MachineType* parameter_types)
       : return_type_(return_type),
         parameter_count_(parameter_count),
         parameter_types_(parameter_types) {}

   int parameter_count() const { return parameter_count_; }
-  const MachineRepresentation* parameter_types() const {
-    return parameter_types_;
-  }
+  const MachineType* parameter_types() const { return parameter_types_; }

   CallDescriptor* BuildCallDescriptor(Zone* zone) {
     return Linkage::GetSimplifiedCDescriptor(zone, parameter_count_,
@@ -40,9 +37,9 @@
   }

  private:
-  const MachineRepresentation return_type_;
+  const MachineType return_type_;
   const int parameter_count_;
-  const MachineRepresentation* const parameter_types_;
+  const MachineType* const parameter_types_;
 };


@@ -90,16 +87,16 @@
   }

   // Memory Operations.
-  Node* Load(MachineRepresentation rep, Node* base) {
+  Node* Load(MachineType rep, Node* base) {
     return Load(rep, base, Int32Constant(0));
   }
-  Node* Load(MachineRepresentation rep, Node* base, Node* index) {
+  Node* Load(MachineType rep, Node* base, Node* index) {
     return NEW_NODE_2(MACHINE()->Load(rep), base, index);
   }
-  void Store(MachineRepresentation rep, Node* base, Node* value) {
+  void Store(MachineType rep, Node* base, Node* value) {
     Store(rep, base, Int32Constant(0), value);
   }
- void Store(MachineRepresentation rep, Node* base, Node* index, Node* value) {
+  void Store(MachineType rep, Node* base, Node* index, Node* value) {
     NEW_NODE_3(MACHINE()->Store(rep, kNoWriteBarrier), base, index, value);
   }
   // Arithmetic Operations.
@@ -354,8 +351,8 @@

 #ifdef MACHINE_ASSEMBLER_SUPPORTS_CALL_C
   // Call to C.
-  Node* CallC(Node* function_address, MachineRepresentation return_type,
-              MachineRepresentation* arg_types, Node** args, int n_args) {
+  Node* CallC(Node* function_address, MachineType return_type,
+              MachineType* arg_types, Node** args, int n_args) {
     CallDescriptor* descriptor = Linkage::GetSimplifiedCDescriptor(
         ZONE(), n_args, return_type, arg_types);
     Node** passed_args =
=======================================
--- /branches/bleeding_edge/src/compiler/machine-operator.h Thu Aug 7 11:01:02 2014 UTC +++ /branches/bleeding_edge/src/compiler/machine-operator.h Mon Aug 11 15:55:28 2014 UTC
@@ -5,6 +5,7 @@
 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_
 #define V8_COMPILER_MACHINE_OPERATOR_H_

+#include "src/compiler/machine-type.h"
 #include "src/compiler/opcodes.h"
 #include "src/compiler/operator.h"
 #include "src/zone.h"
@@ -13,36 +14,14 @@
 namespace internal {
 namespace compiler {

-// An enumeration of the storage representations at the machine level.
-// - Words are uninterpreted bits of a given fixed size that can be used
-//   to store integers and pointers. They are normally allocated to general
-//   purpose registers by the backend and are not tracked for GC.
-// - Floats are bits of a given fixed size that are used to store floating
-//   point numbers. They are normally allocated to the floating point
-//   registers of the machine and are not tracked for the GC.
-// - Tagged values are the size of a reference into the heap and can store
-// small words or references into the heap using a language and potentially
-//   machine-dependent tagging scheme. These values are tracked by the code
-//   generator for precise GC.
-enum MachineRepresentation {
-  kMachineWord8,
-  kMachineWord16,
-  kMachineWord32,
-  kMachineWord64,
-  kMachineFloat64,
-  kMachineTagged,
-  kMachineLast
-};
-
-
 // TODO(turbofan): other write barriers are possible based on type
 enum WriteBarrierKind { kNoWriteBarrier, kFullWriteBarrier };


-// A Store needs a MachineRepresentation and a WriteBarrierKind
+// A Store needs a MachineType and a WriteBarrierKind
 // in order to emit the correct write barrier.
 struct StoreRepresentation {
-  MachineRepresentation rep;
+  MachineType rep;
   WriteBarrierKind write_barrier_kind;
 };

@@ -52,8 +31,7 @@
 // for generating code to run on architectures such as ia32, x64, arm, etc.
 class MachineOperatorBuilder {
  public:
-  explicit MachineOperatorBuilder(Zone* zone,
- MachineRepresentation word = pointer_rep()) + explicit MachineOperatorBuilder(Zone* zone, MachineType word = pointer_rep())
       : zone_(zone), word_(word) {
     CHECK(word == kMachineWord32 || word == kMachineWord64);
   }
@@ -83,11 +61,11 @@

 #define WORD_SIZE(x) return is64() ? Word64##x() : Word32##x()

-  Operator* Load(MachineRepresentation rep) {  // load [base + index]
-    OP1(Load, MachineRepresentation, rep, Operator::kNoWrite, 2, 1);
+  Operator* Load(MachineType rep) {  // load [base + index]
+    OP1(Load, MachineType, rep, Operator::kNoWrite, 2, 1);
   }
   // store [base + index], value
-  Operator* Store(MachineRepresentation rep, WriteBarrierKind kind) {
+  Operator* Store(MachineType rep, WriteBarrierKind kind) {
     StoreRepresentation store_rep = {rep, kind};
     OP1(Store, StoreRepresentation, store_rep, Operator::kNoRead, 3, 0);
   }
@@ -167,9 +145,9 @@

   inline bool is32() const { return word_ == kMachineWord32; }
   inline bool is64() const { return word_ == kMachineWord64; }
-  inline MachineRepresentation word() const { return word_; }
+  inline MachineType word() const { return word_; }

-  static inline MachineRepresentation pointer_rep() {
+  static inline MachineType pointer_rep() {
     return kPointerSize == 8 ? kMachineWord64 : kMachineWord32;
   }

@@ -181,7 +159,7 @@

  private:
   Zone* zone_;
-  MachineRepresentation word_;
+  MachineType word_;
 };
 }
 }
=======================================
--- /branches/bleeding_edge/src/compiler/raw-machine-assembler.cc Mon Aug 11 13:07:32 2014 UTC +++ /branches/bleeding_edge/src/compiler/raw-machine-assembler.cc Mon Aug 11 15:55:28 2014 UTC
@@ -12,7 +12,7 @@

 RawMachineAssembler::RawMachineAssembler(
     Graph* graph, MachineCallDescriptorBuilder* call_descriptor_builder,
-    MachineRepresentation word)
+    MachineType word)
     : GraphBuilder(graph),
       schedule_(new (zone()) Schedule(zone())),
       machine_(zone(), word),
=======================================
--- /branches/bleeding_edge/src/compiler/raw-machine-assembler.h Mon Aug 4 11:34:54 2014 UTC +++ /branches/bleeding_edge/src/compiler/raw-machine-assembler.h Mon Aug 11 15:55:28 2014 UTC
@@ -45,9 +45,9 @@
     DISALLOW_COPY_AND_ASSIGN(Label);
   };

-  RawMachineAssembler(
-      Graph* graph, MachineCallDescriptorBuilder* call_descriptor_builder,
-      MachineRepresentation word = MachineOperatorBuilder::pointer_rep());
+  RawMachineAssembler(Graph* graph,
+ MachineCallDescriptorBuilder* call_descriptor_builder, + MachineType word = MachineOperatorBuilder::pointer_rep());
   virtual ~RawMachineAssembler() {}

   Isolate* isolate() const { return zone()->isolate(); }
@@ -60,7 +60,7 @@
   int parameter_count() const {
     return call_descriptor_builder_->parameter_count();
   }
-  const MachineRepresentation* parameter_types() const {
+  const MachineType* parameter_types() const {
     return call_descriptor_builder_->parameter_types();
   }

@@ -108,8 +108,7 @@
   BasicBlock* EnsureBlock(Label* label);
   BasicBlock* CurrentBlock();

-  typedef std::vector<MachineRepresentation,
-                      zone_allocator<MachineRepresentation> >
+  typedef std::vector<MachineType, zone_allocator<MachineType> >
       RepresentationVector;

   Schedule* schedule_;
=======================================
--- /branches/bleeding_edge/src/compiler/representation-change.h Mon Aug 11 09:40:02 2014 UTC +++ /branches/bleeding_edge/src/compiler/representation-change.h Mon Aug 11 15:55:28 2014 UTC
@@ -16,7 +16,7 @@

 // The types and representations tracked during representation inference
 // and change insertion.
-// TODO(titzer): First, merge MachineRepresentation and RepType.
+// TODO(titzer): First, merge MachineType and RepType.
 // TODO(titzer): Second, Use the real type system instead of RepType.
 enum RepType {
   // Representations.
@@ -265,8 +265,8 @@
     return TypeError(node, output_type, rWord64);
   }

-  static RepType TypeForMachineRepresentation(MachineRepresentation rep) {
-    // TODO(titzer): merge MachineRepresentation and RepType.
+  static RepType TypeForMachineType(MachineType rep) {
+    // TODO(titzer): merge MachineType and RepType.
     switch (rep) {
       case kMachineWord8:
         return rWord32;
@@ -348,13 +348,13 @@

   RepType TypeForField(const FieldAccess& access) {
     RepType tElement = static_cast<RepType>(0);  // TODO(titzer)
-    RepType rElement = TypeForMachineRepresentation(access.representation);
+    RepType rElement = TypeForMachineType(access.representation);
     return static_cast<RepType>(tElement | rElement);
   }

   RepType TypeForElement(const ElementAccess& access) {
     RepType tElement = static_cast<RepType>(0);  // TODO(titzer)
-    RepType rElement = TypeForMachineRepresentation(access.representation);
+    RepType rElement = TypeForMachineType(access.representation);
     return static_cast<RepType>(tElement | rElement);
   }

=======================================
--- /branches/bleeding_edge/src/compiler/simplified-lowering.cc Mon Aug 11 09:40:02 2014 UTC +++ /branches/bleeding_edge/src/compiler/simplified-lowering.cc Mon Aug 11 15:55:28 2014 UTC
@@ -551,10 +551,10 @@
       case IrOpcode::kLoad: {
         // TODO(titzer): machine loads/stores need to know BaseTaggedness!?
         RepType tBase = rTagged;
- MachineRepresentation rep = OpParameter<MachineRepresentation>(node);
+        MachineType rep = OpParameter<MachineType>(node);
         ProcessInput(node, 0, tBase);   // pointer or object
         ProcessInput(node, 1, kInt32);  // index
-        SetOutput(node, changer_->TypeForMachineRepresentation(rep));
+        SetOutput(node, changer_->TypeForMachineType(rep));
         break;
       }
       case IrOpcode::kStore: {
@@ -563,7 +563,7 @@
         StoreRepresentation rep = OpParameter<StoreRepresentation>(node);
         ProcessInput(node, 0, tBase);   // pointer or object
         ProcessInput(node, 1, kInt32);  // index
- ProcessInput(node, 2, changer_->TypeForMachineRepresentation(rep.rep));
+        ProcessInput(node, 2, changer_->TypeForMachineType(rep.rep));
         SetOutput(node, 0);
         break;
       }
@@ -893,9 +893,9 @@
 }


-static WriteBarrierKind ComputeWriteBarrierKind(
-    BaseTaggedness base_is_tagged, MachineRepresentation representation,
-    Type* type) {
+static WriteBarrierKind ComputeWriteBarrierKind(BaseTaggedness base_is_tagged,
+                                                MachineType representation,
+                                                Type* type) {
   // TODO(turbofan): skip write barriers for Smis, etc.
   if (base_is_tagged == kTaggedBase && representation == kMachineTagged) {
// Write barriers are only for writes into heap objects (i.e. tagged base).
=======================================
--- /branches/bleeding_edge/src/compiler/simplified-operator.h Mon Aug 4 12:39:15 2014 UTC +++ /branches/bleeding_edge/src/compiler/simplified-operator.h Mon Aug 11 15:55:28 2014 UTC
@@ -23,7 +23,7 @@
   int offset;                     // offset of the field, without tag.
   Handle<Name> name;              // debugging only.
   Type* type;                     // type of the field.
- MachineRepresentation representation; // machine representation of field.
+  MachineType representation;     // machine representation of field.

int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; }
 };
@@ -37,7 +37,7 @@
BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged.
   int header_size;                // size of the header, without tag.
   Type* type;                     // type of the element.
- MachineRepresentation representation; // machine representation of element.
+  MachineType representation;     // machine representation of element.

int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; }
 };
=======================================
--- /branches/bleeding_edge/src/compiler/structured-machine-assembler.cc Mon Aug 11 13:07:32 2014 UTC +++ /branches/bleeding_edge/src/compiler/structured-machine-assembler.cc Mon Aug 11 15:55:28 2014 UTC
@@ -18,7 +18,7 @@

 StructuredMachineAssembler::StructuredMachineAssembler(
     Graph* graph, MachineCallDescriptorBuilder* call_descriptor_builder,
-    MachineRepresentation word)
+    MachineType word)
     : GraphBuilder(graph),
       schedule_(new (zone()) Schedule(zone())),
       machine_(zone(), word),
=======================================
--- /branches/bleeding_edge/src/compiler/structured-machine-assembler.h Mon Aug 4 11:34:54 2014 UTC +++ /branches/bleeding_edge/src/compiler/structured-machine-assembler.h Mon Aug 11 15:55:28 2014 UTC
@@ -63,7 +63,7 @@

   StructuredMachineAssembler(
       Graph* graph, MachineCallDescriptorBuilder* call_descriptor_builder,
-      MachineRepresentation word = MachineOperatorBuilder::pointer_rep());
+      MachineType word = MachineOperatorBuilder::pointer_rep());
   virtual ~StructuredMachineAssembler() {}

   Isolate* isolate() const { return zone()->isolate(); }
@@ -76,7 +76,7 @@
   int parameter_count() const {
     return call_descriptor_builder_->parameter_count();
   }
-  const MachineRepresentation* parameter_types() const {
+  const MachineType* parameter_types() const {
     return call_descriptor_builder_->parameter_types();
   }

@@ -124,8 +124,7 @@
   void MergeBackEdgesToLoopHeader(Environment* header,
                                   EnvironmentVector* environments);

-  typedef std::vector<MachineRepresentation,
-                      zone_allocator<MachineRepresentation> >
+  typedef std::vector<MachineType, zone_allocator<MachineType> >
       RepresentationVector;

   Schedule* schedule_;
=======================================
--- /branches/bleeding_edge/src/compiler/x64/instruction-selector-x64.cc Tue Aug 5 12:38:19 2014 UTC +++ /branches/bleeding_edge/src/compiler/x64/instruction-selector-x64.cc Mon Aug 11 15:55:28 2014 UTC
@@ -56,7 +56,7 @@


 void InstructionSelector::VisitLoad(Node* node) {
-  MachineRepresentation rep = OpParameter<MachineRepresentation>(node);
+  MachineType rep = OpParameter<MachineType>(node);
   X64OperandGenerator g(this);
   Node* base = node->InputAt(0);
   Node* index = node->InputAt(1);
@@ -108,7 +108,7 @@
   Node* value = node->InputAt(2);

   StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node);
-  MachineRepresentation rep = store_rep.rep;
+  MachineType rep = store_rep.rep;
   if (store_rep.write_barrier_kind == kFullWriteBarrier) {
     DCHECK(rep == kMachineTagged);
     // TODO(dcarney): refactor RecordWrite function to take temp registers
=======================================
--- /branches/bleeding_edge/src/compiler/x64/linkage-x64.cc Mon Aug 11 12:26:17 2014 UTC +++ /branches/bleeding_edge/src/compiler/x64/linkage-x64.cc Mon Aug 11 15:55:28 2014 UTC
@@ -72,8 +72,8 @@


 CallDescriptor* Linkage::GetSimplifiedCDescriptor(
-    Zone* zone, int num_params, MachineRepresentation return_type,
-    const MachineRepresentation* param_types) {
+    Zone* zone, int num_params, MachineType return_type,
+    const MachineType* param_types) {
   return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>(
       zone, num_params, return_type, param_types);
 }
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/call-tester.h Mon Aug 11 09:40:02 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/call-tester.h Mon Aug 11 15:55:28 2014 UTC
@@ -26,7 +26,7 @@
 template <typename R>
 struct ReturnValueTraits {
   static R Cast(uintptr_t r) { return reinterpret_cast<R>(r); }
-  static MachineRepresentation Representation() {
+  static MachineType Representation() {
// TODO(dcarney): detect when R is of a subclass of Object* instead of this
     // type check.
     while (false) {
@@ -39,7 +39,7 @@
 template <>
 struct ReturnValueTraits<int32_t*> {
static int32_t* Cast(uintptr_t r) { return reinterpret_cast<int32_t*>(r); }
-  static MachineRepresentation Representation() {
+  static MachineType Representation() {
     return MachineOperatorBuilder::pointer_rep();
   }
 };
@@ -47,7 +47,7 @@
 template <>
 struct ReturnValueTraits<void> {
   static void Cast(uintptr_t r) {}
-  static MachineRepresentation Representation() {
+  static MachineType Representation() {
     return MachineOperatorBuilder::pointer_rep();
   }
 };
@@ -55,7 +55,7 @@
 template <>
 struct ReturnValueTraits<bool> {
   static bool Cast(uintptr_t r) { return static_cast<bool>(r); }
-  static MachineRepresentation Representation() {
+  static MachineType Representation() {
     return MachineOperatorBuilder::pointer_rep();
   }
 };
@@ -63,31 +63,31 @@
 template <>
 struct ReturnValueTraits<int32_t> {
   static int32_t Cast(uintptr_t r) { return static_cast<int32_t>(r); }
-  static MachineRepresentation Representation() { return kMachineWord32; }
+  static MachineType Representation() { return kMachineWord32; }
 };

 template <>
 struct ReturnValueTraits<uint32_t> {
   static uint32_t Cast(uintptr_t r) { return static_cast<uint32_t>(r); }
-  static MachineRepresentation Representation() { return kMachineWord32; }
+  static MachineType Representation() { return kMachineWord32; }
 };

 template <>
 struct ReturnValueTraits<int64_t> {
   static int64_t Cast(uintptr_t r) { return static_cast<int64_t>(r); }
-  static MachineRepresentation Representation() { return kMachineWord64; }
+  static MachineType Representation() { return kMachineWord64; }
 };

 template <>
 struct ReturnValueTraits<uint64_t> {
   static uint64_t Cast(uintptr_t r) { return static_cast<uint64_t>(r); }
-  static MachineRepresentation Representation() { return kMachineWord64; }
+  static MachineType Representation() { return kMachineWord64; }
 };

 template <>
 struct ReturnValueTraits<int16_t> {
   static int16_t Cast(uintptr_t r) { return static_cast<int16_t>(r); }
-  static MachineRepresentation Representation() {
+  static MachineType Representation() {
     return MachineOperatorBuilder::pointer_rep();
   }
 };
@@ -95,7 +95,7 @@
 template <>
 struct ReturnValueTraits<int8_t> {
   static int8_t Cast(uintptr_t r) { return static_cast<int8_t>(r); }
-  static MachineRepresentation Representation() {
+  static MachineType Representation() {
     return MachineOperatorBuilder::pointer_rep();
   }
 };
@@ -106,7 +106,7 @@
     UNREACHABLE();
     return 0.0;
   }
-  static MachineRepresentation Representation() { return kMachineFloat64; }
+  static MachineType Representation() { return kMachineFloat64; }
 };


@@ -131,15 +131,11 @@
   virtual ~CallHelper() {}

   static MachineCallDescriptorBuilder* ToCallDescriptorBuilder(
-      Zone* zone, MachineRepresentation return_type,
-      MachineRepresentation p0 = kMachineLast,
-      MachineRepresentation p1 = kMachineLast,
-      MachineRepresentation p2 = kMachineLast,
-      MachineRepresentation p3 = kMachineLast,
-      MachineRepresentation p4 = kMachineLast) {
+      Zone* zone, MachineType return_type, MachineType p0 = kMachineLast,
+      MachineType p1 = kMachineLast, MachineType p2 = kMachineLast,
+      MachineType p3 = kMachineLast, MachineType p4 = kMachineLast) {
     const int kSize = 5;
-    MachineRepresentation* params =
-        zone->NewArray<MachineRepresentation>(kSize);
+    MachineType* params = zone->NewArray<MachineType>(kSize);
     params[0] = p0;
     params[1] = p1;
     params[2] = p2;
@@ -158,7 +154,7 @@

  protected:
   virtual void VerifyParameters(int parameter_count,
-                                MachineRepresentation* parameters) = 0;
+                                MachineType* parameters) = 0;
   virtual byte* Generate() = 0;

  private:
@@ -280,35 +276,31 @@

   template <typename P1>
   void VerifyParameters1() {
-    MachineRepresentation parameters[] = {
-        ReturnValueTraits<P1>::Representation()};
+    MachineType parameters[] = {ReturnValueTraits<P1>::Representation()};
     VerifyParameters(ARRAY_SIZE(parameters), parameters);
   }

   template <typename P1, typename P2>
   void VerifyParameters2() {
-    MachineRepresentation parameters[] = {
-        ReturnValueTraits<P1>::Representation(),
-        ReturnValueTraits<P2>::Representation()};
+    MachineType parameters[] = {ReturnValueTraits<P1>::Representation(),
+                                ReturnValueTraits<P2>::Representation()};
     VerifyParameters(ARRAY_SIZE(parameters), parameters);
   }

   template <typename P1, typename P2, typename P3>
   void VerifyParameters3() {
-    MachineRepresentation parameters[] = {
-        ReturnValueTraits<P1>::Representation(),
-        ReturnValueTraits<P2>::Representation(),
-        ReturnValueTraits<P3>::Representation()};
+    MachineType parameters[] = {ReturnValueTraits<P1>::Representation(),
+                                ReturnValueTraits<P2>::Representation(),
+                                ReturnValueTraits<P3>::Representation()};
     VerifyParameters(ARRAY_SIZE(parameters), parameters);
   }

   template <typename P1, typename P2, typename P3, typename P4>
   void VerifyParameters4() {
-    MachineRepresentation parameters[] = {
-        ReturnValueTraits<P1>::Representation(),
-        ReturnValueTraits<P2>::Representation(),
-        ReturnValueTraits<P3>::Representation(),
-        ReturnValueTraits<P4>::Representation()};
+    MachineType parameters[] = {ReturnValueTraits<P1>::Representation(),
+                                ReturnValueTraits<P2>::Representation(),
+                                ReturnValueTraits<P3>::Representation(),
+                                ReturnValueTraits<P4>::Representation()};
     VerifyParameters(ARRAY_SIZE(parameters), parameters);
   }
 #endif
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/codegen-tester.h Thu Jul 31 09:30:16 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/codegen-tester.h Mon Aug 11 15:55:28 2014 UTC
@@ -22,10 +22,9 @@
                                public CallHelper,
                                public MachineAssembler {
  public:
-  MachineAssemblerTester(MachineRepresentation return_type,
- MachineRepresentation p0, MachineRepresentation p1, - MachineRepresentation p2, MachineRepresentation p3,
-                         MachineRepresentation p4)
+  MachineAssemblerTester(MachineType return_type, MachineType p0,
+                         MachineType p1, MachineType p2, MachineType p3,
+                         MachineType p4)
       : HandleAndZoneScope(),
         CallHelper(main_isolate()),
         MachineAssembler(new (main_zone()) Graph(main_zone()),
@@ -33,13 +32,12 @@
                                                  p1, p2, p3, p4),
                          MachineOperatorBuilder::pointer_rep()) {}

-  Node* LoadFromPointer(void* address, MachineRepresentation rep,
-                        int32_t offset = 0) {
+ Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) {
     return this->Load(rep, this->PointerConstant(address),
                       this->Int32Constant(offset));
   }

- void StoreToPointer(void* address, MachineRepresentation rep, Node* node) {
+  void StoreToPointer(void* address, MachineType rep, Node* node) {
     this->Store(rep, this->PointerConstant(address), node);
   }

@@ -62,9 +60,9 @@

  protected:
   virtual void VerifyParameters(int parameter_count,
-                                MachineRepresentation* parameter_types) {
+                                MachineType* parameter_types) {
     CHECK_EQ(this->parameter_count(), parameter_count);
-    const MachineRepresentation* expected_types = this->parameter_types();
+    const MachineType* expected_types = this->parameter_types();
     for (int i = 0; i < parameter_count; i++) {
       CHECK_EQ(expected_types[i], parameter_types[i]);
     }
@@ -93,11 +91,11 @@
     : public MachineAssemblerTester<RawMachineAssembler>,
public CallHelper2<ReturnType, RawMachineAssemblerTester<ReturnType>
{
  public:
-  RawMachineAssemblerTester(MachineRepresentation p0 = kMachineLast,
-                            MachineRepresentation p1 = kMachineLast,
-                            MachineRepresentation p2 = kMachineLast,
-                            MachineRepresentation p3 = kMachineLast,
-                            MachineRepresentation p4 = kMachineLast)
+  RawMachineAssemblerTester(MachineType p0 = kMachineLast,
+                            MachineType p1 = kMachineLast,
+                            MachineType p2 = kMachineLast,
+                            MachineType p3 = kMachineLast,
+                            MachineType p4 = kMachineLast)
       : MachineAssemblerTester<RawMachineAssembler>(
ReturnValueTraits<ReturnType>::Representation(), p0, p1, p2, p3,
             p4) {}
@@ -129,11 +127,11 @@
       public CallHelper2<ReturnType,
                          StructuredMachineAssemblerTester<ReturnType> > {
  public:
-  StructuredMachineAssemblerTester(MachineRepresentation p0 = kMachineLast,
-                                   MachineRepresentation p1 = kMachineLast,
-                                   MachineRepresentation p2 = kMachineLast,
-                                   MachineRepresentation p3 = kMachineLast,
-                                   MachineRepresentation p4 = kMachineLast)
+  StructuredMachineAssemblerTester(MachineType p0 = kMachineLast,
+                                   MachineType p1 = kMachineLast,
+                                   MachineType p2 = kMachineLast,
+                                   MachineType p3 = kMachineLast,
+                                   MachineType p4 = kMachineLast)
       : MachineAssemblerTester<StructuredMachineAssembler>(
ReturnValueTraits<ReturnType>::Representation(), p0, p1, p2, p3,
             p4) {}
@@ -147,7 +145,7 @@

 // TODO(titzer): use the C-style calling convention, or any register-based
 // calling convention for binop tests.
-template <typename CType, MachineRepresentation rep, bool use_result_buffer>
+template <typename CType, MachineType rep, bool use_result_buffer>
 class BinopTester {
  public:
   explicit BinopTester(RawMachineAssemblerTester<int32_t>* tester)
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.cc Tue Aug 5 08:47:39 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.cc Mon Aug 11 15:55:28 2014 UTC
@@ -42,10 +42,10 @@
 }


-void MachineCallHelper::VerifyParameters(
-    int parameter_count, MachineRepresentation* parameter_types) {
+void MachineCallHelper::VerifyParameters(int parameter_count,
+                                         MachineType* parameter_types) {
   CHECK_EQ(this->parameter_count(), parameter_count);
-  const MachineRepresentation* expected_types =
+  const MachineType* expected_types =
       call_descriptor_builder_->parameter_types();
   for (int i = 0; i < parameter_count; i++) {
     CHECK_EQ(expected_types[i], parameter_types[i]);
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.h Mon Aug 11 09:40:02 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.h Mon Aug 11 15:55:28 2014 UTC
@@ -45,8 +45,7 @@

  protected:
   virtual byte* Generate();
-  virtual void VerifyParameters(int parameter_count,
-                                MachineRepresentation* parameters);
+ virtual void VerifyParameters(int parameter_count, MachineType* parameters); void InitParameters(GraphBuilder* builder, CommonOperatorBuilder* common);

  protected:
@@ -88,11 +87,11 @@
       public SimplifiedGraphBuilder,
       public CallHelper2<ReturnType, GraphBuilderTester<ReturnType> > {
  public:
-  explicit GraphBuilderTester(MachineRepresentation p0 = kMachineLast,
-                              MachineRepresentation p1 = kMachineLast,
-                              MachineRepresentation p2 = kMachineLast,
-                              MachineRepresentation p3 = kMachineLast,
-                              MachineRepresentation p4 = kMachineLast)
+  explicit GraphBuilderTester(MachineType p0 = kMachineLast,
+                              MachineType p1 = kMachineLast,
+                              MachineType p2 = kMachineLast,
+                              MachineType p3 = kMachineLast,
+                              MachineType p4 = kMachineLast)
       : GraphAndBuilders(main_zone()),
         MachineCallHelper(
             main_zone(),
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/instruction-selector-tester.h Tue Aug 5 13:26:55 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/instruction-selector-tester.h Mon Aug 11 15:55:28 2014 UTC
@@ -27,9 +27,8 @@
   enum Mode { kTargetMode, kInternalMode };

   static const int kParameterCount = 3;
-  static MachineRepresentation* BuildParameterArray(Zone* zone) {
-    MachineRepresentation* array =
-        zone->NewArray<MachineRepresentation>(kParameterCount);
+  static MachineType* BuildParameterArray(Zone* zone) {
+    MachineType* array = zone->NewArray<MachineType>(kParameterCount);
     for (int i = 0; i < kParameterCount; ++i) {
       array[i] = kMachineWord32;
     }
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc Mon Aug 11 09:40:02 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc Mon Aug 11 15:55:28 2014 UTC
@@ -27,7 +27,7 @@
 template <typename ReturnType>
 class ChangesLoweringTester : public GraphBuilderTester<ReturnType> {
  public:
-  explicit ChangesLoweringTester(MachineRepresentation p0 = kMachineLast)
+  explicit ChangesLoweringTester(MachineType p0 = kMachineLast)
       : GraphBuilderTester<ReturnType>(p0),
         typer(this->zone()),
         source_positions(this->graph()),
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Wed Aug 6 11:49:02 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Mon Aug 11 15:55:28 2014 UTC
@@ -120,7 +120,7 @@
     //   deopt();
     // }

-    MachineRepresentation parameter_reps[] = {kMachineTagged};
+    MachineType parameter_reps[] = {kMachineTagged};
     MachineCallDescriptorBuilder descriptor_builder(kMachineTagged, 1,
                                                     parameter_reps);

@@ -256,7 +256,7 @@
     //   %DeoptimizeFunction(foo);
     // }

-    MachineRepresentation parameter_reps[] = {kMachineTagged};
+    MachineType parameter_reps[] = {kMachineTagged};
     MachineCallDescriptorBuilder descriptor_builder(kMachineTagged, 2,
                                                     parameter_reps);

=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-run-machops.cc Mon Aug 4 08:18:37 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-run-machops.cc Mon Aug 11 15:55:28 2014 UTC
@@ -2493,7 +2493,7 @@


 template <typename Type, typename CType>
-static void RunLoadImmIndex(MachineRepresentation rep) {
+static void RunLoadImmIndex(MachineType rep) {
   const int kNumElems = 3;
   CType buffer[kNumElems];

@@ -2532,7 +2532,7 @@


 template <typename CType>
-static void RunLoadStore(MachineRepresentation rep) {
+static void RunLoadStore(MachineType rep) {
   const int kNumElems = 4;
   CType buffer[kNumElems];

@@ -3351,7 +3351,7 @@

     RawMachineAssemblerTester<int32_t> m;
     Node** args = NULL;
-    MachineRepresentation* arg_types = NULL;
+    MachineType* arg_types = NULL;
     Node* function =
         call_direct ? m.PointerConstant(function_address)
                     : m.LoadFromPointer(&function_address,
@@ -3371,7 +3371,7 @@

     RawMachineAssemblerTester<int32_t> m(kMachineWord32);
     Node* args[] = {m.Parameter(0)};
-    MachineRepresentation arg_types[] = {kMachineWord32};
+    MachineType arg_types[] = {kMachineWord32};
     Node* function =
         call_direct ? m.PointerConstant(function_address)
                     : m.LoadFromPointer(&function_address,
@@ -3394,7 +3394,7 @@

     RawMachineAssemblerTester<int32_t> m(kMachineWord32, kMachineWord32);
     Node* args[] = {m.Parameter(0), m.Parameter(1)};
-    MachineRepresentation arg_types[] = {kMachineWord32, kMachineWord32};
+    MachineType arg_types[] = {kMachineWord32, kMachineWord32};
     Node* function =
         call_direct ? m.PointerConstant(function_address)
                     : m.LoadFromPointer(&function_address,
@@ -3596,7 +3596,7 @@
 }


-template <typename IntType, MachineRepresentation kRepresentation>
+template <typename IntType, MachineType kRepresentation>
 static void LoadStoreTruncation() {
   IntType input;

@@ -3867,7 +3867,7 @@
   {
void* func = reinterpret_cast<void*>(reinterpret_cast<intptr_t>(&Seven));
     Node** args = NULL;
-    MachineRepresentation* arg_types = NULL;
+    MachineType* arg_types = NULL;
     m.CallC(m.PointerConstant(func), kMachineWord32, arg_types, args, 0);
   }
   for (int i = 0; i < kInputSize; i++) {
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-simplified-lowering.cc Mon Aug 11 10:06:36 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-simplified-lowering.cc Mon Aug 11 15:55:28 2014 UTC
@@ -29,11 +29,11 @@
 template <typename ReturnType>
 class SimplifiedLoweringTester : public GraphBuilderTester<ReturnType> {
  public:
-  SimplifiedLoweringTester(MachineRepresentation p0 = kMachineLast,
-                           MachineRepresentation p1 = kMachineLast,
-                           MachineRepresentation p2 = kMachineLast,
-                           MachineRepresentation p3 = kMachineLast,
-                           MachineRepresentation p4 = kMachineLast)
+  SimplifiedLoweringTester(MachineType p0 = kMachineLast,
+                           MachineType p1 = kMachineLast,
+                           MachineType p2 = kMachineLast,
+                           MachineType p3 = kMachineLast,
+                           MachineType p4 = kMachineLast)
       : GraphBuilderTester<ReturnType>(p0, p1, p2, p3, p4),
         typer(this->zone()),
         source_positions(this->graph()),
@@ -89,7 +89,7 @@
 }


-ElementAccess ForBackingStoreElement(MachineRepresentation rep) {
+ElementAccess ForBackingStoreElement(MachineType rep) {
   ElementAccess access = {kUntaggedBase,
                           kNonHeapObjectHeaderSize - kHeapObjectTag,
                           Type::Any(), rep};
@@ -363,13 +363,13 @@
 class AccessTester : public HandleAndZoneScope {
  public:
   bool tagged;
-  MachineRepresentation rep;
+  MachineType rep;
   E* original_elements;
   size_t num_elements;
   E* untagged_array;
Handle<ByteArray> tagged_array; // TODO(titzer): use FixedArray for tagged.

-  AccessTester(bool t, MachineRepresentation r, E* orig, size_t num)
+  AccessTester(bool t, MachineType r, E* orig, size_t num)
       : tagged(t),
         rep(r),
         original_elements(orig),
@@ -517,8 +517,7 @@


 template <typename E>
-static void RunAccessTest(MachineRepresentation rep, E* original_elements,
-                          size_t num) {
+static void RunAccessTest(MachineType rep, E* original_elements, size_t num) {
   int num_elements = static_cast<int>(num);

   for (int taggedness = 0; taggedness < 2; taggedness++) {
@@ -1158,9 +1157,9 @@
 }


-static const MachineRepresentation machine_reps[] = {
-    kMachineWord8,  kMachineWord16,  kMachineWord32,
-    kMachineWord64, kMachineFloat64, kMachineTagged};
+static const MachineType machine_reps[] = {kMachineWord8,   kMachineWord16,
+                                           kMachineWord32,  kMachineWord64,
+ kMachineFloat64, kMachineTagged};


 // Representation types corresponding to those above.
@@ -1188,7 +1187,7 @@
     CHECK_EQ(t.p0, load->InputAt(0));
     CheckFieldAccessArithmetic(access, load);

-    MachineRepresentation rep = OpParameter<MachineRepresentation>(load);
+    MachineType rep = OpParameter<MachineType>(load);
     CHECK_EQ(machine_reps[i], rep);
   }
 }
@@ -1236,7 +1235,7 @@
     CHECK_EQ(t.p0, load->InputAt(0));
     CheckElementAccessArithmetic(access, load);

-    MachineRepresentation rep = OpParameter<MachineRepresentation>(load);
+    MachineType rep = OpParameter<MachineType>(load);
     CHECK_EQ(machine_reps[i], rep);
   }
 }
=======================================
--- /branches/bleeding_edge/test/compiler-unittests/instruction-selector-unittest.h Fri Aug 8 07:04:07 2014 UTC +++ /branches/bleeding_edge/test/compiler-unittests/instruction-selector-unittest.h Mon Aug 11 15:55:28 2014 UTC
@@ -27,22 +27,18 @@

   class StreamBuilder V8_FINAL : public RawMachineAssembler {
    public:
-    StreamBuilder(InstructionSelectorTest* test,
-                  MachineRepresentation return_type)
+    StreamBuilder(InstructionSelectorTest* test, MachineType return_type)
         : RawMachineAssembler(new (test->zone()) Graph(test->zone()),
CallDescriptorBuilder(test->zone(), return_type)),
           test_(test) {}
-    StreamBuilder(InstructionSelectorTest* test,
-                  MachineRepresentation return_type,
-                  MachineRepresentation parameter0_type)
+    StreamBuilder(InstructionSelectorTest* test, MachineType return_type,
+                  MachineType parameter0_type)
         : RawMachineAssembler(new (test->zone()) Graph(test->zone()),
CallDescriptorBuilder(test->zone(), return_type,
                                                     parameter0_type)),
           test_(test) {}
-    StreamBuilder(InstructionSelectorTest* test,
-                  MachineRepresentation return_type,
-                  MachineRepresentation parameter0_type,
-                  MachineRepresentation parameter1_type)
+    StreamBuilder(InstructionSelectorTest* test, MachineType return_type,
+                  MachineType parameter0_type, MachineType parameter1_type)
         : RawMachineAssembler(
               new (test->zone()) Graph(test->zone()),
CallDescriptorBuilder(test->zone(), return_type, parameter0_type,
@@ -63,26 +59,22 @@

    private:
     MachineCallDescriptorBuilder* CallDescriptorBuilder(
-        Zone* zone, MachineRepresentation return_type) {
+        Zone* zone, MachineType return_type) {
       return new (zone) MachineCallDescriptorBuilder(return_type, 0, NULL);
     }

     MachineCallDescriptorBuilder* CallDescriptorBuilder(
-        Zone* zone, MachineRepresentation return_type,
-        MachineRepresentation parameter0_type) {
-      MachineRepresentation* parameter_types =
-          zone->NewArray<MachineRepresentation>(1);
+        Zone* zone, MachineType return_type, MachineType parameter0_type) {
+      MachineType* parameter_types = zone->NewArray<MachineType>(1);
       parameter_types[0] = parameter0_type;
       return new (zone)
           MachineCallDescriptorBuilder(return_type, 1, parameter_types);
     }

     MachineCallDescriptorBuilder* CallDescriptorBuilder(
-        Zone* zone, MachineRepresentation return_type,
-        MachineRepresentation parameter0_type,
-        MachineRepresentation parameter1_type) {
-      MachineRepresentation* parameter_types =
-          zone->NewArray<MachineRepresentation>(2);
+        Zone* zone, MachineType return_type, MachineType parameter0_type,
+        MachineType parameter1_type) {
+      MachineType* parameter_types = zone->NewArray<MachineType>(2);
       parameter_types[0] = parameter0_type;
       parameter_types[1] = parameter1_type;
       return new (zone)
=======================================
--- /branches/bleeding_edge/tools/gyp/v8.gyp    Mon Aug 11 14:22:24 2014 UTC
+++ /branches/bleeding_edge/tools/gyp/v8.gyp    Mon Aug 11 15:55:28 2014 UTC
@@ -394,6 +394,7 @@
         '../../src/compiler/machine-operator-reducer.cc',
         '../../src/compiler/machine-operator-reducer.h',
         '../../src/compiler/machine-operator.h',
+        '../../src/compiler/machine-type.h',
         '../../src/compiler/node-aux-data-inl.h',
         '../../src/compiler/node-aux-data.h',
         '../../src/compiler/node-cache.cc',

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to