| Index: src/x64/lithium-x64.h
|
| ===================================================================
|
| --- src/x64/lithium-x64.h (revision 7180)
|
| +++ src/x64/lithium-x64.h (working copy)
|
| @@ -42,8 +42,6 @@
|
| #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
|
| V(ControlInstruction) \
|
| V(Call) \
|
| - V(StoreKeyed) \
|
| - V(StoreNamed) \
|
| LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
|
|
|
|
|
| @@ -74,6 +72,8 @@
|
| V(CheckMap) \
|
| V(CheckPrototypeMaps) \
|
| V(CheckSmi) \
|
| + V(ClassOfTest) \
|
| + V(ClassOfTestAndBranch) \
|
| V(CmpID) \
|
| V(CmpIDAndBranch) \
|
| V(CmpJSObjectEq) \
|
| @@ -89,12 +89,18 @@
|
| V(Deoptimize) \
|
| V(DivI) \
|
| V(DoubleToI) \
|
| + V(ExternalArrayLength) \
|
| + V(FixedArrayLength) \
|
| V(FunctionLiteral) \
|
| V(Gap) \
|
| + V(GetCachedArrayIndex) \
|
| V(GlobalObject) \
|
| V(GlobalReceiver) \
|
| V(Goto) \
|
| - V(FixedArrayLength) \
|
| + V(HasInstanceType) \
|
| + V(HasInstanceTypeAndBranch) \
|
| + V(HasCachedArrayIndex) \
|
| + V(HasCachedArrayIndexAndBranch) \
|
| V(InstanceOf) \
|
| V(InstanceOfAndBranch) \
|
| V(InstanceOfKnownGlobal) \
|
| @@ -106,16 +112,11 @@
|
| V(IsSmi) \
|
| V(IsSmiAndBranch) \
|
| V(JSArrayLength) \
|
| - V(HasInstanceType) \
|
| - V(HasInstanceTypeAndBranch) \
|
| - V(HasCachedArrayIndex) \
|
| - V(HasCachedArrayIndexAndBranch) \
|
| - V(ClassOfTest) \
|
| - V(ClassOfTestAndBranch) \
|
| V(Label) \
|
| V(LazyBailout) \
|
| V(LoadContextSlot) \
|
| V(LoadElements) \
|
| + V(LoadExternalArrayPointer) \
|
| V(LoadGlobal) \
|
| V(LoadKeyedFastElement) \
|
| V(LoadKeyedGeneric) \
|
| @@ -123,7 +124,6 @@
|
| V(LoadNamedGeneric) \
|
| V(LoadFunctionPrototype) \
|
| V(LoadPixelArrayElement) \
|
| - V(LoadPixelArrayExternalPointer) \
|
| V(ModI) \
|
| V(MulI) \
|
| V(NumberTagD) \
|
| @@ -131,8 +131,8 @@
|
| V(NumberUntagD) \
|
| V(ObjectLiteral) \
|
| V(OsrEntry) \
|
| + V(OuterContext) \
|
| V(Parameter) \
|
| - V(PixelArrayLength) \
|
| V(Power) \
|
| V(PushArgument) \
|
| V(RegExpLiteral) \
|
| @@ -141,11 +141,15 @@
|
| V(SmiTag) \
|
| V(SmiUntag) \
|
| V(StackCheck) \
|
| + V(StoreContextSlot) \
|
| V(StoreGlobal) \
|
| V(StoreKeyedFastElement) \
|
| V(StoreKeyedGeneric) \
|
| V(StoreNamedField) \
|
| V(StoreNamedGeneric) \
|
| + V(StorePixelArrayElement) \
|
| + V(StringCharCodeAt) \
|
| + V(StringCharFromCode) \
|
| V(StringLength) \
|
| V(SubI) \
|
| V(TaggedToI) \
|
| @@ -728,6 +732,17 @@
|
| };
|
|
|
|
|
| +class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
|
| + public:
|
| + explicit LGetCachedArrayIndex(LOperand* value) {
|
| + inputs_[0] = value;
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
|
| + DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
|
| +};
|
| +
|
| +
|
| class LHasCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| explicit LHasCachedArrayIndex(LOperand* value) {
|
| @@ -983,14 +998,14 @@
|
| };
|
|
|
|
|
| -class LPixelArrayLength: public LTemplateInstruction<1, 1, 0> {
|
| +class LExternalArrayLength: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| - explicit LPixelArrayLength(LOperand* value) {
|
| + explicit LExternalArrayLength(LOperand* value) {
|
| inputs_[0] = value;
|
| }
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(PixelArrayLength, "pixel-array-length")
|
| - DECLARE_HYDROGEN_ACCESSOR(PixelArrayLength)
|
| + DECLARE_CONCRETE_INSTRUCTION(ExternalArrayLength, "external-array-length")
|
| + DECLARE_HYDROGEN_ACCESSOR(ExternalArrayLength)
|
| };
|
|
|
|
|
| @@ -1005,11 +1020,10 @@
|
| };
|
|
|
|
|
| -class LValueOf: public LTemplateInstruction<1, 1, 1> {
|
| +class LValueOf: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| - LValueOf(LOperand* value, LOperand* temp) {
|
| + explicit LValueOf(LOperand* value) {
|
| inputs_[0] = value;
|
| - temps_[0] = temp;
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
|
| @@ -1155,14 +1169,14 @@
|
| };
|
|
|
|
|
| -class LLoadPixelArrayExternalPointer: public LTemplateInstruction<1, 1, 0> {
|
| +class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| - explicit LLoadPixelArrayExternalPointer(LOperand* object) {
|
| + explicit LLoadExternalArrayPointer(LOperand* object) {
|
| inputs_[0] = object;
|
| }
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(LoadPixelArrayExternalPointer,
|
| - "load-pixel-array-external-pointer")
|
| + DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer,
|
| + "load-external-array-pointer")
|
| };
|
|
|
|
|
| @@ -1246,6 +1260,26 @@
|
| };
|
|
|
|
|
| +class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> {
|
| + public:
|
| + LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) {
|
| + inputs_[0] = context;
|
| + inputs_[1] = value;
|
| + temps_[0] = temp;
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
|
| + DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
|
| +
|
| + LOperand* context() { return InputAt(0); }
|
| + LOperand* value() { return InputAt(1); }
|
| + int slot_index() { return hydrogen()->slot_index(); }
|
| + int needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
|
| +
|
| + virtual void PrintDataTo(StringStream* stream);
|
| +};
|
| +
|
| +
|
| class LPushArgument: public LTemplateInstruction<0, 1, 0> {
|
| public:
|
| explicit LPushArgument(LOperand* value) {
|
| @@ -1262,6 +1296,18 @@
|
| };
|
|
|
|
|
| +class LOuterContext: public LTemplateInstruction<1, 1, 0> {
|
| + public:
|
| + explicit LOuterContext(LOperand* context) {
|
| + inputs_[0] = context;
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
|
| +
|
| + LOperand* context() { return InputAt(0); }
|
| +};
|
| +
|
| +
|
| class LGlobalObject: public LTemplateInstruction<1, 0, 0> {
|
| public:
|
| DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
|
| @@ -1295,6 +1341,8 @@
|
| DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
|
| DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
|
|
|
| + LOperand* key() { return inputs_[0]; }
|
| +
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| int arity() const { return hydrogen()->argument_count() - 1; }
|
| @@ -1315,6 +1363,8 @@
|
|
|
| class LCallFunction: public LTemplateInstruction<1, 0, 0> {
|
| public:
|
| + LCallFunction() {}
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
|
| DECLARE_HYDROGEN_ACCESSOR(CallFunction)
|
|
|
| @@ -1403,11 +1453,10 @@
|
|
|
|
|
| // Sometimes truncating conversion from a tagged value to an int32.
|
| -class LDoubleToI: public LTemplateInstruction<1, 1, 1> {
|
| +class LDoubleToI: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| - LDoubleToI(LOperand* value, LOperand* temp) {
|
| + explicit LDoubleToI(LOperand* value) {
|
| inputs_[0] = value;
|
| - temps_[0] = temp;
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
|
| @@ -1468,34 +1517,23 @@
|
| };
|
|
|
|
|
| -class LStoreNamed: public LTemplateInstruction<0, 2, 1> {
|
| +class LStoreNamedField: public LTemplateInstruction<0, 2, 1> {
|
| public:
|
| - LStoreNamed(LOperand* obj, LOperand* val) {
|
| - inputs_[0] = obj;
|
| - inputs_[1] = val;
|
| + LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) {
|
| + inputs_[0] = object;
|
| + inputs_[1] = value;
|
| + temps_[0] = temp;
|
| }
|
|
|
| - DECLARE_INSTRUCTION(StoreNamed)
|
| - DECLARE_HYDROGEN_ACCESSOR(StoreNamed)
|
| + DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
|
| + DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
|
|
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| LOperand* object() { return inputs_[0]; }
|
| LOperand* value() { return inputs_[1]; }
|
| +
|
| Handle<Object> name() const { return hydrogen()->name(); }
|
| -};
|
| -
|
| -
|
| -class LStoreNamedField: public LStoreNamed {
|
| - public:
|
| - LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp)
|
| - : LStoreNamed(obj, val) {
|
| - temps_[0] = temp;
|
| - }
|
| -
|
| - DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
|
| - DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
|
| -
|
| bool is_in_object() { return hydrogen()->is_in_object(); }
|
| int offset() { return hydrogen()->offset(); }
|
| bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
|
| @@ -1503,25 +1541,35 @@
|
| };
|
|
|
|
|
| -class LStoreNamedGeneric: public LStoreNamed {
|
| +class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> {
|
| public:
|
| - LStoreNamedGeneric(LOperand* obj, LOperand* val)
|
| - : LStoreNamed(obj, val) { }
|
| + LStoreNamedGeneric(LOperand* object, LOperand* value) {
|
| + inputs_[0] = object;
|
| + inputs_[1] = value;
|
| + }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
|
| DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
|
| +
|
| + virtual void PrintDataTo(StringStream* stream);
|
| +
|
| + LOperand* object() { return inputs_[0]; }
|
| + LOperand* value() { return inputs_[1]; }
|
| + Handle<Object> name() const { return hydrogen()->name(); }
|
| };
|
|
|
|
|
| -class LStoreKeyed: public LTemplateInstruction<0, 3, 0> {
|
| +class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
|
| public:
|
| - LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) {
|
| + LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
|
| inputs_[0] = obj;
|
| inputs_[1] = key;
|
| inputs_[2] = val;
|
| }
|
|
|
| - DECLARE_INSTRUCTION(StoreKeyed)
|
| + DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
|
| + "store-keyed-fast-element")
|
| + DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
|
|
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| @@ -1531,26 +1579,72 @@
|
| };
|
|
|
|
|
| -class LStoreKeyedFastElement: public LStoreKeyed {
|
| +class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 0> {
|
| public:
|
| - LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val)
|
| - : LStoreKeyed(obj, key, val) {}
|
| + LStorePixelArrayElement(LOperand* external_pointer,
|
| + LOperand* key,
|
| + LOperand* val) {
|
| + inputs_[0] = external_pointer;
|
| + inputs_[1] = key;
|
| + inputs_[2] = val;
|
| + }
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
|
| - "store-keyed-fast-element")
|
| - DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
|
| + DECLARE_CONCRETE_INSTRUCTION(StorePixelArrayElement,
|
| + "store-pixel-array-element")
|
| + DECLARE_HYDROGEN_ACCESSOR(StorePixelArrayElement)
|
| +
|
| + LOperand* external_pointer() { return inputs_[0]; }
|
| + LOperand* key() { return inputs_[1]; }
|
| + LOperand* value() { return inputs_[2]; }
|
| };
|
|
|
|
|
| -class LStoreKeyedGeneric: public LStoreKeyed {
|
| +class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
|
| public:
|
| - LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val)
|
| - : LStoreKeyed(obj, key, val) { }
|
| + LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) {
|
| + inputs_[0] = object;
|
| + inputs_[1] = key;
|
| + inputs_[2] = value;
|
| + }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
| +
|
| + virtual void PrintDataTo(StringStream* stream);
|
| +
|
| + LOperand* object() { return inputs_[0]; }
|
| + LOperand* key() { return inputs_[1]; }
|
| + LOperand* value() { return inputs_[2]; }
|
| };
|
|
|
|
|
| +class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
|
| + public:
|
| + LStringCharCodeAt(LOperand* string, LOperand* index) {
|
| + inputs_[0] = string;
|
| + inputs_[1] = index;
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
|
| + DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
|
| +
|
| + LOperand* string() { return inputs_[0]; }
|
| + LOperand* index() { return inputs_[1]; }
|
| +};
|
| +
|
| +
|
| +class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> {
|
| + public:
|
| + explicit LStringCharFromCode(LOperand* char_code) {
|
| + inputs_[0] = char_code;
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
|
| + DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
|
| +
|
| + LOperand* char_code() { return inputs_[0]; }
|
| +};
|
| +
|
| +
|
| class LStringLength: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| explicit LStringLength(LOperand* string) {
|
| @@ -1764,8 +1858,9 @@
|
| class LChunkBuilder;
|
| class LChunk: public ZoneObject {
|
| public:
|
| - explicit LChunk(HGraph* graph)
|
| + explicit LChunk(CompilationInfo* info, HGraph* graph)
|
| : spill_slot_count_(0),
|
| + info_(info),
|
| graph_(graph),
|
| instructions_(32),
|
| pointer_maps_(8),
|
| @@ -1782,6 +1877,7 @@
|
| int ParameterAt(int index);
|
| int GetParameterStackSlot(int index) const;
|
| int spill_slot_count() const { return spill_slot_count_; }
|
| + CompilationInfo* info() const { return info_; }
|
| HGraph* graph() const { return graph_; }
|
| const ZoneList<LInstruction*>* instructions() const { return &instructions_; }
|
| void AddGapMove(int index, LOperand* from, LOperand* to);
|
| @@ -1818,6 +1914,7 @@
|
|
|
| private:
|
| int spill_slot_count_;
|
| + CompilationInfo* info_;
|
| HGraph* const graph_;
|
| ZoneList<LInstruction*> instructions_;
|
| ZoneList<LPointerMap*> pointer_maps_;
|
| @@ -1827,8 +1924,9 @@
|
|
|
| class LChunkBuilder BASE_EMBEDDED {
|
| public:
|
| - LChunkBuilder(HGraph* graph, LAllocator* allocator)
|
| + LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
|
| : chunk_(NULL),
|
| + info_(info),
|
| graph_(graph),
|
| status_(UNUSED),
|
| current_instruction_(NULL),
|
| @@ -1857,6 +1955,7 @@
|
| };
|
|
|
| LChunk* chunk() const { return chunk_; }
|
| + CompilationInfo* info() const { return info_; }
|
| HGraph* graph() const { return graph_; }
|
|
|
| bool is_unused() const { return status_ == UNUSED; }
|
| @@ -1963,6 +2062,7 @@
|
| HArithmeticBinaryOperation* instr);
|
|
|
| LChunk* chunk_;
|
| + CompilationInfo* info_;
|
| HGraph* const graph_;
|
| Status status_;
|
| HInstruction* current_instruction_;
|
|
|