5 #ifndef V8_X87_LITHIUM_X87_H_
6 #define V8_X87_LITHIUM_X87_H_
18 class RCodeVisualizer;
24 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
25 V(AccessArgumentsAt) \
27 V(AllocateBlockContext) \
30 V(ArgumentsElements) \
38 V(CallWithDescriptor) \
44 V(CheckInstanceType) \
52 V(ClampTToUint8NoSSE2) \
53 V(ClassOfTestAndBranch) \
55 V(CompareMinusZeroAndBranch) \
56 V(CompareNumericAndBranch) \
57 V(CmpObjectEqAndBranch) \
81 V(FlooringDivByConstI) \
82 V(FlooringDivByPowerOf2I) \
87 V(GetCachedArrayIndex) \
89 V(HasCachedArrayIndexAndBranch) \
90 V(HasInstanceTypeAndBranch) \
91 V(InnerAllocatedObject) \
93 V(InstanceOfKnownGlobal) \
95 V(Integer32ToDouble) \
97 V(IsConstructCallAndBranch) \
98 V(IsObjectAndBranch) \
99 V(IsStringAndBranch) \
101 V(IsUndetectableAndBranch) \
105 V(LoadFieldByIndex) \
106 V(LoadFunctionPrototype) \
108 V(LoadGlobalGeneric) \
110 V(LoadKeyedGeneric) \
112 V(LoadNamedGeneric) \
139 V(SeqStringGetChar) \
140 V(SeqStringSetChar) \
146 V(StoreContextSlot) \
147 V(StoreFrameContext) \
150 V(StoreKeyedGeneric) \
152 V(StoreNamedGeneric) \
154 V(StringCharCodeAt) \
155 V(StringCharFromCode) \
156 V(StringCompareAndBranch) \
159 V(TailCallThroughMegamorphicCache) \
161 V(ToFastProperties) \
162 V(TransitionElementsKind) \
163 V(TrapAllocationMemento) \
165 V(TypeofIsAndBranch) \
171 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
172 virtual Opcode opcode() const FINAL OVERRIDE { \
173 return LInstruction::k##type; \
175 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
176 virtual const char* Mnemonic() const FINAL OVERRIDE { \
179 static L##type* cast(LInstruction* instr) { \
180 DCHECK(instr->Is##type()); \
181 return reinterpret_cast<L##type*>(instr); \
185 #define DECLARE_HYDROGEN_ACCESSOR(type) \
186 H##type* hydrogen() const { \
187 return H##type::cast(hydrogen_value()); \
191 class LInstruction :
public ZoneObject {
209 #define DECLARE_OPCODE(type) k##type,
212 #undef DECLARE_OPCODE
218 #define DECLARE_PREDICATE(type) \
219 bool Is##type() const { return opcode() == k##type; }
221 #undef DECLARE_PREDICATE
225 virtual bool IsGap()
const {
return false; }
296 class LTemplateResultInstruction :
public LInstruction {
314 template<
int R,
int I,
int T>
315 class LTemplateInstruction :
public LTemplateResultInstruction<R> {
317 EmbeddedContainer<LOperand*, I>
inputs_;
318 EmbeddedContainer<LOperand*, T>
temps_;
330 class LGap :
public LTemplateInstruction<0, 0, 0> {
344 return reinterpret_cast<LGap*
>(instr);
377 class LInstructionGap
FINAL :
public LGap {
382 return !IsRedundant();
389 class LClobberDoubles
FINAL :
public LTemplateInstruction<0, 0, 0> {
401 class LGoto
FINAL :
public LTemplateInstruction<0, 0, 0> {
403 explicit LGoto(HBasicBlock* block) : block_(block) { }
407 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
408 virtual
bool IsControl() const
OVERRIDE {
return true; }
410 int block_id()
const {
return block_->block_id(); }
416 HBasicBlock*
block()
const {
return block_; }
423 class LLazyBailout
FINAL :
public LTemplateInstruction<0, 0, 0> {
429 class LDummy
FINAL :
public LTemplateInstruction<1, 0, 0> {
436 class LDummyUse
FINAL :
public LTemplateInstruction<1, 1, 0> {
445 class LDeoptimize
FINAL :
public LTemplateInstruction<0, 0, 0> {
456 :
LGap(block), replacement_(
NULL) { }
463 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
465 int block_id()
const {
return block()->block_id(); }
475 LLabel* replacement_;
479 class LParameter
FINAL :
public LTemplateInstruction<1, 0, 0> {
488 class LCallStub
FINAL :
public LTemplateInstruction<1, 1, 0> {
491 inputs_[0] = context;
501 class LTailCallThroughMegamorphicCache
FINAL
507 inputs_[0] = context;
508 inputs_[1] = receiver;
517 "tail-call-through-megamorphic-cache")
531 template<
int I,
int T>
532 class LControlInstruction:
public LTemplateInstruction<0, I, T> {
549 if (true_label_ ==
NULL) {
555 if (false_label_ ==
NULL) {
575 class LWrapReceiver
FINAL :
public LTemplateInstruction<1, 2, 1> {
580 inputs_[0] = receiver;
581 inputs_[1] =
function;
600 inputs_[0] =
function;
601 inputs_[1] = receiver;
603 inputs_[3] = elements;
615 class LAccessArgumentsAt
FINAL :
public LTemplateInstruction<1, 3, 0> {
618 inputs_[0] = arguments;
629 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
636 inputs_[0] = elements;
645 class LArgumentsElements
FINAL :
public LTemplateInstruction<1, 0, 0> {
652 class LDebugBreak
FINAL : public LTemplateInstruction<0, 0, 0> {
658 class LModByPowerOf2I
FINAL :
public LTemplateInstruction<1, 1, 0> {
661 inputs_[0] = dividend;
682 inputs_[0] = dividend;
721 inputs_[0] = dividend;
742 inputs_[0] = dividend;
764 inputs_[0] = dividend;
765 inputs_[1] = divisor;
781 inputs_[0] = dividend;
789 "flooring-div-by-power-of-2-i")
804 inputs_[0] = dividend;
828 inputs_[0] = dividend;
829 inputs_[1] = divisor;
870 "compare-numeric-and-branch")
873 Token::
Value op()
const {
return hydrogen()->token(); }
874 bool is_double()
const {
875 return hydrogen()->representation().IsDouble();
878 virtual void PrintDataTo(StringStream* stream);
882 class LMathFloor
FINAL :
public LTemplateInstruction<1, 1, 0> {
918 class LMathAbs
FINAL :
public LTemplateInstruction<1, 2, 0> {
921 inputs_[1] = context;
945 class LMathClz32
FINAL :
public LTemplateInstruction<1, 1, 0> {
957 class LMathExp
FINAL :
public LTemplateInstruction<1, 1, 2> {
965 ExternalReference::InitializeMathExpData();
976 class LMathSqrt
FINAL :
public LTemplateInstruction<1, 1, 2> {
994 class LMathPowHalf
FINAL :
public LTemplateInstruction<1, 1, 0> {
1004 class LCmpObjectEqAndBranch
FINAL :
public LControlInstruction<2, 0> {
1018 class LCmpHoleAndBranch
FINAL :
public LControlInstruction<1, 0> {
1021 inputs_[0] = object;
1038 "cmp-minus-zero-and-branch")
1055 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1072 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1087 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1102 "is-undetectable-and-branch")
1105 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1112 inputs_[0] = context;
1122 "string-compare-and-branch")
1125 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1131 class LHasInstanceTypeAndBranch
FINAL :
public LControlInstruction<1, 1> {
1142 "has-instance-type-and-branch")
1145 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1162 class LHasCachedArrayIndexAndBranch
FINAL
1172 "has-cached-array-index-and-branch")
1174 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1187 "is-construct-call-and-branch")
1191 class LClassOfTestAndBranch
FINAL :
public LControlInstruction<1, 2> {
1204 "class-of-test-and-branch")
1207 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1214 inputs_[0] = context;
1227 class LInstanceOf
FINAL :
public LTemplateInstruction<1, 3, 0> {
1230 inputs_[0] = context;
1241 class LInstanceOfKnownGlobal
FINAL :
public LTemplateInstruction<1, 2, 1> {
1244 inputs_[0] = context;
1254 "instance-of-known-global")
1259 return lazy_deopt_env_;
1263 lazy_deopt_env_ = env;
1267 LEnvironment* lazy_deopt_env_;
1271 class LBoundsCheck
FINAL :
public LTemplateInstruction<0, 2, 0> {
1275 inputs_[1] = length;
1303 class LShiftI
FINAL :
public LTemplateInstruction<1, 2, 0> {
1306 : op_(op), can_deopt_(can_deopt) {
1325 class LSubI
FINAL :
public LTemplateInstruction<1, 2, 0> {
1345 int32_t value()
const {
return hydrogen()->Integer32Value(); }
1349 class LConstantS
FINAL :
public LTemplateInstruction<1, 0, 0> {
1358 class LConstantD
FINAL :
public LTemplateInstruction<1, 0, 1> {
1363 double value()
const {
return hydrogen()->DoubleValue(); }
1367 class LConstantE
FINAL :
public LTemplateInstruction<1, 0, 0> {
1372 ExternalReference value()
const {
1373 return hydrogen()->ExternalReferenceValue();
1378 class LConstantT
FINAL :
public LTemplateInstruction<1, 0, 0> {
1384 return hydrogen()->handle(isolate);
1389 class LBranch
FINAL :
public LControlInstruction<1, 1> {
1402 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1421 class LMapEnumLength
FINAL :
public LTemplateInstruction<1, 1, 0> {
1433 class LDateField
FINAL :
public LTemplateInstruction<1, 1, 1> {
1447 Smi* index()
const {
return index_; }
1454 class LSeqStringGetChar
FINAL :
public LTemplateInstruction<1, 2, 0> {
1457 inputs_[0] = string;
1475 inputs_[0] = context;
1476 inputs_[1] = string;
1502 add->BetterLeftOperand()->UseCount() > 1;
1556 return LInstruction::kArithmeticD;
1573 inputs_[0] = context;
1583 return LInstruction::kArithmeticT;
1595 class LReturn
FINAL :
public LTemplateInstruction<0, 3, 0> {
1601 inputs_[1] = context;
1602 inputs_[2] = parameter_count;
1606 return parameter_count()->IsConstantOperand();
1609 DCHECK(has_constant_parameter_count());
1610 return LConstantOperand::cast(parameter_count());
1622 inputs_[0] = object;
1635 inputs_[0] = context;
1636 inputs_[1] = object;
1651 class LLoadFunctionPrototype
FINAL :
public LTemplateInstruction<1, 1, 1> {
1654 inputs_[0] =
function;
1671 Heap::RootListIndex index()
const {
return hydrogen()->index(); }
1675 class LLoadKeyed
FINAL :
public LTemplateInstruction<1, 2, 0> {
1678 inputs_[0] = elements;
1684 return hydrogen()->elements_kind();
1687 return hydrogen()->is_external();
1690 return hydrogen()->is_fixed_typed_array();
1693 return is_external() || is_fixed_typed_array();
1699 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1700 uint32_t base_offset()
const {
return hydrogen()->base_offset(); }
1702 return hydrogen()->key()->representation().IsTagged();
1713 return key_representation.
IsSmi() &&
1723 class LLoadKeyedGeneric
FINAL :
public LTemplateInstruction<1, 3, 1> {
1727 inputs_[0] = context;
1754 inputs_[0] = context;
1755 inputs_[1] = global_object;
1771 class LStoreGlobalCell
FINAL :
public LTemplateInstruction<0, 1, 0> {
1787 inputs_[0] = context;
1795 int slot_index() {
return hydrogen()->slot_index(); }
1804 inputs_[0] = context;
1816 int slot_index() {
return hydrogen()->slot_index(); }
1834 class LDrop
FINAL :
public LTemplateInstruction<0, 0, 0> {
1836 explicit LDrop(
int count) : count_(count) { }
1850 inputs_[0] =
function;
1851 inputs_[1] = code_object;
1867 inputs_[0] = base_object;
1868 inputs_[1] = offset;
1897 inputs_[0] = context;
1910 inputs_[0] =
function;
1918 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1920 int arity()
const {
return hydrogen()->argument_count() - 1; }
1924 class LCallWithDescriptor
FINAL :
public LTemplateResultInstruction<1> {
1928 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1930 inputs_.AddAll(operands, zone);
1940 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1942 int arity()
const {
return hydrogen()->argument_count() - 1; }
1955 class LInvokeFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1958 inputs_[0] = context;
1959 inputs_[1] =
function;
1968 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
1970 int arity()
const {
return hydrogen()->argument_count() - 1; }
1974 class LCallFunction
FINAL :
public LTemplateInstruction<1, 2, 0> {
1977 inputs_[0] = context;
1978 inputs_[1] =
function;
1987 int arity()
const {
return hydrogen()->argument_count() - 1; }
1991 class LCallNew
FINAL :
public LTemplateInstruction<1, 2, 0> {
1994 inputs_[0] = context;
1995 inputs_[1] = constructor;
2004 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2006 int arity()
const {
return hydrogen()->argument_count() - 1; }
2010 class LCallNewArray
FINAL :
public LTemplateInstruction<1, 2, 0> {
2013 inputs_[0] = context;
2014 inputs_[1] = constructor;
2023 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2025 int arity()
const {
return hydrogen()->argument_count() - 1; }
2029 class LCallRuntime
FINAL :
public LTemplateInstruction<1, 1, 0> {
2032 inputs_[0] = context;
2045 int arity()
const {
return hydrogen()->argument_count(); }
2050 class LInteger32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 0> {
2062 class LUint32ToDouble
FINAL :
public LTemplateInstruction<1, 1, 1> {
2074 class LNumberTagI
FINAL :
public LTemplateInstruction<1, 1, 1> {
2088 class LNumberTagU
FINAL :
public LTemplateInstruction<1, 1, 1> {
2102 class LNumberTagD
FINAL :
public LTemplateInstruction<1, 1, 1> {
2129 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2133 class LDoubleToSmi
FINAL :
public LTemplateInstruction<1, 1, 0> {
2158 bool truncating() {
return hydrogen()->CanTruncateToInt32(); }
2162 class LSmiTag
FINAL :
public LTemplateInstruction<1, 1, 0> {
2193 : needs_check_(needs_check) {
2201 bool needs_check()
const {
return needs_check_; }
2208 class LStoreNamedField
FINAL :
public LTemplateInstruction<0, 2, 2> {
2217 temps_[1] = temp_map;
2228 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2235 inputs_[0] = context;
2236 inputs_[1] = object;
2247 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2253 class LStoreKeyed
FINAL :
public LTemplateInstruction<0, 3, 0> {
2263 return hydrogen()->is_fixed_typed_array();
2266 return is_external() || is_fixed_typed_array();
2272 return hydrogen()->elements_kind();
2278 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2279 uint32_t base_offset()
const {
return hydrogen()->base_offset(); }
2284 class LStoreKeyedGeneric
FINAL :
public LTemplateInstruction<0, 4, 0> {
2290 inputs_[0] = context;
2291 inputs_[1] = object;
2304 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2310 class LTransitionElementsKind
FINAL :
public LTemplateInstruction<0, 2, 2> {
2316 inputs_[0] = object;
2317 inputs_[1] = context;
2318 temps_[0] = new_map_temp;
2328 "transition-elements-kind")
2331 virtual
void PrintDataTo(StringStream* stream)
OVERRIDE;
2333 Handle<
Map> original_map() {
return hydrogen()->original_map().handle(); }
2335 return hydrogen()->transitioned_map().handle();
2342 class LTrapAllocationMemento
FINAL :
public LTemplateInstruction<0, 1, 1> {
2346 inputs_[0] = object;
2354 "trap-allocation-memento")
2358 class LStringAdd
FINAL :
public LTemplateInstruction<1, 3, 0> {
2361 inputs_[0] = context;
2378 inputs_[0] = context;
2379 inputs_[1] = string;
2395 inputs_[0] = context;
2396 inputs_[1] = char_code;
2460 class LClampDToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
2472 class LClampIToUint8
FINAL :
public LTemplateInstruction<1, 1, 0> {
2485 class LClampTToUint8NoSSE2
FINAL :
public LTemplateInstruction<1, 1, 3> {
2491 inputs_[0] = unclamped;
2503 "clamp-t-to-uint8-nosse2")
2548 class LAllocate
FINAL :
public LTemplateInstruction<1, 2, 1> {
2551 inputs_[0] = context;
2568 inputs_[0] = context;
2581 inputs_[0] = context;
2607 inputs_[0] = context;
2618 class LTypeofIsAndBranch
FINAL :
public LControlInstruction<1, 0> {
2644 class LStackCheck
FINAL :
public LTemplateInstruction<0, 1, 0> {
2647 inputs_[0] = context;
2655 Label* done_label() {
return &done_label_; }
2662 class LForInPrepareMap
FINAL :
public LTemplateInstruction<1, 2, 0> {
2665 inputs_[0] = context;
2666 inputs_[1] = object;
2676 class LForInCacheArray
FINAL :
public LTemplateInstruction<1, 1, 0> {
2687 return HForInCacheArray::cast(this->hydrogen_value())->idx();
2692 class LCheckMapValue
FINAL :
public LTemplateInstruction<0, 2, 0> {
2706 class LLoadFieldByIndex
FINAL :
public LTemplateInstruction<1, 2, 0> {
2709 inputs_[0] = object;
2720 class LStoreFrameContext:
public LTemplateInstruction<0, 1, 0> {
2723 inputs_[0] = context;
2732 class LAllocateBlockContext:
public LTemplateInstruction<1, 2, 0> {
2735 inputs_[0] = context;
2736 inputs_[1] =
function;
2749 class LChunkBuilder;
2754 num_double_slots_(0) { }
2762 int num_double_slots_;
2770 current_instruction_(
NULL),
2771 current_block_(
NULL),
2773 allocator_(allocator) {}
2779 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2897 HBasicBlock* current_block_;
2898 HBasicBlock* next_block_;
2899 LAllocator* allocator_;
2904 #undef DECLARE_HYDROGEN_ACCESSOR
2905 #undef DECLARE_CONCRETE_INSTRUCTION
The superclass of all JavaScript values and objects.
static U update(U previous, T value)
int GetRegisterParameterCount() const
Source to read snapshot and builtins files from.
LInstructionGap(HBasicBlock *block)
LCallJSFunction(LOperand *function)
LSmiUntag(LOperand *value, bool needs_check)
LInstruction * DoDivByPowerOf2I(HDiv *instr)
LCheckSmi(LOperand *value)
LTypeofIsAndBranch(LOperand *value)
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)
LMathRound(LOperand *value)
LIsSmiAndBranch(LOperand *value)
LMathSqrt(LOperand *value, LOperand *temp1, LOperand *temp2)
LMathExp(LOperand *value, LOperand *temp1, LOperand *temp2)
LDivByPowerOf2I(LOperand *dividend, int32_t divisor)
LUint32ToDouble(LOperand *value)
LModByPowerOf2I(LOperand *dividend, int32_t divisor)
LInstruction * DefineFixed(LTemplateResultInstruction< 1 > *instr, X87Register reg)
LStringCharCodeAt(LOperand *context, LOperand *string, LOperand *index)
LInstruction * DoArithmeticT(Token::Value op, HBinaryOperation *instr)
LPower(LOperand *left, LOperand *right)
LStringCompareAndBranch(LOperand *context, LOperand *left, LOperand *right)
MUST_USE_RESULT LOperand * UseFixedOrConstant(HValue *value, Register fixed_register)
virtual bool ClobbersDoubleRegisters(Isolate *isolate) const OVERRIDE
LInnerAllocatedObject(LOperand *base_object, LOperand *offset)
LCmpObjectEqAndBranch(LOperand *left, LOperand *right)
LInstruction * DoFlooringDivByPowerOf2I(HMathFloorOfDiv *instr)
virtual Opcode opcode() const OVERRIDE
LStoreNamedGeneric(LOperand *context, LOperand *object, LOperand *value)
LUnallocated * ToUnallocated(X87Register reg)
LMathClz32(LOperand *value)
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)
LDoubleBits(LOperand *value)
LDeclareGlobals(LOperand *context)
LIsUndetectableAndBranch(LOperand *value, LOperand *temp)
virtual void CompileToNative(LCodeGen *generator) OVERRIDE
LApplyArguments(LOperand *function, LOperand *receiver, LOperand *length, LOperand *elements)
LCheckInstanceType(LOperand *value, LOperand *temp)
LStringAdd(LOperand *context, LOperand *left, LOperand *right)
MUST_USE_RESULT LOperand * Use(HValue *value)
MUST_USE_RESULT LOperand * UseAtStart(HValue *value)
MUST_USE_RESULT LOperand * UseConstant(HValue *value)
bool has_constant_parameter_count()
MUST_USE_RESULT LOperand * UseOrConstantAtStart(HValue *value)
SaveFPRegsMode save_doubles() const
LInteger32ToDouble(LOperand *value)
virtual int TempCount() FINAL OVERRIDE
LForInCacheArray(LOperand *map)
LModByConstI(LOperand *dividend, int32_t divisor, LOperand *temp1, LOperand *temp2)
LCmpT(LOperand *context, LOperand *left, LOperand *right)
LInstruction * DoMathAbs(HUnaryMathOperation *instr)
LBranch(LOperand *value, LOperand *temp)
LLabel * replacement() const
LLoadKeyedGeneric(LOperand *context, LOperand *obj, LOperand *key, LOperand *vector)
LClampIToUint8(LOperand *value)
LDummyUse(LOperand *value)
LInstruction * DoMathExp(HUnaryMathOperation *instr)
MUST_USE_RESULT LOperand * UseTempRegister(HValue *value)
DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, "has-instance-type-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LInstruction * DoModByPowerOf2I(HMod *instr)
LInstruction * AssignEnvironment(LInstruction *instr)
bool is_fixed_typed_array() const
LLoadNamedField(LOperand *object)
LDateField(LOperand *date, LOperand *temp, Smi *index)
LAddI(LOperand *left, LOperand *right)
LInstruction * Define(LTemplateResultInstruction< 1 > *instr, LUnallocated *result)
LDoubleToSmi(LOperand *value)
LCmpHoleAndBranch(LOperand *object)
HBasicBlock * block() const
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)
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)
LClampTToUint8NoSSE2(LOperand *unclamped, LOperand *temp1, LOperand *temp2, LOperand *temp3)
LNumberTagI(LOperand *value, LOperand *temp)
LDivByConstI(LOperand *dividend, int32_t divisor, LOperand *temp1, LOperand *temp2)
LArgumentsLength(LOperand *elements)
LIsConstructCallAndBranch(LOperand *temp)
LMathFround(LOperand *value)
LLoadNamedGeneric(LOperand *context, LOperand *object, LOperand *vector)
LCheckMapValue(LOperand *value, LOperand *map)
LArithmeticT(Token::Value op, LOperand *context, LOperand *left, LOperand *right)
bool jumps_to_join() const
LGetCachedArrayIndex(LOperand *value)
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
LNumberTagU(LOperand *value, LOperand *temp)
DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, "string-compare-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
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)
LInstruction * DoMathPowHalf(HUnaryMathOperation *instr)
LInvokeFunction(LOperand *context, LOperand *function)
LSubI(LOperand *left, LOperand *right)
LCheckMaps(LOperand *value=NULL)
LInstruction * DoFlooringDivByConstI(HMathFloorOfDiv *instr)
bool is_typed_elements() const
LLabel(HBasicBlock *block)
LFlooringDivByConstI(LOperand *dividend, int32_t divisor, LOperand *temp1, LOperand *temp2, LOperand *temp3)
bool HasReplacement() const
LInstruction * DoModByConstI(HMod *instr)
MUST_USE_RESULT LOperand * Use(HValue *value, LUnallocated *operand)
LCheckValue(LOperand *value)
LModI(LOperand *left, LOperand *right, LOperand *temp)
LStringCharFromCode(LOperand *context, LOperand *char_code)
LInstruction * DoShift(Token::Value op, HBitwiseBinaryOperation *instr)
LInstruction * DoArithmeticD(Token::Value op, HArithmeticBinaryOperation *instr)
LSeqStringSetChar(LOperand *context, LOperand *string, LOperand *index, LOperand *value)
virtual int InputCount() FINAL OVERRIDE
DISALLOW_COPY_AND_ASSIGN(LChunkBuilder)
LInstruction * DoMathClz32(HUnaryMathOperation *instr)
LInstruction * DoMathSqrt(HUnaryMathOperation *instr)
ElementsKind elements_kind() const
DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, "transition-elements-kind") virtual void PrintDataTo(StringStream *stream) OVERRIDE
LCmpMapAndBranch(LOperand *value)
LCallWithDescriptor(CallInterfaceDescriptor descriptor, const ZoneList< LOperand * > &operands, Zone *zone)
LOperand * global_object()
LCallRuntime(LOperand *context)
LLoadGlobalGeneric(LOperand *context, LOperand *global_object, LOperand *vector)
LClobberDoubles(Isolate *isolate)
MUST_USE_RESULT LOperand * UseFixed(HValue *value, Register fixed_register)
LWrapReceiver(LOperand *receiver, LOperand *function, LOperand *temp)
LOperand * base_object() const
LInstanceOfKnownGlobal(LOperand *context, LOperand *value, LOperand *temp)
LPlatformChunk(CompilationInfo *info, HGraph *graph)
LRegExpLiteral(LOperand *context)
LOperand * GetSeqStringSetCharOperand(HSeqStringSetChar *instr)
virtual bool HasInterestingComment(LCodeGen *gen) const OVERRIDE
LOperand * string() const
LInstruction * DoMathLog(HUnaryMathOperation *instr)
LInstruction * DoDivByConstI(HDiv *instr)
void VisitInstruction(HInstruction *current)
LPushArgument(LOperand *value)
LStoreNamedField(LOperand *obj, LOperand *val, LOperand *temp, LOperand *temp_map)
LStoreKeyedGeneric(LOperand *context, LOperand *object, LOperand *key, LOperand *value)
int num_double_slots() const
bool NeedsCanonicalization()
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, "has-cached-array-index-and-branch") virtual void PrintDataTo(StringStream *stream) OVERRIDE
MUST_USE_RESULT LOperand * UseRegister(HValue *value)
bool is_osr_entry() const
LCompareMinusZeroAndBranch(LOperand *value)
LStoreContextSlot(LOperand *context, LOperand *value, LOperand *temp)
static bool UseLea(HAdd *add)
LClampDToUint8(LOperand *value)
virtual const char * Mnemonic() const OVERRIDE
LDivI(LOperand *dividend, LOperand *divisor, LOperand *temp)
MUST_USE_RESULT LOperand * UseOrConstant(HValue *value)
LCallStub(LOperand *context)
LInstruction * DoFlooringDivI(HMathFloorOfDiv *instr)
LMathAbs(LOperand *context, LOperand *value)
LInstruction * DefineFixed(LTemplateResultInstruction< 1 > *instr, Register reg)
LCompareNumericAndBranch(LOperand *left, LOperand *right)
LInstruction * DoDivI(HDiv *instr)
LFunctionLiteral(LOperand *context)
virtual MUST_USE_RESULT LOperand * UseAny(HValue *value) OVERRIDE
MUST_USE_RESULT LOperand * FixedTemp(Register reg)
LHasInstanceTypeAndBranch(LOperand *value, LOperand *temp)
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)
LNumberUntagD(LOperand *value, LOperand *temp)
LHasCachedArrayIndexAndBranch(LOperand *value)
LInstruction * DoModI(HMod *instr)
LMathMinMax(LOperand *left, LOperand *right, LOperand *temp)
MUST_USE_RESULT LOperand * UseRegisterOrConstantAtStart(HValue *value)
void AddInstruction(LInstruction *instr, HInstruction *current)
LMulI(LOperand *left, LOperand *right, LOperand *temp)
void set_replacement(LLabel *label)
bool is_loop_header() const
LInstanceOf(LOperand *context, LOperand *left, LOperand *right)
LFlooringDivByPowerOf2I(LOperand *dividend, int32_t divisor)
LCheckNonSmi(LOperand *value)
LTaggedToI(LOperand *value)
LAccessArgumentsAt(LOperand *arguments, LOperand *length, LOperand *index)
LOperand * GetStoreKeyedValueOperand(HStoreKeyed *instr)
LUnallocated * ToUnallocated(Register reg)
LOperand * target() const
LIsObjectAndBranch(LOperand *value, LOperand *temp)
LTypeof(LOperand *context, LOperand *value)
MUST_USE_RESULT LOperand * UseRegisterOrConstant(HValue *value)
LChunkBuilder(CompilationInfo *info, HGraph *graph, LAllocator *allocator)
LArithmeticD(Token::Value op, LOperand *left, LOperand *right)
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env) OVERRIDE
LMathPowHalf(LOperand *value)
LEnvironment * GetDeferredLazyDeoptimizationEnvironment()
LStoreGlobalCell(LOperand *value)
LLoadFunctionPrototype(LOperand *function, LOperand *temp)
LTransitionElementsKind(LOperand *object, LOperand *context, LOperand *new_map_temp, LOperand *temp)
LInstruction * DefineAsRegister(LTemplateResultInstruction< 1 > *instr)
DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, "instance-of-known-global") Handle< JSFunction > function() const
LToFastProperties(LOperand *value)
LTailCallThroughMegamorphicCache(LOperand *context, LOperand *receiver, LOperand *name)
LInstruction * DefineX87TOS(LTemplateResultInstruction< 1 > *instr)
LInstruction * MarkAsCall(LInstruction *instr, HInstruction *hinstr, CanDeoptimize can_deoptimize=CANNOT_DEOPTIMIZE_EAGERLY)
LInstruction * DoMathFround(HUnaryMathOperation *instr)
int GetNextSpillIndex(RegisterKind kind)
LStoreKeyed(LOperand *obj, LOperand *key, LOperand *val)
static HValue * cast(HValue *value)
Handle< ScopeInfo > scope_info()
LAllocateBlockContext(LOperand *context, LOperand *function)
int LookupDestination(int block_id) const
Label * GetAssemblyLabel(int block_id) const
HControlInstruction * hydrogen()
virtual bool IsControl() const FINAL OVERRIDE
int FalseDestination(LChunk *chunk)
HBasicBlock * SuccessorAt(int i)
Label * FalseLabel(LChunk *chunk)
int TrueDestination(LChunk *chunk)
Label * TrueLabel(LChunk *chunk)
virtual void PrintDataTo(StringStream *stream) OVERRIDE
virtual bool IsGap() const FINAL OVERRIDE
static LGap * cast(LInstruction *instr)
LParallelMove * GetParallelMove(InnerPosition pos)
HBasicBlock * block() const
LParallelMove * parallel_moves_[LAST_INNER_POSITION+1]
LParallelMove * GetOrCreateParallelMove(InnerPosition pos, Zone *zone)
SetOncePointer< LPointerMap > pointer_map_
virtual int InputCount()=0
void set_environment(LEnvironment *env)
bool HasDoubleRegisterInput()
virtual bool HasResult() const =0
friend class TempIterator
bool HasPointerMap() const
virtual void PrintDataTo(StringStream *stream)
virtual int TempCount()=0
virtual const char * Mnemonic() const =0
virtual LOperand * TempAt(int i)=0
bool HasDoubleRegisterResult()
LEnvironment * environment() const
@ LITHIUM_CONCRETE_INSTRUCTION_LIST
virtual LOperand * InputAt(int i)=0
void set_hydrogen_value(HValue *value)
virtual LOperand * result() const =0
virtual void PrintTo(StringStream *stream)
virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment *env)
HValue * hydrogen_value() const
bool HasEnvironment() const
void set_pointer_map(LPointerMap *p)
friend class InputIterator
LEnvironment * environment_
virtual Opcode opcode() const =0
virtual bool ClobbersDoubleRegisters(Isolate *isolate) const
bool ClobbersTemps() const
bool ClobbersRegisters() const
virtual bool HasInterestingComment(LCodeGen *gen) const
virtual void CompileToNative(LCodeGen *generator)=0
bool IsDoubleInput(X87Register reg, LCodeGen *cgen)
virtual bool IsControl() const
LPointerMap * pointer_map() const
virtual bool IsGap() const
virtual void PrintOutputOperandTo(StringStream *stream)
LStoreFrameContext(LOperand *context)
EmbeddedContainer< LOperand *, I > inputs_
virtual LOperand * TempAt(int i) FINAL OVERRIDE
virtual int TempCount() FINAL OVERRIDE
EmbeddedContainer< LOperand *, T > temps_
virtual LOperand * InputAt(int i) FINAL OVERRIDE
virtual int InputCount() FINAL OVERRIDE
void set_result(LOperand *operand)
virtual bool HasResult() const FINAL OVERRIDE
EmbeddedContainer< LOperand *, R > results_
LOperand * result() const
STATIC_ASSERT(R==0||R==1)
static Smi * FromInt(int value)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic)
#define DECLARE_PREDICATE(type)
#define DECLARE_OPCODE(type)
#define DECLARE_HYDROGEN_ACCESSOR(type)
#define DCHECK(condition)
static bool ExternalArrayOpRequiresTemp(Representation key_representation, ElementsKind elements_kind)
static Object * DeclareGlobals(Isolate *isolate, Handle< GlobalObject > global, Handle< String > name, Handle< Object > value, PropertyAttributes attr, bool is_var, bool is_const, bool is_function)
@ EXTERNAL_UINT8_ELEMENTS
@ EXTERNAL_UINT8_CLAMPED_ELEMENTS
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)