summaryrefslogtreecommitdiff
path: root/deps/v8/src/crankshaft/ia32/lithium-ia32.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/crankshaft/ia32/lithium-ia32.h')
-rw-r--r--deps/v8/src/crankshaft/ia32/lithium-ia32.h122
1 files changed, 42 insertions, 80 deletions
diff --git a/deps/v8/src/crankshaft/ia32/lithium-ia32.h b/deps/v8/src/crankshaft/ia32/lithium-ia32.h
index e22ab437fc..68541a48c4 100644
--- a/deps/v8/src/crankshaft/ia32/lithium-ia32.h
+++ b/deps/v8/src/crankshaft/ia32/lithium-ia32.h
@@ -33,9 +33,7 @@ class LCodeGen;
V(BitI) \
V(BoundsCheck) \
V(Branch) \
- V(CallJSFunction) \
V(CallWithDescriptor) \
- V(CallFunction) \
V(CallNewArray) \
V(CallRuntime) \
V(CheckArrayBufferNotNeutered) \
@@ -105,12 +103,14 @@ class LCodeGen;
V(MathAbs) \
V(MathClz32) \
V(MathExp) \
- V(MathFloor) \
+ V(MathFloorD) \
+ V(MathFloorI) \
V(MathFround) \
V(MathLog) \
V(MathMinMax) \
V(MathPowHalf) \
- V(MathRound) \
+ V(MathRoundD) \
+ V(MathRoundI) \
V(MathSqrt) \
V(MaybeGrowElements) \
V(ModByConstI) \
@@ -135,7 +135,6 @@ class LCodeGen;
V(StackCheck) \
V(StoreCodeEntry) \
V(StoreContextSlot) \
- V(StoreFrameContext) \
V(StoreKeyed) \
V(StoreKeyedGeneric) \
V(StoreNamedField) \
@@ -147,7 +146,6 @@ class LCodeGen;
V(SubI) \
V(TaggedToI) \
V(ThisFunction) \
- V(ToFastProperties) \
V(TransitionElementsKind) \
V(TrapAllocationMemento) \
V(Typeof) \
@@ -156,7 +154,6 @@ class LCodeGen;
V(UnknownOSRValue) \
V(WrapReceiver)
-
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const final { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) final; \
@@ -228,6 +225,13 @@ class LInstruction : public ZoneObject {
void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
bool IsCall() const { return IsCallBits::decode(bit_field_); }
+ void MarkAsSyntacticTailCall() {
+ bit_field_ = IsSyntacticTailCallBits::update(bit_field_, true);
+ }
+ bool IsSyntacticTailCall() const {
+ return IsSyntacticTailCallBits::decode(bit_field_);
+ }
+
// Interface to the register allocator and iterators.
bool ClobbersTemps() const { return IsCall(); }
bool ClobbersRegisters() const { return IsCall(); }
@@ -262,6 +266,8 @@ class LInstruction : public ZoneObject {
virtual LOperand* TempAt(int i) = 0;
class IsCallBits: public BitField<bool, 0, 1> {};
+ class IsSyntacticTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {
+ };
LEnvironment* environment_;
SetOncePointer<LPointerMap> pointer_map_;
@@ -539,6 +545,7 @@ class LApplyArguments final : public LTemplateInstruction<1, 4, 0> {
LOperand* elements() { return inputs_[3]; }
DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments")
+ DECLARE_HYDROGEN_ACCESSOR(ApplyArguments)
};
@@ -808,23 +815,43 @@ class LCompareNumericAndBranch final : public LControlInstruction<2, 0> {
void PrintDataTo(StringStream* stream) override;
};
+// Math.floor with a double result.
+class LMathFloorD final : public LTemplateInstruction<1, 1, 0> {
+ public:
+ explicit LMathFloorD(LOperand* value) { inputs_[0] = value; }
+
+ LOperand* value() { return inputs_[0]; }
-class LMathFloor final : public LTemplateInstruction<1, 1, 0> {
+ DECLARE_CONCRETE_INSTRUCTION(MathFloorD, "math-floor-d")
+ DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
+};
+
+// Math.floor with an integer result.
+class LMathFloorI final : public LTemplateInstruction<1, 1, 0> {
public:
- explicit LMathFloor(LOperand* value) {
- inputs_[0] = value;
- }
+ explicit LMathFloorI(LOperand* value) { inputs_[0] = value; }
LOperand* value() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor")
+ DECLARE_CONCRETE_INSTRUCTION(MathFloorI, "math-floor-i")
DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
};
+// Math.round with a double result.
+class LMathRoundD final : public LTemplateInstruction<1, 1, 0> {
+ public:
+ explicit LMathRoundD(LOperand* value) { inputs_[0] = value; }
+
+ LOperand* value() { return inputs_[0]; }
+
+ DECLARE_CONCRETE_INSTRUCTION(MathRoundD, "math-round-d")
+ DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
+};
-class LMathRound final : public LTemplateInstruction<1, 1, 1> {
+// Math.round with an integer result.
+class LMathRoundI final : public LTemplateInstruction<1, 1, 1> {
public:
- LMathRound(LOperand* value, LOperand* temp) {
+ LMathRoundI(LOperand* value, LOperand* temp) {
inputs_[0] = value;
temps_[0] = temp;
}
@@ -832,7 +859,7 @@ class LMathRound final : public LTemplateInstruction<1, 1, 1> {
LOperand* temp() { return temps_[0]; }
LOperand* value() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
+ DECLARE_CONCRETE_INSTRUCTION(MathRoundI, "math-round-i")
DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
};
@@ -1723,23 +1750,6 @@ class LDeclareGlobals final : public LTemplateInstruction<0, 1, 0> {
};
-class LCallJSFunction final : public LTemplateInstruction<1, 1, 0> {
- public:
- explicit LCallJSFunction(LOperand* function) {
- inputs_[0] = function;
- }
-
- LOperand* function() { return inputs_[0]; }
-
- DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
- DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
-
- void PrintDataTo(StringStream* stream) override;
-
- int arity() const { return hydrogen()->argument_count() - 1; }
-};
-
-
class LCallWithDescriptor final : public LTemplateResultInstruction<1> {
public:
LCallWithDescriptor(CallInterfaceDescriptor descriptor,
@@ -1798,29 +1808,6 @@ class LInvokeFunction final : public LTemplateInstruction<1, 2, 0> {
};
-class LCallFunction final : public LTemplateInstruction<1, 2, 2> {
- public:
- LCallFunction(LOperand* context, LOperand* function, LOperand* slot,
- LOperand* vector) {
- inputs_[0] = context;
- inputs_[1] = function;
- temps_[0] = slot;
- temps_[1] = vector;
- }
-
- LOperand* context() { return inputs_[0]; }
- LOperand* function() { return inputs_[1]; }
- LOperand* temp_slot() { return temps_[0]; }
- LOperand* temp_vector() { return temps_[1]; }
-
- DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
- DECLARE_HYDROGEN_ACCESSOR(CallFunction)
-
- void PrintDataTo(StringStream* stream) override;
- int arity() const { return hydrogen()->argument_count() - 1; }
-};
-
-
class LCallNewArray final : public LTemplateInstruction<1, 2, 0> {
public:
LCallNewArray(LOperand* context, LOperand* constructor) {
@@ -2415,19 +2402,6 @@ class LAllocate final : public LTemplateInstruction<1, 2, 1> {
};
-class LToFastProperties final : public LTemplateInstruction<1, 1, 0> {
- public:
- explicit LToFastProperties(LOperand* value) {
- inputs_[0] = value;
- }
-
- LOperand* value() { return inputs_[0]; }
-
- DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
- DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
-};
-
-
class LTypeof final : public LTemplateInstruction<1, 2, 0> {
public:
LTypeof(LOperand* context, LOperand* value) {
@@ -2542,18 +2516,6 @@ class LLoadFieldByIndex final : public LTemplateInstruction<1, 2, 0> {
};
-class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
- public:
- explicit LStoreFrameContext(LOperand* context) {
- inputs_[0] = context;
- }
-
- LOperand* context() { return inputs_[0]; }
-
- DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context")
-};
-
-
class LChunkBuilder;
class LPlatformChunk final : public LChunk {
public: