5 #ifndef V8_X64_LITHIUM_X64_H_
6 #define V8_X64_LITHIUM_X64_H_
20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
21 V(AccessArgumentsAt) \
24 V(AllocateBlockContext) \
26 V(ArgumentsElements) \
34 V(CallWithDescriptor) \
40 V(CheckInstanceType) \
49 V(ClassOfTestAndBranch) \
50 V(CompareMinusZeroAndBranch) \
51 V(CompareNumericAndBranch) \
52 V(CmpObjectEqAndBranch) \
76 V(FlooringDivByConstI) \
77 V(FlooringDivByPowerOf2I) \
82 V(GetCachedArrayIndex) \
84 V(HasCachedArrayIndexAndBranch) \
85 V(HasInstanceTypeAndBranch) \
86 V(InnerAllocatedObject) \
88 V(InstanceOfKnownGlobal) \
90 V(Integer32ToDouble) \
92 V(IsConstructCallAndBranch) \
93 V(IsObjectAndBranch) \
94 V(IsStringAndBranch) \
96 V(IsUndetectableAndBranch) \
101 V(LoadFieldByIndex) \
102 V(LoadFunctionPrototype) \
104 V(LoadGlobalGeneric) \
106 V(LoadKeyedGeneric) \
108 V(LoadNamedGeneric) \
134 V(SeqStringGetChar) \
135 V(SeqStringSetChar) \
141 V(StoreContextSlot) \
142 V(StoreFrameContext) \
145 V(StoreKeyedGeneric) \
147 V(StoreNamedGeneric) \
149 V(StringCharCodeAt) \
150 V(StringCharFromCode) \
151 V(StringCompareAndBranch) \
154 V(TailCallThroughMegamorphicCache) \
156 V(ToFastProperties) \
157 V(TransitionElementsKind) \
158 V(TrapAllocationMemento) \
160 V(TypeofIsAndBranch) \
166 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
167 virtual Opcode opcode() const FINAL OVERRIDE { \
168 return LInstruction::k##type; \
170 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
171 virtual const char* Mnemonic() const FINAL OVERRIDE { \
174 static L##type* cast(LInstruction* instr) { \
175 DCHECK(instr->Is##type()); \
176 return reinterpret_cast<L##type*>(instr); \
180 #define DECLARE_HYDROGEN_ACCESSOR(type) \
181 H##type* hydrogen() const { \
182 return H##type::cast(hydrogen_value()); \
186 class LInstruction :
public ZoneObject {
204 #define DECLARE_OPCODE(type) k##type,
207 #undef DECLARE_OPCODE
213 #define DECLARE_PREDICATE(type) \
214 bool Is##type() const { return opcode() == k##type; }
216 #undef DECLARE_PREDICATE
220 virtual bool IsGap()
const {
return false; }
291 class LTemplateResultInstruction :
public LInstruction {
312 template<
int R,
int I,
int T>
328 class LGap :
public LTemplateInstruction<0, 0, 0> {
343 return reinterpret_cast<LGap*
>(instr);
377 class LInstructionGap
FINAL :
public LGap {
382 return !IsRedundant();
389 class LGoto
FINAL :
public LTemplateInstruction<0, 0, 0> {
391 explicit LGoto(HBasicBlock* block) : block_(block) { }
395 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
396 virtual
bool IsControl() const
OVERRIDE {
return true; }
398 int block_id()
const {
return block_->block_id(); }
405 class LLazyBailout
FINAL :
public LTemplateInstruction<0, 0, 0> {
411 void set_gap_instructions_size(
int gap_instructions_size) {
412 gap_instructions_size_ = gap_instructions_size;
417 int gap_instructions_size_;
421 class LDummy
FINAL :
public LTemplateInstruction<1, 0, 0> {
428 class LDummyUse
FINAL :
public LTemplateInstruction<1, 1, 0> {
437 class LDeoptimize
FINAL :
public LTemplateInstruction<0, 0, 0> {
448 :
LGap(block), replacement_(
NULL) { }
455 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
457 int block_id()
const {
return block()->block_id(); }
467 LLabel* replacement_;
471 class LParameter
FINAL :
public LTemplateInstruction<1, 0, 0> {
480 class LCallStub
FINAL :
public LTemplateInstruction<1, 1, 0> {
483 inputs_[0] = context;
493 class LTailCallThroughMegamorphicCache
FINAL
499 inputs_[0] = context;
500 inputs_[1] = receiver;
509 "tail-call-through-megamorphic-cache")
523 template<
int I,
int T>
524 class LControlInstruction :
public LTemplateInstruction<0, I, T> {
541 if (true_label_ ==
NULL) {
547 if (false_label_ ==
NULL) {
567 class LWrapReceiver
FINAL :
public LTemplateInstruction<1, 2, 0> {
570 inputs_[0] = receiver;
571 inputs_[1] =
function;
588 inputs_[0] =
function;
589 inputs_[1] = receiver;
591 inputs_[3] = elements;
603 class LAccessArgumentsAt
FINAL :
public LTemplateInstruction<1, 3, 0> {
606 inputs_[0] = arguments;
617 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
624 inputs_[0] = elements;
633 class LArgumentsElements
FINAL :
public LTemplateInstruction<1, 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;
850 "compare-numeric-and-branch")
853 Token::
Value op()
const {
return hydrogen()->token(); }
854 bool is_double()
const {
855 return hydrogen()->representation().IsDouble();
858 virtual void PrintDataTo(StringStream* stream)
OVERRIDE;
862 class LMathFloor
FINAL :
public LTemplateInstruction<1, 1, 0> {
900 class LMathAbs
FINAL :
public LTemplateInstruction<1, 2, 0> {
903 inputs_[1] = context;
927 class LMathClz32
FINAL :
public LTemplateInstruction<1, 1, 0> {
939 class LMathExp
FINAL :
public LTemplateInstruction<1, 1, 2> {
945 ExternalReference::InitializeMathExpData();
956 class LMathSqrt
FINAL :
public LTemplateInstruction<1, 1, 0> {
968 class LMathPowHalf
FINAL :
public LTemplateInstruction<1, 1, 0> {
980 class LCmpObjectEqAndBranch
FINAL :
public LControlInstruction<2, 0> {
994 class LCmpHoleAndBranch
FINAL :
public LControlInstruction<1, 0> {
1016 "cmp-minus-zero-and-branch")
1033 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1050 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1065 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1080 "is-undetectable-and-branch")
1083 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1092 inputs_[0] = context;
1102 "string-compare-and-branch")
1105 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1111 class LHasInstanceTypeAndBranch
FINAL :
public LControlInstruction<1, 0> {
1120 "has-instance-type-and-branch")
1123 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1140 class LHasCachedArrayIndexAndBranch
FINAL
1150 "has-cached-array-index-and-branch")
1153 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1170 "class-of-test-and-branch")
1173 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1180 inputs_[0] = context;
1196 class LInstanceOf
FINAL :
public LTemplateInstruction<1, 3, 0> {
1199 inputs_[0] = context;
1212 class LInstanceOfKnownGlobal
FINAL :
public LTemplateInstruction<1, 2, 1> {
1215 inputs_[0] = context;
1225 "instance-of-known-global")
1230 return lazy_deopt_env_;
1234 lazy_deopt_env_ = env;
1238 LEnvironment* lazy_deopt_env_;
1242 class LBoundsCheck
FINAL :
public LTemplateInstruction<0, 2, 0> {
1246 inputs_[1] = length;
1269 return hydrogen()->representation().IsInteger32();
1280 : op_(op), can_deopt_(can_deopt) {
1318 int32_t value()
const {
return hydrogen()->Integer32Value(); }
1322 class LConstantS
FINAL :
public LTemplateInstruction<1, 0, 0> {
1331 class LConstantD
FINAL :
public LTemplateInstruction<1, 0, 1> {
1342 double value()
const {
return hydrogen()->DoubleValue(); }
1346 class LConstantE
FINAL :
public LTemplateInstruction<1, 0, 0> {
1351 ExternalReference value()
const {
1352 return hydrogen()->ExternalReferenceValue();
1357 class LConstantT
FINAL :
public LTemplateInstruction<1, 0, 0> {
1363 return hydrogen()->handle(isolate);
1368 class LBranch
FINAL :
public LControlInstruction<1, 0> {
1379 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1404 class LMapEnumLength
FINAL :
public LTemplateInstruction<1, 1, 0> {
1416 class LDateField
FINAL :
public LTemplateInstruction<1, 1, 0> {
1436 inputs_[0] = string;
1454 inputs_[0] = context;
1455 inputs_[1] = string;
1481 add->BetterLeftOperand()->UseCount() > 1;
1532 return LInstruction::kArithmeticD;
1549 inputs_[0] = context;
1560 return LInstruction::kArithmeticT;
1576 inputs_[1] = context;
1577 inputs_[2] = parameter_count;
1584 return parameter_count()->IsConstantOperand();
1587 DCHECK(has_constant_parameter_count());
1588 return LConstantOperand::cast(parameter_count());
1600 inputs_[0] = object;
1614 inputs_[0] = context;
1615 inputs_[1] = object;
1630 class LLoadFunctionPrototype
FINAL :
public LTemplateInstruction<1, 1, 0> {
1633 inputs_[0] =
function;
1643 class LLoadRoot
FINAL :
public LTemplateInstruction<1, 0, 0> {
1648 Heap::RootListIndex index()
const {
return hydrogen()->index(); }
1668 class LLoadKeyed
FINAL :
public LTemplateInstruction<1, 2, 0> {
1671 inputs_[0] = elements;
1678 bool is_external()
const {
1679 return hydrogen()->is_external();
1682 return hydrogen()->is_fixed_typed_array();
1685 return is_external() || is_fixed_typed_array();
1692 return hydrogen()->elements_kind();
1697 class LLoadKeyedGeneric
FINAL :
public LTemplateInstruction<1, 3, 1> {
1701 inputs_[0] = context;
1717 class LLoadGlobalCell
FINAL :
public LTemplateInstruction<1, 0, 0> {
1724 class LLoadGlobalGeneric
FINAL : public LTemplateInstruction<1, 2, 1> {
1728 inputs_[0] = context;
1729 inputs_[1] = global_object;
1745 class LStoreGlobalCell
FINAL :
public LTemplateInstruction<0, 1, 1> {
1763 inputs_[0] = context;
1771 int slot_index() {
return hydrogen()->slot_index(); }
1780 inputs_[0] = context;
1792 int slot_index() {
return hydrogen()->slot_index(); }
1810 class LDrop
FINAL :
public LTemplateInstruction<0, 0, 0> {
1812 explicit LDrop(
int count) : count_(count) { }
1826 inputs_[0] =
function;
1827 inputs_[1] = code_object;
1843 inputs_[0] = base_object;
1844 inputs_[1] = offset;
1863 class LContext
FINAL :
public LTemplateInstruction<1, 0, 0> {
1870 class LDeclareGlobals
FINAL : public LTemplateInstruction<0, 1, 0> {
1873 inputs_[0] = context;
1886 inputs_[0] =
function;
1894 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1896 int arity()
const {
return hydrogen()->argument_count() - 1; }
1900 class LCallWithDescriptor
FINAL :
public LTemplateResultInstruction<1> {
1904 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1906 inputs_.AddAll(operands, zone);
1916 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1918 int arity()
const {
return hydrogen()->argument_count() - 1; }
1931 class LInvokeFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1934 inputs_[0] = context;
1935 inputs_[1] =
function;
1944 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1946 int arity()
const {
return hydrogen()->argument_count() - 1; }
1950 class LCallFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1953 inputs_[0] = context;
1954 inputs_[1] =
function;
1962 int arity()
const {
return hydrogen()->argument_count() - 1; }
1966 class LCallNew
FINAL :
public LTemplateInstruction<1, 2, 0> {
1969 inputs_[0] = context;
1970 inputs_[1] = constructor;
1979 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1981 int arity()
const {
return hydrogen()->argument_count() - 1; }
1985 class LCallNewArray
FINAL :
public LTemplateInstruction<1, 2, 0> {
1988 inputs_[0] = context;
1989 inputs_[1] = constructor;
1998 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2000 int arity()
const {
return hydrogen()->argument_count() - 1; }
2004 class LCallRuntime
FINAL :
public LTemplateInstruction<1, 1, 0> {
2007 inputs_[0] = context;
2020 int arity()
const {
return hydrogen()->argument_count(); }
2025 class LInteger32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
2037 class LUint32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
2049 class LNumberTagI
FINAL :
public LTemplateInstruction<1, 1, 2> {
2065 class LNumberTagU
FINAL :
public LTemplateInstruction<1, 1, 2> {
2081 class LNumberTagD
FINAL :
public LTemplateInstruction<1, 1, 1> {
2108 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2112 class LDoubleToSmi
FINAL :
public LTemplateInstruction<1, 1, 0> {
2139 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2143 class LSmiTag
FINAL :
public LTemplateInstruction<1, 1, 0> {
2172 : needs_check_(needs_check) {
2189 inputs_[0] = object;
2201 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2204 return hydrogen()->field_representation();
2209 class LStoreNamedGeneric
FINAL :
public LTemplateInstruction<0, 3, 0> {
2212 inputs_[0] = context;
2213 inputs_[1] = object;
2224 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2231 class LStoreKeyed
FINAL :
public LTemplateInstruction<0, 3, 0> {
2234 inputs_[0] = object;
2241 return hydrogen()->is_fixed_typed_array();
2244 return is_external() || is_fixed_typed_array();
2254 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2255 bool NeedsCanonicalization() {
return hydrogen()->NeedsCanonicalization(); }
2260 class LStoreKeyedGeneric
FINAL :
public LTemplateInstruction<0, 4, 0> {
2266 inputs_[0] = context;
2267 inputs_[1] = object;
2280 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2286 class LTransitionElementsKind
FINAL :
public LTemplateInstruction<0, 2, 2> {
2292 inputs_[0] = object;
2293 inputs_[1] = context;
2294 temps_[0] = new_map_temp;
2304 "transition-elements-kind")
2307 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2309 Handle<
Map> original_map() {
return hydrogen()->original_map().handle(); }
2311 return hydrogen()->transitioned_map().handle();
2318 class LTrapAllocationMemento
FINAL :
public LTemplateInstruction<0, 1, 1> {
2322 inputs_[0] = object;
2330 "trap-allocation-memento")
2334 class LStringAdd
FINAL :
public LTemplateInstruction<1, 3, 0> {
2337 inputs_[0] = context;
2354 inputs_[0] = context;
2355 inputs_[1] = string;
2371 inputs_[0] = context;
2372 inputs_[1] = char_code;
2434 class LClampDToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
2437 inputs_[0] = unclamped;
2446 class LClampIToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
2449 inputs_[0] = unclamped;
2458 class LClampTToUint8
FINAL :
public LTemplateInstruction<1, 1, 1> {
2462 inputs_[0] = unclamped;
2463 temps_[0] = temp_xmm;
2473 class LCheckNonSmi
FINAL :
public LTemplateInstruction<0, 1, 0> {
2513 class LAllocate
FINAL :
public LTemplateInstruction<1, 2, 1> {
2516 inputs_[0] = context;
2533 inputs_[0] = context;
2546 inputs_[0] = context;
2572 inputs_[0] = context;
2583 class LTypeofIsAndBranch
FINAL :
public LControlInstruction<1, 0> {
2609 "is-construct-call-and-branch")
2625 class LStackCheck
FINAL :
public LTemplateInstruction<0, 1, 0> {
2628 inputs_[0] = context;
2636 Label* done_label() {
return &done_label_; }
2643 class LForInPrepareMap
FINAL :
public LTemplateInstruction<1, 2, 0> {
2646 inputs_[0] = context;
2647 inputs_[1] = object;
2657 class LForInCacheArray
FINAL :
public LTemplateInstruction<1, 1, 0> {
2668 return HForInCacheArray::cast(this->hydrogen_value())->idx();
2673 class LCheckMapValue
FINAL :
public LTemplateInstruction<0, 2, 0> {
2687 class LLoadFieldByIndex
FINAL :
public LTemplateInstruction<1, 2, 0> {
2690 inputs_[0] = object;
2701 class LStoreFrameContext:
public LTemplateInstruction<0, 1, 0> {
2704 inputs_[0] = context;
2713 class LAllocateBlockContext:
public LTemplateInstruction<1, 2, 0> {
2716 inputs_[0] = context;
2717 inputs_[1] =
function;
2730 class LChunkBuilder;
2735 dehoisted_key_ids_(graph->GetMaximumValueID(), graph->zone()) { }
2741 return dehoisted_key_ids_.Contains(value->
id());
2753 current_instruction_(
NULL),
2754 current_block_(
NULL),
2756 allocator_(allocator) {}
2762 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2878 HBasicBlock* current_block_;
2879 HBasicBlock* next_block_;
2880 LAllocator* allocator_;
2885 #undef DECLARE_HYDROGEN_ACCESSOR
2886 #undef DECLARE_CONCRETE_INSTRUCTION
A sandboxed execution context with its own set of built-in objects and functions.
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)
LLoadFunctionPrototype(LOperand *function)
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)
LStoreKeyed(LOperand *object, LOperand *key, LOperand *value)
LUint32ToDouble(LOperand *value)
LModByPowerOf2I(LOperand *dividend, int32_t divisor)
LStringCharCodeAt(LOperand *context, LOperand *string, LOperand *index)
LInstruction * DoArithmeticT(Token::Value op, HBinaryOperation *instr)
LStoreNamedField(LOperand *object, LOperand *value, LOperand *temp)
LPower(LOperand *left, LOperand *right)
LStringCompareAndBranch(LOperand *context, LOperand *left, LOperand *right)
LUnallocated * ToUnallocated(XMMRegister reg)
LInnerAllocatedObject(LOperand *base_object, LOperand *offset)
LCmpObjectEqAndBranch(LOperand *left, LOperand *right)
uint32_t base_offset() const
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)
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
LWrapReceiver(LOperand *receiver, LOperand *function)
LApplyArguments(LOperand *function, LOperand *receiver, LOperand *length, LOperand *elements)
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)
bool IsDehoistedKey(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)
LLabel * replacement() const
LLoadKeyedGeneric(LOperand *context, LOperand *obj, LOperand *key, LOperand *vector)
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
LLoadNamedField(LOperand *object)
MUST_USE_RESULT LOperand * UseTempRegisterOrConstant(HValue *value)
LAddI(LOperand *left, LOperand *right)
LDateField(LOperand *date, Smi *index)
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)
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)
LGetCachedArrayIndex(LOperand *value)
LDoubleToI(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
DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, "string-compare-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
Handle< Object > name() const
LNumberTagD(LOperand *value, LOperand *temp)
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)
BitVector dehoisted_key_ids_
LInstruction * DoMathPowHalf(HUnaryMathOperation *instr)
LInvokeFunction(LOperand *context, LOperand *function)
LSubI(LOperand *left, LOperand *right)
LCheckMaps(LOperand *value=NULL)
LInstruction * DoFlooringDivByConstI(HMathFloorOfDiv *instr)
LMulI(LOperand *left, LOperand *right)
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)
LCheckInstanceType(LOperand *value)
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)
LClampDToUint8(LOperand *unclamped)
LOperand * base_object() const
LInstanceOfKnownGlobal(LOperand *context, LOperand *value, LOperand *temp)
LPlatformChunk(CompilationInfo *info, HGraph *graph)
LRegExpLiteral(LOperand *context)
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)
LStoreKeyedGeneric(LOperand *context, LOperand *object, LOperand *key, LOperand *value)
void FindDehoistedKeyDefinitions(HValue *candidate)
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
LCompareMinusZeroAndBranch(LOperand *value)
LClampTToUint8(LOperand *unclamped, LOperand *temp_xmm)
LStoreContextSlot(LOperand *context, LOperand *value, LOperand *temp)
static bool UseLea(HAdd *add)
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)
LIsObjectAndBranch(LOperand *value)
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)
LHasCachedArrayIndexAndBranch(LOperand *value)
LInstruction * DoModI(HMod *instr)
MUST_USE_RESULT LOperand * UseRegisterOrConstantAtStart(HValue *value)
void AddInstruction(LInstruction *instr, HInstruction *current)
LStoreGlobalCell(LOperand *value, 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)
LNumberUntagD(LOperand *value)
LUnallocated * ToUnallocated(Register reg)
LOperand * target() const
LTypeof(LOperand *context, LOperand *value)
BitVector * GetDehoistedKeyIds()
MUST_USE_RESULT LOperand * UseRegisterOrConstant(HValue *value)
LChunkBuilder(CompilationInfo *info, HGraph *graph, LAllocator *allocator)
LNumberTagI(LOperand *value, LOperand *temp1, LOperand *temp2)
LArithmeticD(Token::Value op, LOperand *left, LOperand *right)
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env) OVERRIDE
LMathPowHalf(LOperand *value)
LEnvironment * GetDeferredLazyDeoptimizationEnvironment()
LClampIToUint8(LOperand *unclamped)
int gap_instructions_size()
LTransitionElementsKind(LOperand *object, LOperand *context, LOperand *new_map_temp, LOperand *temp)
LHasInstanceTypeAndBranch(LOperand *value)
LNumberTagU(LOperand *value, LOperand *temp1, LOperand *temp2)
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)
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
virtual bool MustSignExtendResult(LPlatformChunk *chunk) const
void set_environment(LEnvironment *env)
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
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)
bool IsMarkedAsCall() const
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
virtual bool MustSignExtendResult(LPlatformChunk *chunk) const FINAL OVERRIDE
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
static bool SmiValuesAre31Bits()
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)