5 #ifndef V8_MIPS_LITHIUM_MIPS_H_
6 #define V8_MIPS_LITHIUM_MIPS_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) \
135 V(SeqStringGetChar) \
136 V(SeqStringSetChar) \
142 V(StoreContextSlot) \
143 V(StoreFrameContext) \
146 V(StoreKeyedGeneric) \
148 V(StoreNamedGeneric) \
150 V(StringCharCodeAt) \
151 V(StringCharFromCode) \
152 V(StringCompareAndBranch) \
155 V(TailCallThroughMegamorphicCache) \
157 V(ToFastProperties) \
158 V(TransitionElementsKind) \
159 V(TrapAllocationMemento) \
161 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; }
287 class LTemplateResultInstruction :
public LInstruction {
305 template<
int R,
int I,
int T>
306 class LTemplateInstruction :
public LTemplateResultInstruction<R> {
308 EmbeddedContainer<LOperand*, I>
inputs_;
309 EmbeddedContainer<LOperand*, T>
temps_;
321 class LGap :
public LTemplateInstruction<0, 0, 0> {
336 return reinterpret_cast<LGap*
>(instr);
369 class LInstructionGap
FINAL :
public LGap {
374 return !IsRedundant();
381 class LGoto
FINAL :
public LTemplateInstruction<0, 0, 0> {
383 explicit LGoto(HBasicBlock* block) : block_(block) { }
387 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
388 virtual
bool IsControl() const
OVERRIDE {
return true; }
390 int block_id()
const {
return block_->block_id(); }
397 class LLazyBailout
FINAL :
public LTemplateInstruction<0, 0, 0> {
403 void set_gap_instructions_size(
int gap_instructions_size) {
404 gap_instructions_size_ = gap_instructions_size;
409 int gap_instructions_size_;
413 class LDummy
FINAL :
public LTemplateInstruction<1, 0, 0> {
420 class LDummyUse
FINAL :
public LTemplateInstruction<1, 1, 0> {
429 class LDeoptimize
FINAL :
public LTemplateInstruction<0, 0, 0> {
440 :
LGap(block), replacement_(
NULL) { }
447 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
449 int block_id()
const {
return block()->block_id(); }
459 LLabel* replacement_;
463 class LParameter
FINAL :
public LTemplateInstruction<1, 0, 0> {
472 class LCallStub
FINAL :
public LTemplateInstruction<1, 1, 0> {
475 inputs_[0] = context;
485 class LTailCallThroughMegamorphicCache
FINAL
491 inputs_[0] = context;
492 inputs_[1] = receiver;
501 "tail-call-through-megamorphic-cache")
515 template<
int I,
int T>
516 class LControlInstruction :
public LTemplateInstruction<0, I, T> {
533 if (true_label_ ==
NULL) {
539 if (false_label_ ==
NULL) {
559 class LWrapReceiver
FINAL :
public LTemplateInstruction<1, 2, 0> {
562 inputs_[0] = receiver;
563 inputs_[1] =
function;
574 class LApplyArguments
FINAL :
public LTemplateInstruction<1, 4, 0> {
580 inputs_[0] =
function;
581 inputs_[1] = receiver;
583 inputs_[3] = elements;
595 class LAccessArgumentsAt
FINAL :
public LTemplateInstruction<1, 3, 0> {
598 inputs_[0] = arguments;
616 inputs_[0] = elements;
625 class LArgumentsElements
FINAL :
public LTemplateInstruction<1, 0, 0> {
632 class LModByPowerOf2I
FINAL : public LTemplateInstruction<1, 1, 0> {
635 inputs_[0] = dividend;
653 inputs_[0] = dividend;
687 inputs_[0] = dividend;
705 inputs_[0] = dividend;
723 inputs_[0] = dividend;
724 inputs_[1] = divisor;
740 inputs_[0] = dividend;
748 "flooring-div-by-power-of-2-i")
759 inputs_[0] = dividend;
779 inputs_[0] = dividend;
780 inputs_[1] = divisor;
812 inputs_[1] = multiplier;
813 inputs_[2] = multiplicand;
824 class LDebugBreak
FINAL :
public LTemplateInstruction<0, 0, 0> {
830 class LCompareNumericAndBranch
FINAL :
public LControlInstruction<2, 0> {
841 "compare-numeric-and-branch")
844 Token::
Value op()
const {
return hydrogen()->token(); }
845 bool is_double()
const {
846 return hydrogen()->representation().IsDouble();
849 virtual void PrintDataTo(StringStream* stream)
OVERRIDE;
853 class LMathFloor
FINAL :
public LTemplateInstruction<1, 1, 1> {
893 class LMathAbs
FINAL :
public LTemplateInstruction<1, 2, 0> {
896 inputs_[1] = context;
920 class LMathClz32
FINAL :
public LTemplateInstruction<1, 1, 0> {
932 class LMathExp
FINAL :
public LTemplateInstruction<1, 1, 3> {
941 temps_[2] = double_temp;
942 ExternalReference::InitializeMathExpData();
954 class LMathSqrt
FINAL :
public LTemplateInstruction<1, 1, 0> {
966 class LMathPowHalf
FINAL :
public LTemplateInstruction<1, 1, 1> {
980 class LCmpObjectEqAndBranch
FINAL :
public LControlInstruction<2, 0> {
1019 "cmp-minus-zero-and-branch")
1037 virtual
void PrintDataTo(StringStream* stream);
1054 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1069 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1084 "is-undetectable-and-branch")
1087 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1094 inputs_[0] = context;
1104 "string-compare-and-branch")
1107 Token::
Value op()
const {
return hydrogen()->token(); }
1109 virtual void PrintDataTo(StringStream* stream)
OVERRIDE;
1113 class LHasInstanceTypeAndBranch
FINAL :
public LControlInstruction<1, 0> {
1122 "has-instance-type-and-branch")
1125 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1142 class LHasCachedArrayIndexAndBranch
FINAL
1152 "has-cached-array-index-and-branch")
1155 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;
1277 : op_(op), can_deopt_(can_deopt) {
1315 int32_t value()
const {
return hydrogen()->Integer32Value(); }
1319 class LConstantS
FINAL :
public LTemplateInstruction<1, 0, 0> {
1328 class LConstantD
FINAL :
public LTemplateInstruction<1, 0, 0> {
1333 double value()
const {
return hydrogen()->DoubleValue(); }
1337 class LConstantE
FINAL :
public LTemplateInstruction<1, 0, 0> {
1342 ExternalReference value()
const {
1343 return hydrogen()->ExternalReferenceValue();
1348 class LConstantT
FINAL :
public LTemplateInstruction<1, 0, 0> {
1354 return hydrogen()->handle(isolate);
1359 class LBranch
FINAL :
public LControlInstruction<1, 0> {
1370 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1391 class LMapEnumLength
FINAL :
public LTemplateInstruction<1, 1, 0> {
1403 class LDateField
FINAL :
public LTemplateInstruction<1, 1, 1> {
1425 inputs_[0] = string;
1443 inputs_[0] = context;
1444 inputs_[1] = string;
1516 return LInstruction::kArithmeticD;
1533 inputs_[0] = context;
1556 inputs_[1] = context;
1557 inputs_[2] = parameter_count;
1563 return parameter_count()->IsConstantOperand();
1566 DCHECK(has_constant_parameter_count());
1567 return LConstantOperand::cast(parameter_count());
1575 class LLoadNamedField
FINAL :
public LTemplateInstruction<1, 1, 0> {
1578 inputs_[0] = object;
1591 inputs_[0] = context;
1592 inputs_[1] = object;
1607 class LLoadFunctionPrototype
FINAL :
public LTemplateInstruction<1, 1, 0> {
1610 inputs_[0] =
function;
1625 Heap::RootListIndex index()
const {
return hydrogen()->index(); }
1629 class LLoadKeyed
FINAL :
public LTemplateInstruction<1, 2, 0> {
1632 inputs_[0] = elements;
1639 return hydrogen()->elements_kind();
1642 return hydrogen()->is_external();
1645 return hydrogen()->is_fixed_typed_array();
1648 return is_external() || is_fixed_typed_array();
1654 virtual
void PrintDataTo(StringStream* stream);
1655 uint32_t base_offset()
const {
return hydrogen()->base_offset(); }
1659 class LLoadKeyedGeneric
FINAL :
public LTemplateInstruction<1, 3, 1> {
1663 inputs_[0] = context;
1664 inputs_[1] = object;
1690 inputs_[0] = context;
1691 inputs_[1] = global_object;
1707 class LStoreGlobalCell
FINAL :
public LTemplateInstruction<0, 1, 1> {
1725 inputs_[0] = context;
1733 int slot_index() {
return hydrogen()->slot_index(); }
1742 inputs_[0] = context;
1752 int slot_index() {
return hydrogen()->slot_index(); }
1770 class LDrop
FINAL :
public LTemplateInstruction<0, 0, 0> {
1772 explicit LDrop(
int count) : count_(count) { }
1786 inputs_[0] =
function;
1787 inputs_[1] = code_object;
1803 inputs_[0] = base_object;
1804 inputs_[1] = offset;
1823 class LContext
FINAL :
public LTemplateInstruction<1, 0, 0> {
1830 class LDeclareGlobals
FINAL : public LTemplateInstruction<0, 1, 0> {
1833 inputs_[0] = context;
1846 inputs_[0] =
function;
1854 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1856 int arity()
const {
return hydrogen()->argument_count() - 1; }
1860 class LCallWithDescriptor
FINAL :
public LTemplateResultInstruction<1> {
1864 : descriptor_(descriptor),
1865 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1867 inputs_.AddAll(operands, zone);
1878 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1880 int arity()
const {
return hydrogen()->argument_count() - 1; }
1894 class LInvokeFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1897 inputs_[0] = context;
1898 inputs_[1] =
function;
1907 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1909 int arity()
const {
return hydrogen()->argument_count() - 1; }
1913 class LCallFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1916 inputs_[0] = context;
1917 inputs_[1] =
function;
1926 int arity()
const {
return hydrogen()->argument_count() - 1; }
1930 class LCallNew
FINAL :
public LTemplateInstruction<1, 2, 0> {
1933 inputs_[0] = context;
1934 inputs_[1] = constructor;
1943 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1945 int arity()
const {
return hydrogen()->argument_count() - 1; }
1949 class LCallNewArray
FINAL :
public LTemplateInstruction<1, 2, 0> {
1952 inputs_[0] = context;
1953 inputs_[1] = constructor;
1962 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1964 int arity()
const {
return hydrogen()->argument_count() - 1; }
1968 class LCallRuntime
FINAL :
public LTemplateInstruction<1, 1, 0> {
1971 inputs_[0] = context;
1984 int arity()
const {
return hydrogen()->argument_count(); }
1989 class LInteger32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
2001 class LUint32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
2013 class LNumberTagI
FINAL :
public LTemplateInstruction<1, 1, 2> {
2029 class LNumberTagU
FINAL :
public LTemplateInstruction<1, 1, 2> {
2045 class LNumberTagD
FINAL :
public LTemplateInstruction<1, 1, 2> {
2073 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2078 class LDoubleToI
FINAL :
public LTemplateInstruction<1, 1, 0> {
2089 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2094 class LTaggedToI
FINAL :
public LTemplateInstruction<1, 1, 2> {
2111 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2115 class LSmiTag
FINAL :
public LTemplateInstruction<1, 1, 0> {
2144 : needs_check_(needs_check) {
2161 inputs_[0] = object;
2173 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2176 return hydrogen()->field_representation();
2181 class LStoreNamedGeneric
FINAL :
public LTemplateInstruction<0, 3, 0> {
2184 inputs_[0] = context;
2185 inputs_[1] = object;
2196 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2203 class LStoreKeyed
FINAL :
public LTemplateInstruction<0, 3, 0> {
2206 inputs_[0] = object;
2213 return hydrogen()->is_fixed_typed_array();
2216 return is_external() || is_fixed_typed_array();
2222 return hydrogen()->elements_kind();
2228 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2229 bool NeedsCanonicalization() {
return hydrogen()->NeedsCanonicalization(); }
2234 class LStoreKeyedGeneric
FINAL :
public LTemplateInstruction<0, 4, 0> {
2240 inputs_[0] = context;
2254 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2260 class LTransitionElementsKind
FINAL :
public LTemplateInstruction<0, 2, 1> {
2265 inputs_[0] = object;
2266 inputs_[1] = context;
2267 temps_[0] = new_map_temp;
2275 "transition-elements-kind")
2278 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2280 Handle<
Map> original_map() {
return hydrogen()->original_map().handle(); }
2282 return hydrogen()->transitioned_map().handle();
2289 class LTrapAllocationMemento
FINAL :
public LTemplateInstruction<0, 1, 1> {
2293 inputs_[0] = object;
2301 "trap-allocation-memento")
2305 class LStringAdd
FINAL :
public LTemplateInstruction<1, 3, 0> {
2308 inputs_[0] = context;
2326 inputs_[0] = context;
2327 inputs_[1] = string;
2343 inputs_[0] = context;
2344 inputs_[1] = char_code;
2406 class LCheckNonSmi
FINAL :
public LTemplateInstruction<0, 1, 0> {
2422 inputs_[0] = unclamped;
2433 class LClampIToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
2436 inputs_[0] = unclamped;
2445 class LClampTToUint8
FINAL :
public LTemplateInstruction<1, 1, 1> {
2448 inputs_[0] = unclamped;
2459 class LDoubleBits
FINAL :
public LTemplateInstruction<1, 1, 0> {
2486 class LAllocate
FINAL :
public LTemplateInstruction<1, 2, 2> {
2492 inputs_[0] = context;
2511 inputs_[0] = context;
2524 inputs_[0] = context;
2550 inputs_[0] = context;
2561 class LTypeofIsAndBranch
FINAL :
public LControlInstruction<1, 0> {
2587 "is-construct-call-and-branch")
2591 class LOsrEntry
FINAL :
public LTemplateInstruction<0, 0, 0> {
2602 class LStackCheck
FINAL :
public LTemplateInstruction<0, 1, 0> {
2605 inputs_[0] = context;
2613 Label* done_label() {
return &done_label_; }
2620 class LForInPrepareMap
FINAL :
public LTemplateInstruction<1, 2, 0> {
2623 inputs_[0] = context;
2624 inputs_[1] = object;
2634 class LForInCacheArray
FINAL :
public LTemplateInstruction<1, 1, 0> {
2645 return HForInCacheArray::cast(this->hydrogen_value())->idx();
2650 class LCheckMapValue
FINAL :
public LTemplateInstruction<0, 2, 0> {
2664 class LLoadFieldByIndex
FINAL :
public LTemplateInstruction<1, 2, 0> {
2667 inputs_[0] = object;
2678 class LStoreFrameContext:
public LTemplateInstruction<0, 1, 0> {
2681 inputs_[0] = context;
2690 class LAllocateBlockContext:
public LTemplateInstruction<1, 2, 0> {
2693 inputs_[0] = context;
2694 inputs_[1] =
function;
2707 class LChunkBuilder;
2711 :
LChunk(info, graph) { }
2722 current_instruction_(
NULL),
2723 current_block_(
NULL),
2725 allocator_(allocator) {}
2731 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2845 HBasicBlock* current_block_;
2846 HBasicBlock* next_block_;
2847 LAllocator* allocator_;
2852 #undef DECLARE_HYDROGEN_ACCESSOR
2853 #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)
LDivByConstI(LOperand *dividend, int32_t divisor)
LSmiUntag(LOperand *value, bool needs_check)
LInstruction * DoDivByPowerOf2I(HDiv *instr)
LCheckSmi(LOperand *value)
LTypeofIsAndBranch(LOperand *value)
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)
LDivByPowerOf2I(LOperand *dividend, int32_t divisor)
LStoreKeyed(LOperand *object, LOperand *key, LOperand *value)
LUint32ToDouble(LOperand *value)
LModByPowerOf2I(LOperand *dividend, int32_t divisor)
const CallInterfaceDescriptor descriptor()
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)
MUST_USE_RESULT LUnallocated * TempDoubleRegister()
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)
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)
LDoubleBits(LOperand *value)
LDeclareGlobals(LOperand *context)
LIsUndetectableAndBranch(LOperand *value, LOperand *temp)
virtual void CompileToNative(LCodeGen *generator) OVERRIDE
LWrapReceiver(LOperand *receiver, LOperand *function)
LNumberTagD(LOperand *value, LOperand *temp, LOperand *temp2)
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)
LInstruction * DoBit(Token::Value op, HBitwiseBinaryOperation *instr)
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)
LCmpT(LOperand *context, LOperand *left, LOperand *right)
LInstruction * DoMathAbs(HUnaryMathOperation *instr)
LLabel * replacement() const
LCompareMinusZeroAndBranch(LOperand *value, LOperand *temp)
LStoreContextSlot(LOperand *context, LOperand *value)
LMathExp(LOperand *value, LOperand *double_temp, LOperand *temp1, LOperand *temp2)
LCmpMapAndBranch(LOperand *value, LOperand *temp)
LDummyUse(LOperand *value)
LInstruction * DoMathExp(HUnaryMathOperation *instr)
MUST_USE_RESULT LOperand * UseTempRegister(HValue *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)
bool is_fixed_typed_array() const
LLoadNamedField(LOperand *object)
LUnallocated * ToUnallocated(DoubleRegister reg)
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)
LInstruction * DoMathFloor(HUnaryMathOperation *instr)
LIsStringAndBranch(LOperand *value, LOperand *temp)
LInstruction * DoMathRound(HUnaryMathOperation *instr)
LGoto(HBasicBlock *block)
LCallNew(LOperand *context, LOperand *constructor)
LStackCheck(LOperand *context)
LLoadFieldByIndex(LOperand *object, LOperand *index)
virtual LOperand * InputAt(int i) FINAL OVERRIDE
virtual bool IsControl() const OVERRIDE
void DoBasicBlock(HBasicBlock *block, HBasicBlock *next_block)
LClampTToUint8(LOperand *unclamped, LOperand *temp)
LArgumentsLength(LOperand *elements)
LModI(LOperand *left, LOperand *right)
LIsConstructCallAndBranch(LOperand *temp)
LMathFround(LOperand *value)
LLoadNamedGeneric(LOperand *context, LOperand *object, LOperand *vector)
MUST_USE_RESULT LOperand * UseFixedDouble(HValue *value, DoubleRegister fixed_register)
LCheckMapValue(LOperand *value, LOperand *map)
LArithmeticT(Token::Value op, LOperand *context, LOperand *left, LOperand *right)
LLoadKeyedGeneric(LOperand *context, LOperand *object, LOperand *key, LOperand *vector)
LGetCachedArrayIndex(LOperand *value)
LDoubleToI(LOperand *value)
LOperand * GetNextSpillSlot(RegisterKind kind)
LConstantOperand * constant_parameter_count()
LCallNewArray(LOperand *context, LOperand *constructor)
DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, "class-of-test-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
virtual Opcode opcode() const FINAL
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)
LInstruction * DoMultiplyAdd(HMul *mul, HValue *addend)
LClampDToUint8(LOperand *unclamped, LOperand *temp)
MUST_USE_RESULT LOperand * UseRegisterAtStart(HValue *value)
LInstruction * DoMathPowHalf(HUnaryMathOperation *instr)
LInvokeFunction(LOperand *context, LOperand *function)
LSubI(LOperand *left, LOperand *right)
LMathFloor(LOperand *value, LOperand *temp)
LCheckMaps(LOperand *value=NULL)
LInstruction * DoFlooringDivByConstI(HMathFloorOfDiv *instr)
LMulI(LOperand *left, LOperand *right)
bool is_typed_elements() const
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)
LCheckInstanceType(LOperand *value)
LInstruction * DoArithmeticD(Token::Value op, HArithmeticBinaryOperation *instr)
LStoreKeyedGeneric(LOperand *context, LOperand *obj, LOperand *key, LOperand *value)
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
LCallWithDescriptor(CallInterfaceDescriptor descriptor, const ZoneList< LOperand * > &operands, Zone *zone)
LOperand * global_object()
LCallRuntime(LOperand *context)
LLoadGlobalGeneric(LOperand *context, LOperand *global_object, LOperand *vector)
LAllocate(LOperand *context, LOperand *size, LOperand *temp1, LOperand *temp2)
MUST_USE_RESULT LOperand * UseFixed(HValue *value, Register fixed_register)
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)
LOperand * multiplicand()
LPushArgument(LOperand *value)
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, "has-cached-array-index-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
MUST_USE_RESULT LOperand * UseRegister(HValue *value)
LClassOfTestAndBranch(LOperand *value, LOperand *temp)
bool is_osr_entry() const
static bool HasMagicNumberForDivisor(int32_t divisor)
LMultiplyAddD(LOperand *addend, LOperand *multiplier, LOperand *multiplicand)
virtual const char * Mnemonic() const OVERRIDE
LFlooringDivByConstI(LOperand *dividend, int32_t divisor, LOperand *temp)
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)
virtual void PrintDataTo(StringStream *stream)
Handle< Map > transitioned_map()
LMathLog(LOperand *value)
LLoadKeyed(LOperand *elements, LOperand *key)
LOperand * parameter_count()
LReturn(LOperand *value, LOperand *context, LOperand *parameter_count)
LCallFunction(LOperand *context, LOperand *function)
LTaggedToI(LOperand *value, LOperand *temp, LOperand *temp2)
MUST_USE_RESULT LOperand * FixedTemp(DoubleRegister reg)
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
LIsObjectAndBranch(LOperand *value, LOperand *temp)
LTypeof(LOperand *context, LOperand *value)
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
LEnvironment * GetDeferredLazyDeoptimizationEnvironment()
LClampIToUint8(LOperand *unclamped)
LFlooringDivI(LOperand *dividend, LOperand *divisor)
int gap_instructions_size()
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
LModByConstI(LOperand *dividend, int32_t divisor)
LTransitionElementsKind(LOperand *object, LOperand *context, LOperand *new_map_temp)
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
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
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 Object * DeclareGlobals(Isolate *isolate, Handle< GlobalObject > global, Handle< String > name, Handle< Object > value, PropertyAttributes attr, bool is_var, bool is_const, bool is_function)
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)