5 #ifndef V8_IA32_LITHIUM_IA32_H_
6 #define V8_IA32_LITHIUM_IA32_H_
18 class RCodeVisualizer;
24 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
25 V(AccessArgumentsAt) \
27 V(AllocateBlockContext) \
30 V(ArgumentsElements) \
38 V(CallWithDescriptor) \
44 V(CheckInstanceType) \
53 V(ClassOfTestAndBranch) \
54 V(CompareMinusZeroAndBranch) \
55 V(CompareNumericAndBranch) \
56 V(CmpObjectEqAndBranch) \
80 V(FlooringDivByConstI) \
81 V(FlooringDivByPowerOf2I) \
86 V(GetCachedArrayIndex) \
88 V(HasCachedArrayIndexAndBranch) \
89 V(HasInstanceTypeAndBranch) \
90 V(InnerAllocatedObject) \
92 V(InstanceOfKnownGlobal) \
94 V(Integer32ToDouble) \
96 V(IsConstructCallAndBranch) \
97 V(IsObjectAndBranch) \
98 V(IsStringAndBranch) \
100 V(IsUndetectableAndBranch) \
104 V(LoadFieldByIndex) \
105 V(LoadFunctionPrototype) \
107 V(LoadGlobalGeneric) \
109 V(LoadKeyedGeneric) \
111 V(LoadNamedGeneric) \
138 V(SeqStringGetChar) \
139 V(SeqStringSetChar) \
145 V(StoreContextSlot) \
146 V(StoreFrameContext) \
149 V(StoreKeyedGeneric) \
151 V(StoreNamedGeneric) \
153 V(StringCharCodeAt) \
154 V(StringCharFromCode) \
155 V(StringCompareAndBranch) \
158 V(TailCallThroughMegamorphicCache) \
160 V(ToFastProperties) \
161 V(TransitionElementsKind) \
162 V(TrapAllocationMemento) \
164 V(TypeofIsAndBranch) \
170 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
171 virtual Opcode opcode() const FINAL OVERRIDE { \
172 return LInstruction::k##type; \
174 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
175 virtual const char* Mnemonic() const FINAL OVERRIDE { \
178 static L##type* cast(LInstruction* instr) { \
179 DCHECK(instr->Is##type()); \
180 return reinterpret_cast<L##type*>(instr); \
184 #define DECLARE_HYDROGEN_ACCESSOR(type) \
185 H##type* hydrogen() const { \
186 return H##type::cast(hydrogen_value()); \
190 class LInstruction :
public ZoneObject {
208 #define DECLARE_OPCODE(type) k##type,
211 #undef DECLARE_OPCODE
217 #define DECLARE_PREDICATE(type) \
218 bool Is##type() const { return opcode() == k##type; }
220 #undef DECLARE_PREDICATE
224 virtual bool IsGap()
const {
return false; }
291 class LTemplateResultInstruction :
public LInstruction {
309 template<
int R,
int I,
int T>
310 class LTemplateInstruction :
public LTemplateResultInstruction<R> {
312 EmbeddedContainer<LOperand*, I>
inputs_;
313 EmbeddedContainer<LOperand*, T>
temps_;
325 class LGap :
public LTemplateInstruction<0, 0, 0> {
339 return reinterpret_cast<LGap*
>(instr);
372 class LInstructionGap
FINAL :
public LGap {
377 return !IsRedundant();
384 class LGoto
FINAL :
public LTemplateInstruction<0, 0, 0> {
386 explicit LGoto(HBasicBlock* block) : block_(block) { }
390 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
391 virtual
bool IsControl() const
OVERRIDE {
return true; }
393 int block_id()
const {
return block_->block_id(); }
405 class LLazyBailout
FINAL :
public LTemplateInstruction<0, 0, 0> {
411 class LDummy
FINAL :
public LTemplateInstruction<1, 0, 0> {
418 class LDummyUse
FINAL :
public LTemplateInstruction<1, 1, 0> {
427 class LDeoptimize
FINAL :
public LTemplateInstruction<0, 0, 0> {
438 :
LGap(block), replacement_(
NULL) { }
445 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
447 int block_id()
const {
return block()->block_id(); }
457 LLabel* replacement_;
461 class LParameter
FINAL :
public LTemplateInstruction<1, 0, 0> {
470 class LCallStub
FINAL :
public LTemplateInstruction<1, 1, 0> {
473 inputs_[0] = context;
483 class LTailCallThroughMegamorphicCache
FINAL
489 inputs_[0] = context;
490 inputs_[1] = receiver;
499 "tail-call-through-megamorphic-cache")
513 template<
int I,
int T>
514 class LControlInstruction:
public LTemplateInstruction<0, I, T> {
531 if (true_label_ ==
NULL) {
537 if (false_label_ ==
NULL) {
557 class LWrapReceiver
FINAL :
public LTemplateInstruction<1, 2, 1> {
562 inputs_[0] = receiver;
563 inputs_[1] =
function;
582 inputs_[0] =
function;
583 inputs_[1] = receiver;
585 inputs_[3] = elements;
597 class LAccessArgumentsAt
FINAL :
public LTemplateInstruction<1, 3, 0> {
600 inputs_[0] = arguments;
611 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
618 inputs_[0] = elements;
627 class LArgumentsElements
FINAL :
public LTemplateInstruction<1, 0, 0> {
634 class LDebugBreak
FINAL : public LTemplateInstruction<0, 0, 0> {
640 class LModByPowerOf2I
FINAL :
public LTemplateInstruction<1, 1, 0> {
643 inputs_[0] = dividend;
664 inputs_[0] = dividend;
703 inputs_[0] = dividend;
724 inputs_[0] = dividend;
746 inputs_[0] = dividend;
747 inputs_[1] = divisor;
763 inputs_[0] = dividend;
771 "flooring-div-by-power-of-2-i")
786 inputs_[0] = dividend;
810 inputs_[0] = dividend;
811 inputs_[1] = divisor;
852 "compare-numeric-and-branch")
855 Token::
Value op()
const {
return hydrogen()->token(); }
856 bool is_double()
const {
857 return hydrogen()->representation().IsDouble();
860 virtual void PrintDataTo(StringStream* stream);
864 class LMathFloor
FINAL :
public LTemplateInstruction<1, 1, 0> {
902 class LMathAbs
FINAL :
public LTemplateInstruction<1, 2, 0> {
905 inputs_[1] = context;
929 class LMathClz32
FINAL :
public LTemplateInstruction<1, 1, 0> {
941 class LMathExp
FINAL :
public LTemplateInstruction<1, 1, 2> {
949 ExternalReference::InitializeMathExpData();
960 class LMathSqrt
FINAL :
public LTemplateInstruction<1, 1, 0> {
972 class LMathPowHalf
FINAL :
public LTemplateInstruction<1, 1, 1> {
986 class LCmpObjectEqAndBranch
FINAL :
public LControlInstruction<2, 0> {
1000 class LCmpHoleAndBranch
FINAL :
public LControlInstruction<1, 0> {
1003 inputs_[0] = object;
1024 "cmp-minus-zero-and-branch")
1041 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1058 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1073 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1088 "is-undetectable-and-branch")
1091 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1098 inputs_[0] = context;
1108 "string-compare-and-branch")
1111 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1117 class LHasInstanceTypeAndBranch
FINAL :
public LControlInstruction<1, 1> {
1128 "has-instance-type-and-branch")
1131 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1148 class LHasCachedArrayIndexAndBranch
FINAL
1158 "has-cached-array-index-and-branch")
1160 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1173 "is-construct-call-and-branch")
1177 class LClassOfTestAndBranch
FINAL :
public LControlInstruction<1, 2> {
1190 "class-of-test-and-branch")
1193 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1200 inputs_[0] = context;
1213 class LInstanceOf
FINAL :
public LTemplateInstruction<1, 3, 0> {
1216 inputs_[0] = context;
1227 class LInstanceOfKnownGlobal
FINAL :
public LTemplateInstruction<1, 2, 1> {
1230 inputs_[0] = context;
1240 "instance-of-known-global")
1245 return lazy_deopt_env_;
1249 lazy_deopt_env_ = env;
1253 LEnvironment* lazy_deopt_env_;
1257 class LBoundsCheck
FINAL :
public LTemplateInstruction<0, 2, 0> {
1261 inputs_[1] = length;
1289 class LShiftI
FINAL :
public LTemplateInstruction<1, 2, 0> {
1292 : op_(op), can_deopt_(can_deopt) {
1311 class LSubI
FINAL :
public LTemplateInstruction<1, 2, 0> {
1331 int32_t value()
const {
return hydrogen()->Integer32Value(); }
1335 class LConstantS
FINAL :
public LTemplateInstruction<1, 0, 0> {
1344 class LConstantD
FINAL :
public LTemplateInstruction<1, 0, 1> {
1355 double value()
const {
return hydrogen()->DoubleValue(); }
1359 class LConstantE
FINAL :
public LTemplateInstruction<1, 0, 0> {
1364 ExternalReference value()
const {
1365 return hydrogen()->ExternalReferenceValue();
1370 class LConstantT
FINAL :
public LTemplateInstruction<1, 0, 0> {
1376 return hydrogen()->handle(isolate);
1381 class LBranch
FINAL :
public LControlInstruction<1, 1> {
1394 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1413 class LMapEnumLength
FINAL :
public LTemplateInstruction<1, 1, 0> {
1425 class LDateField
FINAL :
public LTemplateInstruction<1, 1, 1> {
1439 Smi* index()
const {
return index_; }
1446 class LSeqStringGetChar
FINAL :
public LTemplateInstruction<1, 2, 0> {
1449 inputs_[0] = string;
1467 inputs_[0] = context;
1468 inputs_[1] = string;
1494 add->BetterLeftOperand()->UseCount() > 1;
1546 return LInstruction::kArithmeticD;
1563 inputs_[0] = context;
1573 return LInstruction::kArithmeticT;
1585 class LReturn
FINAL :
public LTemplateInstruction<0, 3, 0> {
1591 inputs_[1] = context;
1592 inputs_[2] = parameter_count;
1596 return parameter_count()->IsConstantOperand();
1599 DCHECK(has_constant_parameter_count());
1600 return LConstantOperand::cast(parameter_count());
1612 inputs_[0] = object;
1625 inputs_[0] = context;
1626 inputs_[1] = object;
1641 class LLoadFunctionPrototype
FINAL :
public LTemplateInstruction<1, 1, 1> {
1644 inputs_[0] =
function;
1661 Heap::RootListIndex index()
const {
return hydrogen()->index(); }
1665 class LLoadKeyed
FINAL :
public LTemplateInstruction<1, 2, 0> {
1668 inputs_[0] = elements;
1674 return hydrogen()->elements_kind();
1677 return hydrogen()->is_external();
1680 return hydrogen()->is_fixed_typed_array();
1683 return is_external() || is_fixed_typed_array();
1689 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1690 uint32_t base_offset()
const {
return hydrogen()->base_offset(); }
1692 return hydrogen()->key()->representation().IsTagged();
1703 return key_representation.
IsSmi() &&
1713 class LLoadKeyedGeneric
FINAL :
public LTemplateInstruction<1, 3, 1> {
1717 inputs_[0] = context;
1744 inputs_[0] = context;
1745 inputs_[1] = global_object;
1761 class LStoreGlobalCell
FINAL :
public LTemplateInstruction<0, 1, 0> {
1777 inputs_[0] = context;
1785 int slot_index() {
return hydrogen()->slot_index(); }
1794 inputs_[0] = context;
1806 int slot_index() {
return hydrogen()->slot_index(); }
1824 class LDrop
FINAL :
public LTemplateInstruction<0, 0, 0> {
1826 explicit LDrop(
int count) : count_(count) { }
1840 inputs_[0] =
function;
1841 inputs_[1] = code_object;
1857 inputs_[0] = base_object;
1858 inputs_[1] = offset;
1887 inputs_[0] = context;
1900 inputs_[0] =
function;
1908 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1910 int arity()
const {
return hydrogen()->argument_count() - 1; }
1914 class LCallWithDescriptor
FINAL :
public LTemplateResultInstruction<1> {
1918 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1920 inputs_.AddAll(operands, zone);
1930 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1932 int arity()
const {
return hydrogen()->argument_count() - 1; }
1945 class LInvokeFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1948 inputs_[0] = context;
1949 inputs_[1] =
function;
1958 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1960 int arity()
const {
return hydrogen()->argument_count() - 1; }
1964 class LCallFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1967 inputs_[0] = context;
1968 inputs_[1] =
function;
1977 int arity()
const {
return hydrogen()->argument_count() - 1; }
1981 class LCallNew
FINAL :
public LTemplateInstruction<1, 2, 0> {
1984 inputs_[0] = context;
1985 inputs_[1] = constructor;
1994 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1996 int arity()
const {
return hydrogen()->argument_count() - 1; }
2000 class LCallNewArray
FINAL :
public LTemplateInstruction<1, 2, 0> {
2003 inputs_[0] = context;
2004 inputs_[1] = constructor;
2013 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2015 int arity()
const {
return hydrogen()->argument_count() - 1; }
2019 class LCallRuntime
FINAL :
public LTemplateInstruction<1, 1, 0> {
2022 inputs_[0] = context;
2035 int arity()
const {
return hydrogen()->argument_count(); }
2040 class LInteger32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
2052 class LUint32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
2064 class LNumberTagI
FINAL :
public LTemplateInstruction<1, 1, 1> {
2078 class LNumberTagU
FINAL :
public LTemplateInstruction<1, 1, 1> {
2092 class LNumberTagD
FINAL :
public LTemplateInstruction<1, 1, 1> {
2121 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2125 class LDoubleToSmi
FINAL :
public LTemplateInstruction<1, 1, 0> {
2152 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2156 class LSmiTag
FINAL :
public LTemplateInstruction<1, 1, 0> {
2187 : needs_check_(needs_check) {
2195 bool needs_check()
const {
return needs_check_; }
2202 class LStoreNamedField
FINAL :
public LTemplateInstruction<0, 2, 2> {
2211 temps_[1] = temp_map;
2222 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2229 inputs_[0] = context;
2230 inputs_[1] = object;
2241 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2247 class LStoreKeyed
FINAL :
public LTemplateInstruction<0, 3, 0> {
2257 return hydrogen()->is_fixed_typed_array();
2260 return is_external() || is_fixed_typed_array();
2266 return hydrogen()->elements_kind();
2272 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2273 uint32_t base_offset()
const {
return hydrogen()->base_offset(); }
2278 class LStoreKeyedGeneric
FINAL :
public LTemplateInstruction<0, 4, 0> {
2284 inputs_[0] = context;
2285 inputs_[1] = object;
2298 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2304 class LTransitionElementsKind
FINAL :
public LTemplateInstruction<0, 2, 2> {
2310 inputs_[0] = object;
2311 inputs_[1] = context;
2312 temps_[0] = new_map_temp;
2322 "transition-elements-kind")
2325 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2327 Handle<
Map> original_map() {
return hydrogen()->original_map().handle(); }
2329 return hydrogen()->transitioned_map().handle();
2336 class LTrapAllocationMemento
FINAL :
public LTemplateInstruction<0, 1, 1> {
2340 inputs_[0] = object;
2348 "trap-allocation-memento")
2352 class LStringAdd
FINAL :
public LTemplateInstruction<1, 3, 0> {
2355 inputs_[0] = context;
2372 inputs_[0] = context;
2373 inputs_[1] = string;
2389 inputs_[0] = context;
2390 inputs_[1] = char_code;
2454 class LClampDToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
2466 class LClampIToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
2478 class LClampTToUint8
FINAL :
public LTemplateInstruction<1, 1, 1> {
2482 temps_[0] = temp_xmm;
2492 class LCheckNonSmi
FINAL :
public LTemplateInstruction<0, 1, 0> {
2532 class LAllocate
FINAL :
public LTemplateInstruction<1, 2, 1> {
2535 inputs_[0] = context;
2552 inputs_[0] = context;
2565 inputs_[0] = context;
2591 inputs_[0] = context;
2602 class LTypeofIsAndBranch
FINAL :
public LControlInstruction<1, 0> {
2628 class LStackCheck
FINAL :
public LTemplateInstruction<0, 1, 0> {
2631 inputs_[0] = context;
2639 Label* done_label() {
return &done_label_; }
2646 class LForInPrepareMap
FINAL :
public LTemplateInstruction<1, 2, 0> {
2649 inputs_[0] = context;
2650 inputs_[1] = object;
2660 class LForInCacheArray
FINAL :
public LTemplateInstruction<1, 1, 0> {
2671 return HForInCacheArray::cast(this->hydrogen_value())->idx();
2676 class LCheckMapValue
FINAL :
public LTemplateInstruction<0, 2, 0> {
2690 class LLoadFieldByIndex
FINAL :
public LTemplateInstruction<1, 2, 0> {
2693 inputs_[0] = object;
2704 class LStoreFrameContext:
public LTemplateInstruction<0, 1, 0> {
2707 inputs_[0] = context;
2716 class LAllocateBlockContext:
public LTemplateInstruction<1, 2, 0> {
2719 inputs_[0] = context;
2720 inputs_[1] =
function;
2733 class LChunkBuilder;
2738 num_double_slots_(0) { }
2754 current_instruction_(
NULL),
2755 current_block_(
NULL),
2757 allocator_(allocator) {}
2763 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2883 HBasicBlock* current_block_;
2884 HBasicBlock* next_block_;
2885 LAllocator* allocator_;
2890 #undef DECLARE_HYDROGEN_ACCESSOR
2891 #undef DECLARE_CONCRETE_INSTRUCTION
The superclass of all JavaScript values and objects.
static U update(U previous, T value)
int GetRegisterParameterCount() const
Source to read snapshot and builtins files from.
LInstructionGap(HBasicBlock *block)
LCallJSFunction(LOperand *function)
LSmiUntag(LOperand *value, bool needs_check)
LInstruction * DoDivByPowerOf2I(HDiv *instr)
LCheckSmi(LOperand *value)
LTypeofIsAndBranch(LOperand *value)
MUST_USE_RESULT LOperand * UseFixedDouble(HValue *value, XMMRegister fixed_register)
LBoundsCheck(LOperand *index, LOperand *length)
DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, "is-undetectable-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
virtual LOperand * TempAt(int i) FINAL OVERRIDE
MUST_USE_RESULT LUnallocated * TempRegister()
LTrapAllocationMemento(LOperand *object, LOperand *temp)
LIsSmiAndBranch(LOperand *value)
LMathExp(LOperand *value, LOperand *temp1, LOperand *temp2)
LDivByPowerOf2I(LOperand *dividend, int32_t divisor)
LUint32ToDouble(LOperand *value)
LModByPowerOf2I(LOperand *dividend, int32_t divisor)
LStringCharCodeAt(LOperand *context, LOperand *string, LOperand *index)
LInstruction * DoArithmeticT(Token::Value op, HBinaryOperation *instr)
LPower(LOperand *left, LOperand *right)
LStringCompareAndBranch(LOperand *context, LOperand *left, LOperand *right)
LUnallocated * ToUnallocated(XMMRegister reg)
MUST_USE_RESULT LOperand * UseFixedOrConstant(HValue *value, Register fixed_register)
virtual bool ClobbersDoubleRegisters(Isolate *isolate) const OVERRIDE
LInnerAllocatedObject(LOperand *base_object, LOperand *offset)
LCmpObjectEqAndBranch(LOperand *left, LOperand *right)
LInstruction * DoFlooringDivByPowerOf2I(HMathFloorOfDiv *instr)
virtual Opcode opcode() const OVERRIDE
LStoreNamedGeneric(LOperand *context, LOperand *object, LOperand *value)
LMathClz32(LOperand *value)
LMathMinMax(LOperand *left, LOperand *right)
LConstructDouble(LOperand *hi, LOperand *lo)
LMathPowHalf(LOperand *value, LOperand *temp)
LShiftI(Token::Value op, LOperand *left, LOperand *right, bool can_deopt)
LLoadContextSlot(LOperand *context)
virtual void PrintDataTo(StringStream *stream) OVERRIDE
LInstruction * DefineSameAsFirst(LTemplateResultInstruction< 1 > *instr)
LBitI(LOperand *left, LOperand *right)
MUST_USE_RESULT LOperand * FixedTemp(XMMRegister reg)
LDoubleBits(LOperand *value)
LDeclareGlobals(LOperand *context)
LIsUndetectableAndBranch(LOperand *value, LOperand *temp)
virtual void CompileToNative(LCodeGen *generator) OVERRIDE
LApplyArguments(LOperand *function, LOperand *receiver, LOperand *length, LOperand *elements)
LCheckInstanceType(LOperand *value, LOperand *temp)
LStringAdd(LOperand *context, LOperand *left, LOperand *right)
MUST_USE_RESULT LOperand * Use(HValue *value)
MUST_USE_RESULT LOperand * UseAtStart(HValue *value)
MUST_USE_RESULT LOperand * UseConstant(HValue *value)
bool has_constant_parameter_count()
MUST_USE_RESULT LOperand * UseOrConstantAtStart(HValue *value)
SaveFPRegsMode save_doubles() const
LInteger32ToDouble(LOperand *value)
virtual int TempCount() FINAL OVERRIDE
LForInCacheArray(LOperand *map)
LModByConstI(LOperand *dividend, int32_t divisor, LOperand *temp1, LOperand *temp2)
LCmpT(LOperand *context, LOperand *left, LOperand *right)
LInstruction * DoMathAbs(HUnaryMathOperation *instr)
LBranch(LOperand *value, LOperand *temp)
LLabel * replacement() const
LCompareMinusZeroAndBranch(LOperand *value, LOperand *temp)
LLoadKeyedGeneric(LOperand *context, LOperand *obj, LOperand *key, LOperand *vector)
LClampIToUint8(LOperand *value)
LDummyUse(LOperand *value)
LInstruction * DoMathExp(HUnaryMathOperation *instr)
MUST_USE_RESULT LOperand * UseTempRegister(HValue *value)
DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, "has-instance-type-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LInstruction * DoModByPowerOf2I(HMod *instr)
LInstruction * AssignEnvironment(LInstruction *instr)
bool is_fixed_typed_array() const
LDoubleToI(LOperand *value, LOperand *temp)
LLoadNamedField(LOperand *object)
LDateField(LOperand *date, LOperand *temp, Smi *index)
LAddI(LOperand *left, LOperand *right)
LMathRound(LOperand *value, LOperand *temp)
LInstruction * Define(LTemplateResultInstruction< 1 > *instr, LUnallocated *result)
LDoubleToSmi(LOperand *value)
LCmpHoleAndBranch(LOperand *object)
LInstruction * AssignPointerMap(LInstruction *instr)
LMathFloor(LOperand *value)
LInstruction * DoMathFloor(HUnaryMathOperation *instr)
LIsStringAndBranch(LOperand *value, LOperand *temp)
LInstruction * DoMathRound(HUnaryMathOperation *instr)
LGoto(HBasicBlock *block)
LClassOfTestAndBranch(LOperand *value, LOperand *temp, LOperand *temp2)
LConstantD(LOperand *temp)
LCallNew(LOperand *context, LOperand *constructor)
LStackCheck(LOperand *context)
LAllocate(LOperand *context, LOperand *size, LOperand *temp)
LLoadFieldByIndex(LOperand *object, LOperand *index)
virtual LOperand * InputAt(int i) FINAL OVERRIDE
virtual bool IsControl() const OVERRIDE
void DoBasicBlock(HBasicBlock *block, HBasicBlock *next_block)
LNumberTagI(LOperand *value, LOperand *temp)
LDivByConstI(LOperand *dividend, int32_t divisor, LOperand *temp1, LOperand *temp2)
LArgumentsLength(LOperand *elements)
LTaggedToI(LOperand *value, LOperand *temp)
LIsConstructCallAndBranch(LOperand *temp)
LMathFround(LOperand *value)
LLoadNamedGeneric(LOperand *context, LOperand *object, LOperand *vector)
LCheckMapValue(LOperand *value, LOperand *map)
LArithmeticT(Token::Value op, LOperand *context, LOperand *left, LOperand *right)
bool jumps_to_join() const
LGetCachedArrayIndex(LOperand *value)
LOperand * GetNextSpillSlot(RegisterKind kind)
LConstantOperand * constant_parameter_count()
LCallNewArray(LOperand *context, LOperand *constructor)
LFlooringDivI(LOperand *dividend, LOperand *divisor, LOperand *temp)
DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, "class-of-test-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LNumberTagU(LOperand *value, LOperand *temp)
DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, "string-compare-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LNumberTagD(LOperand *value, LOperand *temp)
LClampTToUint8(LOperand *value, LOperand *temp_xmm)
LOperand * new_map_temp()
LForInPrepareMap(LOperand *context, LOperand *object)
LMapEnumLength(LOperand *value)
LInstruction * DefineAsSpilled(LTemplateResultInstruction< 1 > *instr, int index)
LStoreCodeEntry(LOperand *function, LOperand *code_object)
LOperand * offset() const
LSeqStringGetChar(LOperand *string, LOperand *index)
MUST_USE_RESULT LOperand * UseRegisterAtStart(HValue *value)
LInstruction * DoMathPowHalf(HUnaryMathOperation *instr)
LInvokeFunction(LOperand *context, LOperand *function)
LSubI(LOperand *left, LOperand *right)
LCheckMaps(LOperand *value=NULL)
LInstruction * DoFlooringDivByConstI(HMathFloorOfDiv *instr)
bool is_typed_elements() const
LLabel(HBasicBlock *block)
LFlooringDivByConstI(LOperand *dividend, int32_t divisor, LOperand *temp1, LOperand *temp2, LOperand *temp3)
bool HasReplacement() const
LInstruction * DoModByConstI(HMod *instr)
MUST_USE_RESULT LOperand * Use(HValue *value, LUnallocated *operand)
LCheckValue(LOperand *value)
LModI(LOperand *left, LOperand *right, LOperand *temp)
LStringCharFromCode(LOperand *context, LOperand *char_code)
LInstruction * DoShift(Token::Value op, HBitwiseBinaryOperation *instr)
LInstruction * DoArithmeticD(Token::Value op, HArithmeticBinaryOperation *instr)
LSeqStringSetChar(LOperand *context, LOperand *string, LOperand *index, LOperand *value)
virtual int InputCount() FINAL OVERRIDE
DISALLOW_COPY_AND_ASSIGN(LChunkBuilder)
LInstruction * DoMathClz32(HUnaryMathOperation *instr)
LInstruction * DoMathSqrt(HUnaryMathOperation *instr)
ElementsKind elements_kind() const
DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, "transition-elements-kind") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LCmpMapAndBranch(LOperand *value)
LCallWithDescriptor(CallInterfaceDescriptor descriptor, const ZoneList< LOperand * > &operands, Zone *zone)
LOperand * global_object()
LCallRuntime(LOperand *context)
LLoadGlobalGeneric(LOperand *context, LOperand *global_object, LOperand *vector)
MUST_USE_RESULT LOperand * UseFixed(HValue *value, Register fixed_register)
LWrapReceiver(LOperand *receiver, LOperand *function, LOperand *temp)
LOperand * base_object() const
LInstanceOfKnownGlobal(LOperand *context, LOperand *value, LOperand *temp)
LPlatformChunk(CompilationInfo *info, HGraph *graph)
LRegExpLiteral(LOperand *context)
LOperand * GetSeqStringSetCharOperand(HSeqStringSetChar *instr)
virtual bool HasInterestingComment(LCodeGen *gen) const OVERRIDE
LOperand * string() const
LInstruction * DoMathLog(HUnaryMathOperation *instr)
LInstruction * DoDivByConstI(HDiv *instr)
void VisitInstruction(HInstruction *current)
LPushArgument(LOperand *value)
LStoreNamedField(LOperand *obj, LOperand *val, LOperand *temp, LOperand *temp_map)
LStoreKeyedGeneric(LOperand *context, LOperand *object, LOperand *key, LOperand *value)
int num_double_slots() const
bool NeedsCanonicalization()
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, "has-cached-array-index-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
MUST_USE_RESULT LOperand * UseRegister(HValue *value)
bool is_osr_entry() const
LStoreContextSlot(LOperand *context, LOperand *value, LOperand *temp)
static bool UseLea(HAdd *add)
LClampDToUint8(LOperand *value)
virtual const char * Mnemonic() const OVERRIDE
LDivI(LOperand *dividend, LOperand *divisor, LOperand *temp)
MUST_USE_RESULT LOperand * UseOrConstant(HValue *value)
LCallStub(LOperand *context)
LInstruction * DoFlooringDivI(HMathFloorOfDiv *instr)
LMathAbs(LOperand *context, LOperand *value)
LInstruction * DefineFixed(LTemplateResultInstruction< 1 > *instr, Register reg)
LCompareNumericAndBranch(LOperand *left, LOperand *right)
LInstruction * DoDivI(HDiv *instr)
LFunctionLiteral(LOperand *context)
virtual MUST_USE_RESULT LOperand * UseAny(HValue *value) OVERRIDE
LMathSqrt(LOperand *value)
MUST_USE_RESULT LOperand * FixedTemp(Register reg)
LHasInstanceTypeAndBranch(LOperand *value, LOperand *temp)
virtual void PrintDataTo(StringStream *stream)
Handle< Map > transitioned_map()
LInstruction * DefineFixedDouble(LTemplateResultInstruction< 1 > *instr, XMMRegister reg)
LMathLog(LOperand *value)
LLoadKeyed(LOperand *elements, LOperand *key)
LOperand * parameter_count()
LReturn(LOperand *value, LOperand *context, LOperand *parameter_count)
LCallFunction(LOperand *context, LOperand *function)
LNumberUntagD(LOperand *value, LOperand *temp)
LHasCachedArrayIndexAndBranch(LOperand *value)
LInstruction * DoModI(HMod *instr)
MUST_USE_RESULT LOperand * UseRegisterOrConstantAtStart(HValue *value)
void AddInstruction(LInstruction *instr, HInstruction *current)
LMulI(LOperand *left, LOperand *right, LOperand *temp)
void set_replacement(LLabel *label)
bool is_loop_header() const
LInstanceOf(LOperand *context, LOperand *left, LOperand *right)
LFlooringDivByPowerOf2I(LOperand *dividend, int32_t divisor)
LCheckNonSmi(LOperand *value)
LAccessArgumentsAt(LOperand *arguments, LOperand *length, LOperand *index)
LOperand * GetStoreKeyedValueOperand(HStoreKeyed *instr)
LUnallocated * ToUnallocated(Register reg)
LOperand * target() const
LIsObjectAndBranch(LOperand *value, LOperand *temp)
LTypeof(LOperand *context, LOperand *value)
MUST_USE_RESULT LOperand * UseRegisterOrConstant(HValue *value)
LChunkBuilder(CompilationInfo *info, HGraph *graph, LAllocator *allocator)
LArithmeticD(Token::Value op, LOperand *left, LOperand *right)
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env) OVERRIDE
LEnvironment * GetDeferredLazyDeoptimizationEnvironment()
LStoreGlobalCell(LOperand *value)
LLoadFunctionPrototype(LOperand *function, LOperand *temp)
LTransitionElementsKind(LOperand *object, LOperand *context, LOperand *new_map_temp, LOperand *temp)
LInstruction * DefineAsRegister(LTemplateResultInstruction< 1 > *instr)
DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, "instance-of-known-global") Handle< JSFunction > function() const
LToFastProperties(LOperand *value)
LTailCallThroughMegamorphicCache(LOperand *context, LOperand *receiver, LOperand *name)
LInstruction * MarkAsCall(LInstruction *instr, HInstruction *hinstr, CanDeoptimize can_deoptimize=CANNOT_DEOPTIMIZE_EAGERLY)
LInstruction * DoMathFround(HUnaryMathOperation *instr)
int GetNextSpillIndex(RegisterKind kind)
LStoreKeyed(LOperand *obj, LOperand *key, LOperand *val)
static HValue * cast(HValue *value)
Handle< ScopeInfo > scope_info()
LAllocateBlockContext(LOperand *context, LOperand *function)
int LookupDestination(int block_id) const
Label * GetAssemblyLabel(int block_id) const
HControlInstruction * hydrogen()
virtual bool IsControl() const FINAL OVERRIDE
int FalseDestination(LChunk *chunk)
HBasicBlock * SuccessorAt(int i)
Label * FalseLabel(LChunk *chunk)
int TrueDestination(LChunk *chunk)
Label * TrueLabel(LChunk *chunk)
virtual void PrintDataTo(StringStream *stream) OVERRIDE
virtual bool IsGap() const FINAL OVERRIDE
static LGap * cast(LInstruction *instr)
LParallelMove * GetParallelMove(InnerPosition pos)
HBasicBlock * block() const
LParallelMove * parallel_moves_[LAST_INNER_POSITION+1]
LParallelMove * GetOrCreateParallelMove(InnerPosition pos, Zone *zone)
SetOncePointer< LPointerMap > pointer_map_
virtual int InputCount()=0
void set_environment(LEnvironment *env)
bool HasDoubleRegisterInput()
virtual bool HasResult() const =0
friend class TempIterator
bool HasPointerMap() const
virtual void PrintDataTo(StringStream *stream)
virtual int TempCount()=0
virtual const char * Mnemonic() const =0
virtual LOperand * TempAt(int i)=0
bool HasDoubleRegisterResult()
LEnvironment * environment() const
@ LITHIUM_CONCRETE_INSTRUCTION_LIST
virtual LOperand * InputAt(int i)=0
void set_hydrogen_value(HValue *value)
virtual LOperand * result() const =0
virtual void PrintTo(StringStream *stream)
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env)
HValue * hydrogen_value() const
bool HasEnvironment() const
void set_pointer_map(LPointerMap *p)
friend class InputIterator
LEnvironment * environment_
virtual Opcode opcode() const =0
virtual bool ClobbersDoubleRegisters(Isolate *isolate) const
bool ClobbersTemps() const
bool ClobbersRegisters() const
virtual bool HasInterestingComment(LCodeGen *gen) const
virtual void CompileToNative(LCodeGen *generator)=0
virtual bool IsControl() const
LPointerMap * pointer_map() const
virtual bool IsGap() const
virtual void PrintOutputOperandTo(StringStream *stream)
LStoreFrameContext(LOperand *context)
EmbeddedContainer< LOperand *, I > inputs_
virtual LOperand * TempAt(int i) FINAL OVERRIDE
virtual int TempCount() FINAL OVERRIDE
EmbeddedContainer< LOperand *, T > temps_
virtual LOperand * InputAt(int i) FINAL OVERRIDE
virtual int InputCount() FINAL OVERRIDE
void set_result(LOperand *operand)
virtual bool HasResult() const FINAL OVERRIDE
EmbeddedContainer< LOperand *, R > results_
LOperand * result() const
STATIC_ASSERT(R==0||R==1)
static Smi * FromInt(int value)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic)
#define DECLARE_PREDICATE(type)
#define DECLARE_OPCODE(type)
#define DECLARE_HYDROGEN_ACCESSOR(type)
#define DCHECK(condition)
static bool ExternalArrayOpRequiresTemp(Representation key_representation, ElementsKind elements_kind)
static Object * DeclareGlobals(Isolate *isolate, Handle< GlobalObject > global, Handle< String > name, Handle< Object > value, PropertyAttributes attr, bool is_var, bool is_const, bool is_function)
@ EXTERNAL_UINT8_ELEMENTS
@ EXTERNAL_UINT8_CLAMPED_ELEMENTS
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)