5 #ifndef V8_ARM64_LITHIUM_ARM64_H_
6 #define V8_ARM64_LITHIUM_ARM64_H_
20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
21 V(AccessArgumentsAt) \
26 V(AllocateBlockContext) \
28 V(ArgumentsElements) \
42 V(CallWithDescriptor) \
43 V(CheckInstanceType) \
52 V(ClassOfTestAndBranch) \
53 V(CmpHoleAndBranchD) \
54 V(CmpHoleAndBranchT) \
56 V(CmpObjectEqAndBranch) \
58 V(CompareMinusZeroAndBranch) \
59 V(CompareNumericAndBranch) \
79 V(FlooringDivByConstI) \
80 V(FlooringDivByPowerOf2I) \
85 V(GetCachedArrayIndex) \
87 V(HasCachedArrayIndexAndBranch) \
88 V(HasInstanceTypeAndBranch) \
89 V(InnerAllocatedObject) \
91 V(InstanceOfKnownGlobal) \
93 V(Integer32ToDouble) \
95 V(IsConstructCallAndBranch) \
96 V(IsObjectAndBranch) \
98 V(IsStringAndBranch) \
99 V(IsUndetectableAndBranch) \
103 V(LoadFieldByIndex) \
104 V(LoadFunctionPrototype) \
106 V(LoadGlobalGeneric) \
107 V(LoadKeyedExternal) \
109 V(LoadKeyedFixedDouble) \
110 V(LoadKeyedGeneric) \
112 V(LoadNamedGeneric) \
140 V(PreparePushArguments) \
144 V(SeqStringGetChar) \
145 V(SeqStringSetChar) \
152 V(StoreContextSlot) \
153 V(StoreFrameContext) \
155 V(StoreKeyedExternal) \
157 V(StoreKeyedFixedDouble) \
158 V(StoreKeyedGeneric) \
160 V(StoreNamedGeneric) \
162 V(StringCharCodeAt) \
163 V(StringCharFromCode) \
164 V(StringCompareAndBranch) \
168 V(TailCallThroughMegamorphicCache) \
170 V(ToFastProperties) \
171 V(TransitionElementsKind) \
172 V(TrapAllocationMemento) \
173 V(TruncateDoubleToIntOrSmi) \
175 V(TypeofIsAndBranch) \
181 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
182 virtual Opcode opcode() const FINAL OVERRIDE { \
183 return LInstruction::k##type; \
185 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
186 virtual const char* Mnemonic() const FINAL OVERRIDE { \
189 static L##type* cast(LInstruction* instr) { \
190 DCHECK(instr->Is##type()); \
191 return reinterpret_cast<L##type*>(instr); \
195 #define DECLARE_HYDROGEN_ACCESSOR(type) \
196 H##type* hydrogen() const { \
197 return H##type::cast(this->hydrogen_value()); \
201 class LInstruction :
public ZoneObject {
218 #define DECLARE_OPCODE(type) k##type,
221 #undef DECLARE_OPCODE
227 #define DECLARE_PREDICATE(type) \
228 bool Is##type() const { return opcode() == k##type; }
230 #undef DECLARE_PREDICATE
234 virtual bool IsGap()
const {
return false; }
283 class IsCallBits:
public BitField<bool, 0, 1> {};
312 template<
int R,
int I,
int T>
313 class LTemplateInstruction :
public LTemplateResultInstruction<R> {
315 EmbeddedContainer<LOperand*, I>
inputs_;
316 EmbeddedContainer<LOperand*, T>
temps_;
328 class LTailCallThroughMegamorphicCache
FINAL
329 :
public LTemplateInstruction<0, 3, 0> {
334 inputs_[0] = context;
335 inputs_[1] = receiver;
344 "tail-call-through-megamorphic-cache")
358 template<
int I,
int T>
359 class LControlInstruction :
public LTemplateInstruction<0, I, T> {
377 if (true_label_ ==
NULL) {
384 if (false_label_ ==
NULL) {
404 explicit LGap(HBasicBlock* block)
406 parallel_moves_[BEFORE] =
NULL;
407 parallel_moves_[START] =
NULL;
408 parallel_moves_[END] =
NULL;
409 parallel_moves_[AFTER] =
NULL;
417 return reinterpret_cast<LGap*
>(instr);
422 HBasicBlock*
block()
const {
return block_; }
429 FIRST_INNER_POSITION = BEFORE,
430 LAST_INNER_POSITION = AFTER
434 if (parallel_moves_[pos] ==
NULL) {
435 parallel_moves_[pos] =
new(zone) LParallelMove(zone);
437 return parallel_moves_[pos];
441 return parallel_moves_[pos];
445 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
450 class LInstructionGap
FINAL :
public LGap {
455 return !IsRedundant();
462 class LDrop
FINAL :
public LTemplateInstruction<0, 0, 0> {
464 explicit LDrop(
int count) : count_(count) { }
466 int count()
const {
return count_; }
482 class LDummyUse
FINAL :
public LTemplateInstruction<1, 1, 0> {
491 class LGoto
FINAL :
public LTemplateInstruction<0, 0, 0> {
493 explicit LGoto(HBasicBlock* block) : block_(block) { }
497 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
498 virtual
bool IsControl() const
OVERRIDE {
return true; }
500 int block_id()
const {
return block_->block_id(); }
507 class LLazyBailout
FINAL :
public LTemplateInstruction<0, 0, 0> {
513 void set_gap_instructions_size(
int gap_instructions_size) {
514 gap_instructions_size_ = gap_instructions_size;
519 int gap_instructions_size_;
523 class LLabel
FINAL :
public LGap {
526 :
LGap(block), replacement_(
NULL) { }
533 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
535 int block_id()
const {
return block()->block_id(); }
545 LLabel* replacement_;
549 class LOsrEntry
FINAL :
public LTemplateInstruction<0, 0, 0> {
560 class LAccessArgumentsAt
FINAL :
public LTemplateInstruction<1, 3, 0> {
565 inputs_[0] = arguments;
598 : shift_(
NO_SHIFT), shift_amount_(0) {
604 : shift_(
shift), shift_amount_(shift_amount) {
646 inputs_[0] = context;
670 inputs_[0] =
function;
671 inputs_[1] = receiver;
673 inputs_[3] = elements;
685 class LArgumentsElements
FINAL :
public LTemplateInstruction<1, 0, 1> {
701 inputs_[0] = elements;
710 class LArithmeticD
FINAL :
public LTemplateInstruction<1, 2, 0> {
725 return LInstruction::kArithmeticD;
742 inputs_[0] = context;
753 return LInstruction::kArithmeticT;
781 : shift_(
NO_SHIFT), shift_amount_(0) {
787 : shift_(
shift), shift_amount_(shift_amount) {
841 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
848 inputs_[0] =
function;
856 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
858 int arity()
const {
return hydrogen()->argument_count() - 1; }
862 class LCallFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
865 inputs_[0] = context;
866 inputs_[1] =
function;
875 int arity()
const {
return hydrogen()->argument_count() - 1; }
879 class LCallNew
FINAL :
public LTemplateInstruction<1, 2, 0> {
882 inputs_[0] = context;
883 inputs_[1] = constructor;
892 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
894 int arity()
const {
return hydrogen()->argument_count() - 1; }
898 class LCallNewArray
FINAL :
public LTemplateInstruction<1, 2, 0> {
901 inputs_[0] = context;
902 inputs_[1] = constructor;
911 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
913 int arity()
const {
return hydrogen()->argument_count() - 1; }
917 class LCallRuntime
FINAL :
public LTemplateInstruction<1, 1, 0> {
920 inputs_[0] = context;
933 int arity()
const {
return hydrogen()->argument_count(); }
938 class LCallStub
FINAL :
public LTemplateInstruction<1, 1, 0> {
941 inputs_[0] = context;
1006 class LCheckValue
FINAL :
public LTemplateInstruction<0, 1, 0> {
1022 inputs_[0] = unclamped;
1031 class LClampIToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
1034 inputs_[0] = unclamped;
1043 class LClampTToUint8
FINAL :
public LTemplateInstruction<1, 1, 1> {
1046 inputs_[0] = unclamped;
1057 class LDoubleBits
FINAL :
public LTemplateInstruction<1, 1, 0> {
1084 class LClassOfTestAndBranch
FINAL :
public LControlInstruction<1, 2> {
1097 "class-of-test-and-branch")
1100 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1107 inputs_[0] = object;
1122 inputs_[0] = object;
1149 class LCmpObjectEqAndBranch
FINAL :
public LControlInstruction<2, 0> {
1167 inputs_[0] = context;
1183 class LCompareMinusZeroAndBranch
FINAL :
public LControlInstruction<1, 1> {
1194 "cmp-minus-zero-and-branch")
1210 "compare-numeric-and-branch")
1213 Token::
Value op()
const {
return hydrogen()->token(); }
1214 bool is_double()
const {
1215 return hydrogen()->representation().IsDouble();
1218 virtual void PrintDataTo(StringStream* stream)
OVERRIDE;
1222 class LConstantD
FINAL :
public LTemplateInstruction<1, 0, 0> {
1227 double value()
const {
return hydrogen()->DoubleValue(); }
1231 class LConstantE
FINAL :
public LTemplateInstruction<1, 0, 0> {
1236 ExternalReference value()
const {
1237 return hydrogen()->ExternalReferenceValue();
1242 class LConstantI
FINAL :
public LTemplateInstruction<1, 0, 0> {
1247 int32_t value()
const {
return hydrogen()->Integer32Value(); }
1251 class LConstantS
FINAL :
public LTemplateInstruction<1, 0, 0> {
1260 class LConstantT
FINAL :
public LTemplateInstruction<1, 0, 0> {
1266 return hydrogen()->handle(isolate);
1271 class LContext
FINAL :
public LTemplateInstruction<1, 0, 0> {
1278 class LDateField
FINAL : public LTemplateInstruction<1, 1, 0> {
1301 class LDeclareGlobals
FINAL :
public LTemplateInstruction<0, 1, 0> {
1304 inputs_[0] = context;
1325 inputs_[0] = dividend;
1343 inputs_[0] = dividend;
1363 inputs_[0] = dividend;
1364 inputs_[1] = divisor;
1388 bool tag_result() {
return hydrogen()->representation().IsSmi(); }
1392 class LForInCacheArray
FINAL :
public LTemplateInstruction<1, 1, 0> {
1403 return HForInCacheArray::cast(this->hydrogen_value())->idx();
1408 class LForInPrepareMap
FINAL :
public LTemplateInstruction<1, 2, 0> {
1411 inputs_[0] = context;
1412 inputs_[1] = object;
1422 class LGetCachedArrayIndex
FINAL :
public LTemplateInstruction<1, 1, 0> {
1435 class LHasCachedArrayIndexAndBranch
FINAL
1447 "has-cached-array-index-and-branch")
1450 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1465 "has-instance-type-and-branch")
1468 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1475 inputs_[0] = base_object;
1476 inputs_[1] = offset;
1491 inputs_[0] = context;
1504 class LInstanceOfKnownGlobal
FINAL :
public LTemplateInstruction<1, 2, 0> {
1507 inputs_[0] = context;
1515 "instance-of-known-global")
1520 return lazy_deopt_env_;
1524 lazy_deopt_env_ = env;
1528 LEnvironment* lazy_deopt_env_;
1532 class LInteger32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
1544 class LCallWithDescriptor
FINAL :
public LTemplateResultInstruction<1> {
1548 : descriptor_(descriptor),
1549 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1551 inputs_.AddAll(operands, zone);
1562 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1564 int arity()
const {
return hydrogen()->argument_count() - 1; }
1578 class LInvokeFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1581 inputs_[0] = context;
1582 inputs_[1] =
function;
1591 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1593 int arity()
const {
return hydrogen()->argument_count() - 1; }
1597 class LIsConstructCallAndBranch
FINAL :
public LControlInstruction<0, 2> {
1608 "is-construct-call-and-branch")
1612 class LIsObjectAndBranch
FINAL :
public LControlInstruction<1, 2> {
1627 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1644 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1659 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1674 "is-undetectable-and-branch")
1677 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1684 inputs_[0] = context;
1692 int slot_index()
const {
return hydrogen()->slot_index(); }
1701 inputs_[0] = object;
1714 inputs_[0] = context;
1727 inputs_[0] =
function;
1750 inputs_[0] = context;
1751 inputs_[1] = global_object;
1771 this->inputs_[0] = elements;
1772 this->inputs_[1] = key;
1778 return this->hydrogen()->elements_kind();
1781 return this->hydrogen()->is_external();
1784 return hydrogen()->is_fixed_typed_array();
1787 return is_external() || is_fixed_typed_array();
1790 return this->hydrogen()->base_offset();
1793 this->elements()->PrintTo(stream);
1795 this->key()->PrintTo(stream);
1796 if (this->base_offset() != 0) {
1797 stream->Add(
" + %d]", this->base_offset());
1850 inputs_[0] = context;
1851 inputs_[1] = object;
1869 inputs_[0] = context;
1870 inputs_[1] = object;
1885 class LLoadRoot
FINAL :
public LTemplateInstruction<1, 0, 0> {
1890 Heap::RootListIndex index()
const {
return hydrogen()->index(); }
1894 class LMapEnumLength
FINAL :
public LTemplateInstruction<1, 1, 0> {
1910 this->inputs_[0] = value;
1916 void PrintDataTo(StringStream* stream)
OVERRIDE;
1922 class LMathAbs
FINAL :
public LUnaryMathOperation<0> {
1934 inputs_[0] = context;
1960 temps_[0] = double_temp1;
1964 ExternalReference::InitializeMathExpData();
1977 class LMathFloorD
FINAL :
public LUnaryMathOperation<0> {
1985 class LMathFloorI
FINAL :
public LUnaryMathOperation<0> {
1992 class LFlooringDivByPowerOf2I
FINAL :
public LTemplateInstruction<1, 1, 0> {
1995 inputs_[0] = dividend;
2003 "flooring-div-by-power-of-2-i")
2014 inputs_[0] = dividend;
2034 inputs_[0] = dividend;
2035 inputs_[1] = divisor;
2055 class LMathClz32
FINAL :
public LUnaryMathOperation<0> {
2062 class LMathMinMax
FINAL :
public LTemplateInstruction<1, 2, 0> {
2085 class LMathRoundD
FINAL :
public LUnaryMathOperation<0> {
2096 class LMathRoundI
FINAL :
public LUnaryMathOperation<1> {
2109 class LMathFround
FINAL :
public LUnaryMathOperation<0> {
2117 class LMathSqrt
FINAL :
public LUnaryMathOperation<0> {
2124 class LModByPowerOf2I
FINAL :
public LTemplateInstruction<1, 1, 0> {
2127 inputs_[0] = dividend;
2145 inputs_[0] = dividend;
2185 LConstantOperand*
right() {
return LConstantOperand::cast(inputs_[1]); }
2257 class LNumberUntagD
FINAL :
public LTemplateInstruction<1, 1, 1> {
2280 class LPower
FINAL :
public LTemplateInstruction<1, 2, 0> {
2299 inline int argc()
const {
return argc_; }
2311 int capacity = kRecommendedMaxPushedArgs)
2312 : zone_(zone), inputs_(capacity, zone) {}
2323 static const
int kRecommendedMaxPushedArgs = 4;
2324 bool ShouldSplitPush()
const {
2325 return inputs_.length() >= kRecommendedMaxPushedArgs;
2342 class LRegExpLiteral
FINAL :
public LTemplateInstruction<1, 1, 0> {
2345 inputs_[0] = context;
2359 inputs_[1] = context;
2360 inputs_[2] = parameter_count;
2367 return parameter_count()->IsConstantOperand();
2370 DCHECK(has_constant_parameter_count());
2371 return LConstantOperand::cast(parameter_count());
2378 class LSeqStringGetChar
FINAL :
public LTemplateInstruction<1, 2, 1> {
2383 inputs_[0] = string;
2404 inputs_[0] = context;
2405 inputs_[1] = string;
2438 : needs_check_(needs_check) {
2455 inputs_[0] = context;
2463 Label* done_label() {
return &done_label_; }
2474 this->inputs_[0] = elements;
2475 this->inputs_[1] = key;
2476 this->inputs_[2] = value;
2481 return hydrogen()->is_fixed_typed_array();
2484 return is_external() || is_fixed_typed_array();
2490 return this->hydrogen()->elements_kind();
2494 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() ||
2495 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) {
2498 return this->hydrogen()->NeedsCanonicalization();
2503 this->elements()->PrintTo(stream);
2505 this->key()->PrintTo(stream);
2506 if (this->base_offset() != 0) {
2507 stream->Add(
" + %d] <-", this->base_offset());
2509 stream->Add(
"] <- ");
2512 if (this->value() ==
NULL) {
2513 DCHECK(hydrogen()->IsConstantHoleStore() &&
2514 hydrogen()->value()->representation().IsDouble());
2515 stream->Add(
"<the hole(nan)>");
2517 this->value()->PrintTo(stream);
2525 class LStoreKeyedExternal
FINAL :
public LStoreKeyed<1> {
2539 class LStoreKeyedFixed
FINAL :
public LStoreKeyed<1> {
2553 class LStoreKeyedFixedDouble
FINAL :
public LStoreKeyed<1> {
2564 "store-keyed-fixed-double")
2568 class LStoreKeyedGeneric
FINAL :
public LTemplateInstruction<0, 4, 0> {
2574 inputs_[0] = context;
2588 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2594 class LStoreNamedField
FINAL :
public LTemplateInstruction<0, 2, 2> {
2598 inputs_[0] = object;
2612 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2615 return hydrogen()->field_representation();
2620 class LStoreNamedGeneric
FINAL:
public LTemplateInstruction<0, 3, 0> {
2623 inputs_[0] = context;
2624 inputs_[1] = object;
2635 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2642 class LStringAdd
FINAL :
public LTemplateInstruction<1, 3, 0> {
2645 inputs_[0] = context;
2663 inputs_[0] = context;
2664 inputs_[1] = string;
2680 inputs_[0] = context;
2681 inputs_[1] = char_code;
2695 inputs_[0] = context;
2705 "string-compare-and-branch")
2708 Token::
Value op()
const {
return hydrogen()->token(); }
2710 virtual void PrintDataTo(StringStream* stream)
OVERRIDE;
2715 class LTaggedToI
FINAL :
public LTemplateInstruction<1, 1, 2> {
2730 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2734 class LShiftI
FINAL :
public LTemplateInstruction<1, 2, 0> {
2737 : op_(op), can_deopt_(can_deopt) {
2758 : op_(op), can_deopt_(can_deopt) {
2780 inputs_[0] =
function;
2781 inputs_[1] = code_object;
2799 inputs_[0] = context;
2811 int slot_index() {
return hydrogen()->slot_index(); }
2837 : shift_(
NO_SHIFT), shift_amount_(0) {
2843 : shift_(
shift), shift_amount_(shift_amount) {
2904 inputs_[0] = object;
2905 inputs_[1] = context;
2916 "transition-elements-kind")
2919 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2921 Handle<
Map> original_map() {
return hydrogen()->original_map().handle(); }
2923 return hydrogen()->transitioned_map().handle();
2930 class LTrapAllocationMemento
FINAL :
public LTemplateInstruction<0, 1, 2> {
2933 inputs_[0] = object;
2946 class LTruncateDoubleToIntOrSmi
FINAL
2947 :
public LTemplateInstruction<1, 1, 0> {
2956 "truncate-double-to-int-or-smi")
2959 bool tag_result() {
return hydrogen()->representation().IsSmi(); }
2963 class LTypeof
FINAL :
public LTemplateInstruction<1, 2, 0> {
2966 inputs_[0] = context;
2977 class LTypeofIsAndBranch
FINAL :
public LControlInstruction<1, 2> {
3010 class LCheckMapValue
FINAL :
public LTemplateInstruction<0, 2, 1> {
3026 class LLoadFieldByIndex
FINAL :
public LTemplateInstruction<1, 2, 0> {
3029 inputs_[0] = object;
3040 class LStoreFrameContext:
public LTemplateInstruction<0, 1, 0> {
3043 inputs_[0] = context;
3052 class LAllocateBlockContext:
public LTemplateInstruction<1, 2, 0> {
3055 inputs_[0] = context;
3056 inputs_[1] =
function;
3072 inputs_[0] = receiver;
3073 inputs_[1] =
function;
3084 class LChunkBuilder;
3085 class LPlatformChunk
FINAL :
public LChunk {
3088 :
LChunk(info, graph) { }
3099 current_instruction_(
NULL),
3100 current_block_(
NULL),
3101 allocator_(allocator) {}
3107 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
3209 return HConstant::cast(constant)->Integer32Value() & 0x1f;
3212 if (instr->IsAdd() || instr->IsSub()) {
3215 DCHECK(instr->IsBitwise());
3216 unsigned unused_n, unused_imm_s, unused_imm_r;
3218 &unused_n, &unused_imm_s, &unused_imm_r);
3248 HBasicBlock* current_block_;
3249 LAllocator* allocator_;
3254 #undef DECLARE_HYDROGEN_ACCESSOR
3255 #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 bool IsImmAddSub(int64_t immediate)
static bool IsImmLogical(uint64_t value, unsigned width, unsigned *n, unsigned *imm_s, unsigned *imm_r)
static U update(U previous, T value)
int GetRegisterParameterCount() const
Source to read snapshot and builtins files from.
LInstructionGap(HBasicBlock *block)
LCallJSFunction(LOperand *function)
LAddE(LOperand *left, LOperand *right)
LSmiUntag(LOperand *value, bool needs_check)
LInstruction * DoDivByPowerOf2I(HDiv *instr)
LCheckSmi(LOperand *value)
DECLARE_CONCRETE_INSTRUCTION(TruncateDoubleToIntOrSmi, "truncate-double-to-int-or-smi") bool tag_result()
bool LikelyFitsImmField(HInstruction *instr, int imm)
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()
LMathRoundI(LOperand *value, LOperand *temp1)
LIsSmiAndBranch(LOperand *value)
LDivByPowerOf2I(LOperand *dividend, int32_t divisor)
LUint32ToDouble(LOperand *value)
LInstruction * DoShiftedBinaryOp(HBinaryOperation *instr, HValue *left, HBitwiseBinaryOperation *shift)
LModByPowerOf2I(LOperand *dividend, int32_t divisor)
LInstanceOfKnownGlobal(LOperand *context, LOperand *value)
LStringCharCodeAt(LOperand *context, LOperand *string, LOperand *index)
LInstruction * DoArithmeticT(Token::Value op, HBinaryOperation *instr)
LTransitionElementsKind(LOperand *object, LOperand *context, LOperand *temp1, LOperand *temp2)
LPower(LOperand *left, LOperand *right)
LSeqStringSetChar(LOperand *context, LOperand *string, LOperand *index, LOperand *value, LOperand *temp)
LStringCompareAndBranch(LOperand *context, LOperand *left, LOperand *right)
MUST_USE_RESULT LUnallocated * TempDoubleRegister()
LInnerAllocatedObject(LOperand *base_object, LOperand *offset)
LCmpObjectEqAndBranch(LOperand *left, LOperand *right)
LInstruction * DoFlooringDivByPowerOf2I(HMathFloorOfDiv *instr)
LMathAbs(LOperand *value)
virtual Opcode opcode() const OVERRIDE
LOperand * shift_amount() const
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)
LIsConstructCallAndBranch(LOperand *temp1, LOperand *temp2)
CallInterfaceDescriptor descriptor()
ElementsKind to_kind() const
virtual void PrintDataTo(StringStream *stream) OVERRIDE
LAddS(LOperand *left, LOperand *right)
LInstruction * DefineSameAsFirst(LTemplateResultInstruction< 1 > *instr)
LBitI(LOperand *left, LOperand *right)
LDoubleBits(LOperand *value)
LSubI(LOperand *left, LOperand *right, Shift shift, LOperand *shift_amount)
LDeclareGlobals(LOperand *context)
LIsUndetectableAndBranch(LOperand *value, LOperand *temp)
virtual MUST_USE_RESULT LOperand * UseAny(HValue *value)
LOperand * argument(int i)
virtual void CompileToNative(LCodeGen *generator) OVERRIDE
LWrapReceiver(LOperand *receiver, LOperand *function)
LApplyArguments(LOperand *function, LOperand *receiver, LOperand *length, LOperand *elements)
LCheckInstanceType(LOperand *value, LOperand *temp)
LStringAdd(LOperand *context, LOperand *left, LOperand *right)
LStoreNamedField(LOperand *object, LOperand *value, LOperand *temp0, LOperand *temp1)
bool has_constant_parameter_count()
LStoreKeyedFixedDouble(LOperand *elements, LOperand *key, LOperand *value, LOperand *temp)
SaveFPRegsMode save_doubles() const
LInteger32ToDouble(LOperand *value)
virtual int TempCount() FINAL OVERRIDE
LForInCacheArray(LOperand *map)
LCmpT(LOperand *context, LOperand *left, LOperand *right)
LLabel * replacement() const
LCompareMinusZeroAndBranch(LOperand *value, LOperand *temp)
LCmpMapAndBranch(LOperand *value, LOperand *temp)
LDummyUse(LOperand *value)
LInstruction * DefineFixedDouble(LTemplateResultInstruction< 1 > *instr, DoubleRegister reg)
DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, "has-instance-type-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LInstruction * DoModByPowerOf2I(HMod *instr)
LInstruction * AssignEnvironment(LInstruction *instr)
LLoadNamedField(LOperand *object)
LUnallocated * ToUnallocated(DoubleRegister reg)
LBitI(LOperand *left, LOperand *right, Shift shift, LOperand *shift_amount)
LAddI(LOperand *left, LOperand *right)
LDateField(LOperand *date, Smi *index)
LStoreKeyedFixed(LOperand *elements, LOperand *key, LOperand *value, LOperand *temp)
LInstruction * Define(LTemplateResultInstruction< 1 > *instr, LUnallocated *result)
virtual bool HasInterestingComment(LCodeGen *gen) const
LPushArguments(Zone *zone, int capacity=kRecommendedMaxPushedArgs)
bool ShiftCanBeOptimizedAway(HBitwiseBinaryOperation *shift)
LInstruction * AssignPointerMap(LInstruction *instr)
LDoubleToIntOrSmi(LOperand *value)
LIsStringAndBranch(LOperand *value, LOperand *temp)
LGoto(HBasicBlock *block)
LCallNew(LOperand *context, LOperand *constructor)
LStackCheck(LOperand *context)
LAllocate(LOperand *context, LOperand *size, LOperand *temp1, LOperand *temp2, LOperand *temp3)
LLoadFieldByIndex(LOperand *object, LOperand *index)
virtual LOperand * InputAt(int i) FINAL OVERRIDE
virtual bool IsControl() const OVERRIDE
LArgumentsLength(LOperand *elements)
LModI(LOperand *left, LOperand *right)
LPreparePushArguments(int argc)
LMathFround(LOperand *value)
LLoadNamedGeneric(LOperand *context, LOperand *object, LOperand *vector)
MUST_USE_RESULT LOperand * UseFixedDouble(HValue *value, DoubleRegister fixed_register)
LArithmeticT(Token::Value op, LOperand *context, LOperand *left, LOperand *right)
LShiftS(Token::Value op, LOperand *left, LOperand *right, bool can_deopt)
LLoadKeyedGeneric(LOperand *context, LOperand *object, LOperand *key, LOperand *vector)
LGetCachedArrayIndex(LOperand *value)
int JSShiftAmountFromHConstant(HValue *constant)
LClampTToUint8(LOperand *unclamped, LOperand *temp1)
LOperand * GetNextSpillSlot(RegisterKind kind)
LOperand * double_temp1()
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
LBitS(LOperand *left, LOperand *right)
void DoBasicBlock(HBasicBlock *block)
LForInPrepareMap(LOperand *context, LOperand *object)
LMapEnumLength(LOperand *value)
LInstruction * DefineAsSpilled(LTemplateResultInstruction< 1 > *instr, int index)
LOperand * offset() const
MUST_USE_RESULT LOperand * UseRegisterAtStart(HValue *value)
LInstruction * DoDivI(HBinaryOperation *instr)
LStoreGlobalCell(LOperand *value, LOperand *temp1, LOperand *temp2)
LInvokeFunction(LOperand *context, LOperand *function)
LSubI(LOperand *left, LOperand *right)
LInstruction * DoFlooringDivByConstI(HMathFloorOfDiv *instr)
LMulI(LOperand *left, LOperand *right)
LLabel(HBasicBlock *block)
bool HasReplacement() const
LInstruction * DoModByConstI(HMod *instr)
MUST_USE_RESULT LOperand * Use(HValue *value, LUnallocated *operand)
LCheckValue(LOperand *value)
LStringCharFromCode(LOperand *context, LOperand *char_code)
LInstruction * DoShift(Token::Value op, HBitwiseBinaryOperation *instr)
LStoreKeyedExternal(LOperand *elements, LOperand *key, LOperand *value, LOperand *temp)
LInstruction * DoArithmeticD(Token::Value op, HArithmeticBinaryOperation *instr)
LStoreKeyedGeneric(LOperand *context, LOperand *obj, LOperand *key, LOperand *value)
virtual int InputCount() FINAL OVERRIDE
DISALLOW_COPY_AND_ASSIGN(LChunkBuilder)
LMathExp(LOperand *value, LOperand *double_temp1, LOperand *temp1, LOperand *temp2, LOperand *temp3)
DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, "transition-elements-kind") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LMathFloorD(LOperand *value)
LHasCachedArrayIndexAndBranch(LOperand *value, LOperand *temp)
LCheckMaps(LOperand *value=NULL, LOperand *temp=NULL)
LMulS(LOperand *left, LOperand *right)
static bool HasMagicNumberForDivision(int32_t divisor)
LCallWithDescriptor(CallInterfaceDescriptor descriptor, const ZoneList< LOperand * > &operands, Zone *zone)
LOperand * global_object()
LCallRuntime(LOperand *context)
LStoreCodeEntry(LOperand *function, LOperand *code_object, LOperand *temp)
LLoadGlobalGeneric(LOperand *context, LOperand *global_object, LOperand *vector)
LCmpHoleAndBranchD(LOperand *object, LOperand *temp)
MUST_USE_RESULT LOperand * UseFixed(HValue *value, Register fixed_register)
void AddArgument(LOperand *arg)
LClampDToUint8(LOperand *unclamped)
LOperand * base_object() const
LPlatformChunk(CompilationInfo *info, HGraph *graph)
LRegExpLiteral(LOperand *context)
LNumberTagD(LOperand *value, LOperand *temp1, LOperand *temp2)
virtual bool HasInterestingComment(LCodeGen *gen) const OVERRIDE
MUST_USE_RESULT LOperand * UseRegisterAndClobber(HValue *value)
LInstruction * DoDivByConstI(HDiv *instr)
void VisitInstruction(HInstruction *current)
HBitwiseBinaryOperation * CanTransformToShiftedOp(HValue *val, HValue **left=NULL)
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)
LInstruction * TryDoOpWithShiftedRightOperand(HBinaryOperation *op)
virtual const char * Mnemonic() const OVERRIDE
LFlooringDivByConstI(LOperand *dividend, int32_t divisor, LOperand *temp)
LDivI(LOperand *dividend, LOperand *divisor, LOperand *temp)
LCallStub(LOperand *context)
LInstruction * DoFlooringDivI(HMathFloorOfDiv *instr)
LArgumentsElements(LOperand *temp)
LInstruction * DefineFixed(LTemplateResultInstruction< 1 > *instr, Register reg)
LCompareNumericAndBranch(LOperand *left, LOperand *right)
LFunctionLiteral(LOperand *context)
LMathSqrt(LOperand *value)
MUST_USE_RESULT LOperand * FixedTemp(Register reg)
int ArgumentCount() const
LBranch(LOperand *value, LOperand *temp1, LOperand *temp2)
LHasInstanceTypeAndBranch(LOperand *value, LOperand *temp)
Handle< Map > transitioned_map()
LMathLog(LOperand *value)
LMulConstIS(LOperand *left, LConstantOperand *right)
LAddI(LOperand *left, LOperand *right, Shift shift, LOperand *shift_amount)
LOperand * parameter_count()
ElementsKind from_kind() const
LReturn(LOperand *value, LOperand *context, LOperand *parameter_count)
LTruncateDoubleToIntOrSmi(LOperand *value)
LCallFunction(LOperand *context, LOperand *function)
LNumberUntagD(LOperand *value, LOperand *temp)
MUST_USE_RESULT LOperand * FixedTemp(DoubleRegister reg)
LConstantOperand * right()
MUST_USE_RESULT LConstantOperand * UseConstant(HValue *value)
LInstruction * DoModI(HMod *instr)
MUST_USE_RESULT LOperand * UseRegisterOrConstantAtStart(HValue *value)
void AddInstruction(LInstruction *instr, HInstruction *current)
LTypeofIsAndBranch(LOperand *value, LOperand *temp1, LOperand *temp2)
void set_replacement(LLabel *label)
bool is_loop_header() const
LMathFloorI(LOperand *value)
LInstanceOf(LOperand *context, LOperand *left, LOperand *right)
LFlooringDivByPowerOf2I(LOperand *dividend, int32_t divisor)
LCheckNonSmi(LOperand *value)
LAccessArgumentsAt(LOperand *arguments, LOperand *length, LOperand *index)
LDivByConstI(LOperand *dividend, int32_t divisor, LOperand *temp)
LCmpHoleAndBranchT(LOperand *object)
LClassOfTestAndBranch(LOperand *value, LOperand *temp1, LOperand *temp2)
LUnallocated * ToUnallocated(Register reg)
LOperand * target() const
LTypeof(LOperand *context, LOperand *value)
LTaggedToI(LOperand *value, LOperand *temp1, LOperand *temp2)
LSeqStringGetChar(LOperand *string, LOperand *index, LOperand *temp)
MUST_USE_RESULT LOperand * UseRegisterOrConstant(HValue *value)
LCheckMapValue(LOperand *value, LOperand *map, LOperand *temp)
LIsObjectAndBranch(LOperand *value, LOperand *temp1, LOperand *temp2)
LTrapAllocationMemento(LOperand *object, LOperand *temp1, LOperand *temp2)
LMathRoundD(LOperand *value)
LChunkBuilder(CompilationInfo *info, HGraph *graph, LAllocator *allocator)
LArithmeticD(Token::Value op, LOperand *left, LOperand *right)
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env) OVERRIDE
LModByConstI(LOperand *dividend, int32_t divisor, LOperand *temp)
LMathPowHalf(LOperand *value)
LEnvironment * GetDeferredLazyDeoptimizationEnvironment()
LClampIToUint8(LOperand *unclamped)
LLoadFunctionPrototype(LOperand *function, LOperand *temp)
int gap_instructions_size()
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)
Handle< ScopeInfo > scope_info()
LAllocateBlockContext(LOperand *context, LOperand *function)
int LookupDestination(int block_id) const
Label * GetAssemblyLabel(int block_id) const
virtual bool IsControl() const FINAL OVERRIDE
int FalseDestination(LChunk *chunk)
HBasicBlock * SuccessorAt(int i)
Label * FalseLabel(LChunk *chunk)
int TrueDestination(LChunk *chunk)
DECLARE_HYDROGEN_ACCESSOR(ControlInstruction)
Label * TrueLabel(LChunk *chunk)
virtual void PrintDataTo(StringStream *stream) OVERRIDE
static LGap * cast(LInstruction *instr)
virtual bool IsGap() const OVERRIDE
LParallelMove * GetParallelMove(InnerPosition pos)
HBasicBlock * block() const
LParallelMove * GetOrCreateParallelMove(InnerPosition pos, Zone *zone)
SetOncePointer< LPointerMap > pointer_map_
virtual int InputCount()=0
void set_environment(LEnvironment *env)
virtual bool HasResult() const =0
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)
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)
LLoadKeyedExternal(LOperand *elements, LOperand *key, LOperand *temp)
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedExternal, "load-keyed-external")
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixedDouble, "load-keyed-fixed-double")
LLoadKeyedFixedDouble(LOperand *elements, LOperand *key, LOperand *temp)
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixed, "load-keyed-fixed")
LLoadKeyedFixed(LOperand *elements, LOperand *key, LOperand *temp)
void PrintDataTo(StringStream *stream) OVERRIDE
bool is_typed_elements() const
ElementsKind elements_kind() const
LLoadKeyed(LOperand *elements, LOperand *key)
uint32_t base_offset() const
bool is_fixed_typed_array() const
LMathAbsTagged(LOperand *context, LOperand *value, LOperand *temp1, LOperand *temp2, LOperand *temp3)
LStoreFrameContext(LOperand *context)
LStoreKeyed(LOperand *elements, LOperand *key, LOperand *value)
bool is_typed_elements() const
bool NeedsCanonicalization()
bool is_fixed_typed_array() const
void PrintDataTo(StringStream *stream) OVERRIDE
ElementsKind elements_kind() const
uint32_t base_offset() const
LSubS(LOperand *left, LOperand *right)
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)
LUnaryMathOperation(LOperand *value)
BuiltinFunctionId op() const
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
enable harmony numeric enable harmony object literal extensions Optimize object Array shift
#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 Object * DeclareGlobals(Isolate *isolate, Handle< GlobalObject > global, Handle< String > name, Handle< Object > value, PropertyAttributes attr, bool is_var, bool is_const, bool is_function)
const unsigned kWRegSizeInBits
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)