| Index: src/x64/lithium-x64.h
|
| ===================================================================
|
| --- src/x64/lithium-x64.h (revision 6703)
|
| +++ src/x64/lithium-x64.h (working copy)
|
| @@ -39,119 +39,8 @@
|
| // Forward declarations.
|
| class LCodeGen;
|
|
|
| -
|
| -// Type hierarchy:
|
| -//
|
| -// LInstruction
|
| -// LTemplateInstruction
|
| -// LControlInstruction
|
| -// LBranch
|
| -// LClassOfTestAndBranch
|
| -// LCmpJSObjectEqAndBranch
|
| -// LCmpIDAndBranch
|
| -// LHasCachedArrayIndexAndBranch
|
| -// LHasInstanceTypeAndBranch
|
| -// LInstanceOfAndBranch
|
| -// LIsNullAndBranch
|
| -// LIsObjectAndBranch
|
| -// LIsSmiAndBranch
|
| -// LTypeofIsAndBranch
|
| -// LAccessArgumentsAt
|
| -// LArgumentsElements
|
| -// LArgumentsLength
|
| -// LAddI
|
| -// LApplyArguments
|
| -// LArithmeticD
|
| -// LArithmeticT
|
| -// LBitI
|
| -// LBoundsCheck
|
| -// LCmpID
|
| -// LCmpJSObjectEq
|
| -// LCmpT
|
| -// LDivI
|
| -// LInstanceOf
|
| -// LInstanceOfKnownGlobal
|
| -// LLoadKeyedFastElement
|
| -// LLoadKeyedGeneric
|
| -// LModI
|
| -// LMulI
|
| -// LPower
|
| -// LShiftI
|
| -// LSubI
|
| -// LCallConstantFunction
|
| -// LCallFunction
|
| -// LCallGlobal
|
| -// LCallKeyed
|
| -// LCallKnownGlobal
|
| -// LCallNamed
|
| -// LCallRuntime
|
| -// LCallStub
|
| -// LConstant
|
| -// LConstantD
|
| -// LConstantI
|
| -// LConstantT
|
| -// LDeoptimize
|
| -// LFunctionLiteral
|
| -// LGap
|
| -// LLabel
|
| -// LGlobalObject
|
| -// LGlobalReceiver
|
| -// LGoto
|
| -// LLazyBailout
|
| -// LLoadGlobal
|
| -// LCheckPrototypeMaps
|
| -// LLoadContextSlot
|
| -// LArrayLiteral
|
| -// LObjectLiteral
|
| -// LRegExpLiteral
|
| -// LOsrEntry
|
| -// LParameter
|
| -// LRegExpConstructResult
|
| -// LStackCheck
|
| -// LStoreKeyed
|
| -// LStoreKeyedFastElement
|
| -// LStoreKeyedGeneric
|
| -// LStoreNamed
|
| -// LStoreNamedField
|
| -// LStoreNamedGeneric
|
| -// LBitNotI
|
| -// LCallNew
|
| -// LCheckFunction
|
| -// LCheckPrototypeMaps
|
| -// LCheckInstanceType
|
| -// LCheckMap
|
| -// LCheckSmi
|
| -// LClassOfTest
|
| -// LDeleteProperty
|
| -// LDoubleToI
|
| -// LFixedArrayLength
|
| -// LHasCachedArrayIndex
|
| -// LHasInstanceType
|
| -// LInteger32ToDouble
|
| -// LIsNull
|
| -// LIsObject
|
| -// LIsSmi
|
| -// LJSArrayLength
|
| -// LLoadNamedField
|
| -// LLoadNamedGeneric
|
| -// LLoadFunctionPrototype
|
| -// LNumberTagD
|
| -// LNumberTagI
|
| -// LPushArgument
|
| -// LReturn
|
| -// LSmiTag
|
| -// LStoreGlobal
|
| -// LTaggedToI
|
| -// LThrow
|
| -// LTypeof
|
| -// LTypeofIs
|
| -// LUnaryMathOperation
|
| -// LValueOf
|
| -// LUnknownOSRValue
|
| -
|
| #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
|
| V(ControlInstruction) \
|
| - V(Constant) \
|
| V(Call) \
|
| V(StoreKeyed) \
|
| V(StoreNamed) \
|
| @@ -259,6 +148,8 @@
|
| V(Typeof) \
|
| V(TypeofIs) \
|
| V(TypeofIsAndBranch) \
|
| + V(IsConstructCall) \
|
| + V(IsConstructCallAndBranch) \
|
| V(UnaryMathOperation) \
|
| V(UnknownOSRValue) \
|
| V(ValueOf)
|
| @@ -648,12 +539,11 @@
|
| };
|
|
|
|
|
| -class LMulI: public LTemplateInstruction<1, 2, 1> {
|
| +class LMulI: public LTemplateInstruction<1, 2, 0> {
|
| public:
|
| - LMulI(LOperand* left, LOperand* right, LOperand* temp) {
|
| + LMulI(LOperand* left, LOperand* right) {
|
| inputs_[0] = left;
|
| inputs_[1] = right;
|
| - temps_[0] = temp;
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
|
| @@ -1013,47 +903,33 @@
|
| };
|
|
|
|
|
| -template <int temp_count>
|
| -class LConstant: public LTemplateInstruction<1, 0, temp_count> {
|
| - DECLARE_INSTRUCTION(Constant)
|
| -};
|
| -
|
| -
|
| -class LConstantI: public LConstant<0> {
|
| +class LConstantI: public LTemplateInstruction<1, 0, 0> {
|
| public:
|
| - explicit LConstantI(int32_t value) : value_(value) { }
|
| - int32_t value() const { return value_; }
|
| -
|
| DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
|
| + DECLARE_HYDROGEN_ACCESSOR(Constant)
|
|
|
| - private:
|
| - int32_t value_;
|
| + int32_t value() const { return hydrogen()->Integer32Value(); }
|
| };
|
|
|
|
|
| -class LConstantD: public LConstant<1> {
|
| +class LConstantD: public LTemplateInstruction<1, 0, 1> {
|
| public:
|
| - explicit LConstantD(double value, LOperand* temp) : value_(value) {
|
| + explicit LConstantD(LOperand* temp) {
|
| temps_[0] = temp;
|
| }
|
| - double value() const { return value_; }
|
| -
|
| DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
|
| + DECLARE_HYDROGEN_ACCESSOR(Constant)
|
|
|
| - private:
|
| - double value_;
|
| + double value() const { return hydrogen()->DoubleValue(); }
|
| };
|
|
|
|
|
| -class LConstantT: public LConstant<0> {
|
| +class LConstantT: public LTemplateInstruction<1, 0, 0> {
|
| public:
|
| - explicit LConstantT(Handle<Object> value) : value_(value) { }
|
| - Handle<Object> value() const { return value_; }
|
| -
|
| DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
|
| + DECLARE_HYDROGEN_ACCESSOR(Constant)
|
|
|
| - private:
|
| - Handle<Object> value_;
|
| + Handle<Object> value() const { return hydrogen()->handle(); }
|
| };
|
|
|
|
|
| @@ -1763,6 +1639,24 @@
|
| };
|
|
|
|
|
| +class LIsConstructCall: public LTemplateInstruction<1, 0, 0> {
|
| + public:
|
| + DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is-construct-call")
|
| + DECLARE_HYDROGEN_ACCESSOR(IsConstructCall)
|
| +};
|
| +
|
| +
|
| +class LIsConstructCallAndBranch: public LControlInstruction<0, 1> {
|
| + public:
|
| + explicit LIsConstructCallAndBranch(LOperand* temp) {
|
| + temps_[0] = temp;
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
|
| + "is-construct-call-and-branch")
|
| +};
|
| +
|
| +
|
| class LDeleteProperty: public LTemplateInstruction<1, 2, 0> {
|
| public:
|
| LDeleteProperty(LOperand* obj, LOperand* key) {
|
|
|