diff options
Diffstat (limited to 'deps/v8/src/ia32/lithium-ia32.h')
-rw-r--r-- | deps/v8/src/ia32/lithium-ia32.h | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/deps/v8/src/ia32/lithium-ia32.h b/deps/v8/src/ia32/lithium-ia32.h index b32ead9138..e43672cdd9 100644 --- a/deps/v8/src/ia32/lithium-ia32.h +++ b/deps/v8/src/ia32/lithium-ia32.h @@ -44,7 +44,6 @@ class LCodeGen; V(AccessArgumentsAt) \ V(AddI) \ V(Allocate) \ - V(AllocateObject) \ V(ApplyArguments) \ V(ArgumentsElements) \ V(ArgumentsLength) \ @@ -82,6 +81,7 @@ class LCodeGen; V(CmpConstantEqAndBranch) \ V(ConstantD) \ V(ConstantI) \ + V(ConstantS) \ V(ConstantT) \ V(Context) \ V(DebugBreak) \ @@ -90,6 +90,7 @@ class LCodeGen; V(Deoptimize) \ V(DivI) \ V(DoubleToI) \ + V(DoubleToSmi) \ V(DummyUse) \ V(ElementsKind) \ V(FixedArrayBaseLength) \ @@ -106,6 +107,7 @@ class LCodeGen; V(InstanceSize) \ V(InstructionGap) \ V(Integer32ToDouble) \ + V(Integer32ToSmi) \ V(Uint32ToDouble) \ V(InvokeFunction) \ V(IsConstructCallAndBranch) \ @@ -1150,6 +1152,15 @@ class LConstantI: public LTemplateInstruction<1, 0, 0> { }; +class LConstantS: public LTemplateInstruction<1, 0, 0> { + public: + DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") + DECLARE_HYDROGEN_ACCESSOR(Constant) + + Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); } +}; + + class LConstantD: public LTemplateInstruction<1, 0, 1> { public: explicit LConstantD(LOperand* temp) { @@ -1593,7 +1604,7 @@ inline static bool ExternalArrayOpRequiresTemp( // Operations that require the key to be divided by two to be converted into // an index cannot fold the scale operation into a load and need an extra // temp register to do the work. - return key_representation.IsTagged() && + return key_representation.IsSmi() && (elements_kind == EXTERNAL_BYTE_ELEMENTS || elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || elements_kind == EXTERNAL_PIXEL_ELEMENTS); @@ -1998,6 +2009,19 @@ class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { }; +class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { + public: + explicit LInteger32ToSmi(LOperand* value) { + inputs_[0] = value; + } + + LOperand* value() { return inputs_[0]; } + + DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi") + DECLARE_HYDROGEN_ACCESSOR(Change) +}; + + class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { public: explicit LUint32ToDouble(LOperand* value, LOperand* temp) { @@ -2069,6 +2093,19 @@ class LDoubleToI: public LTemplateInstruction<1, 1, 1> { }; +class LDoubleToSmi: public LTemplateInstruction<1, 1, 0> { + public: + explicit LDoubleToSmi(LOperand* value) { + inputs_[0] = value; + } + + LOperand* value() { return inputs_[0]; } + + DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi") + DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) +}; + + // Truncating conversion from a tagged value to an int32. class LTaggedToI: public LTemplateInstruction<1, 1, 1> { public: @@ -2183,9 +2220,6 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { virtual void PrintDataTo(StringStream* stream); - Handle<Object> name() const { return hydrogen()->name(); } - bool is_in_object() { return hydrogen()->is_in_object(); } - int offset() { return hydrogen()->offset(); } Handle<Map> transition() const { return hydrogen()->transition(); } Representation representation() const { return hydrogen()->field_representation(); @@ -2432,7 +2466,7 @@ class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 1> { }; -class LCheckSmi: public LTemplateInstruction<0, 1, 0> { +class LCheckSmi: public LTemplateInstruction<1, 1, 0> { public: explicit LCheckSmi(LOperand* value) { inputs_[0] = value; @@ -2517,21 +2551,6 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { }; -class LAllocateObject: public LTemplateInstruction<1, 1, 1> { - public: - LAllocateObject(LOperand* context, LOperand* temp) { - inputs_[0] = context; - temps_[0] = temp; - } - - LOperand* context() { return inputs_[0]; } - LOperand* temp() { return temps_[0]; } - - DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object") - DECLARE_HYDROGEN_ACCESSOR(AllocateObject) -}; - - class LAllocate: public LTemplateInstruction<1, 2, 1> { public: LAllocate(LOperand* context, LOperand* size, LOperand* temp) { |