28 #ifndef V8_CODE_STUBS_H_
29 #define V8_CODE_STUBS_H_
41 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \
45 V(BinaryOpICWithAllocationSite) \
46 V(BinaryOpWithAllocationSite) \
54 V(FunctionPrototype) \
56 V(StoreBufferOverflow) \
60 V(WriteInt32ToHeapNumber) \
65 V(FastCloneShallowArray) \
66 V(FastCloneShallowObject) \
67 V(CreateAllocationSite) \
71 V(RegExpConstructResult) \
78 V(ArrayNoArgumentConstructor) \
79 V(ArraySingleArgumentConstructor) \
80 V(ArrayNArgumentsConstructor) \
81 V(InternalArrayNoArgumentConstructor) \
82 V(InternalArraySingleArgumentConstructor) \
83 V(InternalArrayNArgumentsConstructor) \
84 V(KeyedStoreElement) \
85 V(DebuggerStatement) \
86 V(NameDictionaryLookup) \
87 V(ElementsTransitionAndStore) \
88 V(TransitionElementsKind) \
89 V(StoreArrayLiteralElement) \
90 V(StubFailureTrampoline) \
92 V(InternalArrayConstructor) \
104 #if V8_TARGET_ARCH_ARM
105 #define CODE_STUB_LIST_ARM(V) \
111 #define CODE_STUB_LIST_ARM(V)
115 #if V8_TARGET_ARCH_ARM64
116 #define CODE_STUB_LIST_ARM64(V) \
121 V(StoreRegistersState) \
122 V(RestoreRegistersState)
124 #define CODE_STUB_LIST_ARM64(V)
128 #if V8_TARGET_ARCH_MIPS
129 #define CODE_STUB_LIST_MIPS(V) \
132 V(StoreRegistersState) \
133 V(RestoreRegistersState)
135 #define CODE_STUB_LIST_MIPS(V)
139 #define CODE_STUB_LIST(V) \
140 CODE_STUB_LIST_ALL_PLATFORMS(V) \
141 CODE_STUB_LIST_ARM(V) \
142 CODE_STUB_LIST_ARM64(V) \
143 CODE_STUB_LIST_MIPS(V)
149 UninitializedMajorKey = 0,
150 #define DEF_ENUM(name) name,
165 return static_cast<Major>(MajorKeyBits::decode(key));
168 return MinorKeyBits::decode(key);
176 static const char* MajorName(Major major_key,
bool allow_unknown_keys);
180 static void GenerateStubsAheadOfTime(
Isolate* isolate);
181 static void GenerateFPStubs(
Isolate* isolate);
192 bool FindCodeInCache(
Code** code_out,
Isolate* isolate);
195 virtual Major MajorKey() = 0;
196 virtual int MinorKey() = 0;
202 return kNoExtraICState;
214 static bool CanUseFPRegisters();
219 virtual void VerifyPlatformFeatures(
Isolate* isolate);
238 virtual void Activate(Code*
code) { }
246 virtual void AddToSpecialCache(Handle<Code> new_object) { }
249 virtual bool FindCodeInSpecialCache(Code** code_out, Isolate* isolate) {
254 virtual bool UseSpecialCache() {
return false; }
258 ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS);
259 return MinorKeyBits::encode(MinorKey()) |
260 MajorKeyBits::encode(MajorKey());
264 class MajorKeyBits:
public BitField<uint32_t, 0, kStubMajorKeyBits> {};
265 class MinorKeyBits:
public BitField<uint32_t,
266 kStubMajorKeyBits, kStubMinorKeyBits> {};
268 friend class BreakPointIterator;
309 miss_handler_ = handler;
310 has_miss_handler_ =
true;
317 ASSERT(has_miss_handler_);
318 return miss_handler_;
322 return has_miss_handler_;
342 ExternalReference miss_handler_;
343 bool has_miss_handler_;
347 struct PlatformCallInterfaceDescriptor;
401 template<
class SubClass>
403 SubClass::GenerateAheadOfTime(isolate);
404 return SubClass().GetCode(isolate);
418 template<
class StateType>
422 class MinorKeyBits:
public BitField<int, 0, kStubMinorKeyBits - 1> {};
423 class IsMissBits:
public BitField<bool, kStubMinorKeyBits - 1, 1> {};
425 void GenerateLightweightMiss(MacroAssembler* masm);
426 virtual int MinorKey() {
427 return IsMissBits::encode(is_uninitialized_) |
431 bool is_uninitialized_;
454 #if V8_TARGET_ARCH_IA32
456 #elif V8_TARGET_ARCH_X64
458 #elif V8_TARGET_ARCH_ARM64
460 #elif V8_TARGET_ARCH_ARM
462 #elif V8_TARGET_ARCH_MIPS
465 #error Unsupported target architecture.
513 Major MajorKey() {
return ToNumber; }
514 int NotMissMinorKey() {
return 0; }
518 class NumberToStringStub
V8_FINAL :
public HydrogenCodeStub {
524 virtual void InitializeInterfaceDescriptor(
528 static void InstallDescriptors(
Isolate* isolate);
531 static const int kNumber = 0;
534 virtual Major MajorKey()
V8_OVERRIDE {
return NumberToString; }
535 virtual int NotMissMinorKey()
V8_OVERRIDE {
return 0; }
542 : strict_mode_(strict_mode),
543 is_generator_(is_generator) { }
557 class StrictModeBits:
public BitField<bool, 0, 1> {};
558 class IsGeneratorBits:
public BitField<bool, 1, 1> {};
560 Major MajorKey() {
return FastNewClosure; }
561 int NotMissMinorKey() {
562 return StrictModeBits::encode(strict_mode_ ==
STRICT) |
563 IsGeneratorBits::encode(is_generator_);
571 class FastNewContextStub
V8_FINAL :
public HydrogenCodeStub {
573 static const int kMaximumSlots = 64;
576 ASSERT(slots_ > 0 && slots_ <= kMaximumSlots);
581 virtual void InitializeInterfaceDescriptor(
585 static void InstallDescriptors(
Isolate* isolate);
587 int slots()
const {
return slots_; }
593 static const int kFunction = 0;
618 allocation_site_mode_(allocation_site_mode),
627 return allocation_site_mode_;
657 class AllocationSiteModeBits:
public BitField<AllocationSiteMode, 0, 1> {};
658 class ModeBits:
public BitField<Mode, 1, 4> {};
659 class LengthBits:
public BitField<int, 5, 4> {};
664 Major MajorKey() {
return FastCloneShallowArray; }
665 int NotMissMinorKey() {
666 return AllocationSiteModeBits::encode(allocation_site_mode_)
667 | ModeBits::encode(mode_)
668 | LengthBits::encode(length_);
694 Major MajorKey() {
return FastCloneShallowObject; }
695 int NotMissMinorKey() {
return length_; }
714 Major MajorKey() {
return CreateAllocationSite; }
715 int NotMissMinorKey() {
return 0; }
738 Major MajorKey() {
return Instanceof; }
739 int MinorKey() {
return static_cast<int>(flags_); }
741 bool HasArgsInRegisters()
const {
745 bool HasCallSiteInlineCheck()
const {
749 bool ReturnTrueFalseObject()
const {
753 virtual void PrintName(StringStream* stream);
779 virtual CodeStub::Major MajorKey() {
return ArrayConstructor; }
780 virtual int MinorKey() {
return argument_count_; }
793 virtual CodeStub::Major MajorKey() {
return InternalArrayConstructor; }
794 virtual int MinorKey() {
return 0; }
805 : exponent_type_(exponent_type) { }
809 virtual CodeStub::Major MajorKey() {
return MathPow; }
810 virtual int MinorKey() {
return exponent_type_; }
848 virtual CodeStub::Major MajorKey() {
return FunctionPrototype; }
855 :
ICStub(kind), strict_mode_(strict_mode) { }
864 class StrictModeBits:
public BitField<bool, 4, 1> {};
865 virtual int MinorKey() {
899 Initialize(Code::LOAD_IC, inobject, index, representation);
942 | InobjectBits::encode(inobject)
943 | IndexBits::encode(index)
944 | UnboxedDoubleBits::encode(representation.
IsDouble());
949 class InobjectBits:
public BitField<bool, 4, 1> {};
950 class IndexBits:
public BitField<int, 5, 11> {};
951 class UnboxedDoubleBits:
public BitField<bool, 16, 1> {};
952 virtual CodeStub::Major MajorKey() {
return LoadField; }
976 virtual CodeStub::Major MajorKey() {
return StringLength; }
990 virtual CodeStub::Major MajorKey() {
return KeyedStringLength; }
997 bit_field_ = IsConstantBits::encode(is_constant) |
998 CheckGlobalBits::encode(check_global);
1002 return isolate->
factory()->uninitialized_value();
1012 pattern.
Add(isolate->
factory()->global_property_cell_map(), cell);
1013 return CodeStub::GetCodeCopy(isolate, pattern);
1016 pattern.
Add(isolate->
factory()->global_property_cell_map(), cell);
1017 return CodeStub::GetCodeCopy(isolate, pattern);
1047 Major MajorKey() {
return StoreGlobal; }
1049 class IsConstantBits:
public BitField<bool, 0, 1> {};
1050 class RepresentationBits:
public BitField<Representation::Kind, 1, 8> {};
1051 class CheckGlobalBits:
public BitField<bool, 9, 1> {};
1060 bool call_data_undefined,
1063 IsStoreBits::encode(is_store) |
1064 CallDataUndefinedBits::encode(call_data_undefined) |
1065 ArgumentBits::encode(argc);
1066 ASSERT(!is_store || argc == 1);
1071 virtual Major MajorKey()
V8_OVERRIDE {
return CallApiFunction; }
1072 virtual int MinorKey()
V8_OVERRIDE {
return bit_field_; }
1074 class IsStoreBits:
public BitField<bool, 0, 1> {};
1075 class CallDataUndefinedBits:
public BitField<bool, 1, 1> {};
1076 class ArgumentBits:
public BitField<int, 2, Code::kArgumentsBits> {};
1090 virtual Major MajorKey()
V8_OVERRIDE {
return CallApiGetter; }
1101 Initialize(Code::KEYED_LOAD_IC, inobject, index, representation);
1109 virtual CodeStub::Major MajorKey() {
return KeyedLoadField; }
1128 return Code::BINARY_OP_IC;
1132 return state_.GetICState();
1136 return state_.GetExtraICState();
1171 bit_field_ = ElementsKindBits::encode(kind) | ArgcBits::encode(argc);
1177 int arguments_count() {
return ArgcBits::decode(bit_field_); }
1179 return ElementsKindBits::decode(bit_field_);
1182 virtual CodeStub::Major MajorKey() {
return ArrayPush; }
1183 virtual int MinorKey() {
return bit_field_; }
1185 class ElementsKindBits:
public BitField<ElementsKind, 0, 3> {};
1186 class ArgcBits:
public BitField<int, 3, Code::kArgumentsBits> {};
1194 class BinaryOpICWithAllocationSiteStub
V8_FINAL :
public PlatformCodeStub {
1199 static void GenerateAheadOfTime(
Isolate* isolate);
1204 pattern.
Add(isolate->
factory()->oddball_map(), allocation_site);
1205 return CodeStub::GetCodeCopy(isolate, pattern);
1209 return Code::BINARY_OP_IC;
1213 return state_.GetICState();
1217 return state_.GetExtraICState();
1232 static void GenerateAheadOfTime(
Isolate* isolate,
1241 class BinaryOpWithAllocationSiteStub
V8_FINAL :
public BinaryOpICStub {
1249 virtual void InitializeInterfaceDescriptor(
1252 static void InstallDescriptors(
Isolate* isolate);
1261 return BinaryOpWithAllocationSite;
1265 static const int kAllocationSite = 0;
1266 static const int kLeft = 1;
1267 static const int kRight = 2;
1283 class StringAddStub
V8_FINAL :
public HydrogenCodeStub {
1286 : bit_field_(StringAddFlagsBits::encode(flags) |
1287 PretenureFlagBits::encode(pretenure_flag)) {}
1290 return StringAddFlagsBits::decode(bit_field_);
1294 return PretenureFlagBits::decode(bit_field_);
1303 virtual void InitializeInterfaceDescriptor(
1307 static void InstallDescriptors(
Isolate* isolate);
1310 static const int kLeft = 0;
1311 static const int kRight = 1;
1314 class StringAddFlagsBits:
public BitField<StringAddFlags, 0, 2> {};
1315 class PretenureFlagBits:
public BitField<PretenureFlag, 2, 1> {};
1316 uint32_t bit_field_;
1318 virtual Major MajorKey()
V8_OVERRIDE {
return StringAdd; }
1319 virtual int NotMissMinorKey()
V8_OVERRIDE {
return bit_field_; }
1321 virtual void PrintBaseName(StringStream* stream)
V8_OVERRIDE;
1353 class OpField:
public BitField<int, 0, 3> { };
1354 class LeftStateField:
public BitField<int, 3, 4> { };
1355 class RightStateField:
public BitField<int, 7, 4> { };
1356 class HandlerStateField:
public BitField<int, 11, 4> { };
1358 virtual void FinishCode(Handle<Code>
code) {
1359 code->set_stub_info(MinorKey());
1362 virtual CodeStub::Major MajorKey() {
return CompareIC; }
1363 virtual int MinorKey();
1365 virtual Code::Kind GetCodeKind()
const {
return Code::COMPARE_IC; }
1367 void GenerateSmis(MacroAssembler* masm);
1368 void GenerateNumbers(MacroAssembler* masm);
1369 void GenerateInternalizedStrings(MacroAssembler* masm);
1370 void GenerateStrings(MacroAssembler* masm);
1371 void GenerateUniqueNames(MacroAssembler* masm);
1372 void GenerateObjects(MacroAssembler* masm);
1373 void GenerateMiss(MacroAssembler* masm);
1374 void GenerateKnownObjects(MacroAssembler* masm);
1375 void GenerateGeneric(MacroAssembler* masm);
1377 bool strict()
const {
return op_ == Token::EQ_STRICT; }
1380 virtual void AddToSpecialCache(Handle<Code> new_object);
1381 virtual bool FindCodeInSpecialCache(Code** code_out, Isolate* isolate);
1388 Handle<Map> known_map_;
1402 nil_value_(NilValueField::decode(ic_state)),
1403 state_(State(TypesField::decode(ic_state))) {
1423 if (state_.Contains(GENERIC)) {
1425 }
else if (state_.Contains(MONOMORPHIC_MAP)) {
1437 return NilValueField::encode(nil_value_) |
1438 TypesField::encode(state_.ToIntegral());
1453 enum CompareNilType {
1466 class State :
public EnumSet<CompareNilType, byte> {
1469 explicit State(
byte bits) : EnumSet<CompareNilType,
byte>(bits) { }
1471 void Print(StringStream* stream)
const;
1477 class NilValueField :
public BitField<NilValue, 0, 1> {};
1478 class TypesField :
public BitField<byte, 1, NUMBER_OF_TYPES> {};
1480 virtual CodeStub::Major MajorKey() {
return CompareNilIC; }
1494 : result_size_(result_size), save_doubles_(save_doubles) { }
1511 Label* throw_normal_exception,
1512 Label* throw_termination_exception,
1514 bool always_allocate_scope);
1518 const int result_size_;
1521 Major MajorKey() {
return CEntry; }
1524 bool NeedsImmovableCode();
1538 Major MajorKey() {
return JSEntry; }
1539 int MinorKey() {
return 0; }
1541 virtual void FinishCode(Handle<Code> code);
1543 int handler_offset_;
1554 int MinorKey() {
return 1; }
1556 virtual void PrintName(StringStream* stream) {
1557 stream->Add(
"JSConstructEntryStub");
1576 Major MajorKey() {
return ArgumentsAccess; }
1577 int MinorKey() {
return type_; }
1579 void Generate(MacroAssembler* masm);
1580 void GenerateReadElement(MacroAssembler* masm);
1581 void GenerateNewStrict(MacroAssembler* masm);
1582 void GenerateNewSloppyFast(MacroAssembler* masm);
1583 void GenerateNewSloppySlow(MacroAssembler* masm);
1585 virtual void PrintName(StringStream* stream);
1594 Major MajorKey() {
return RegExpExec; }
1595 int MinorKey() {
return 0; }
1597 void Generate(MacroAssembler* masm);
1601 class RegExpConstructResultStub
V8_FINAL :
public HydrogenCodeStub {
1607 virtual void InitializeInterfaceDescriptor(
1614 static void InstallDescriptors(
Isolate* isolate);
1617 static const int kLength = 0;
1618 static const int kIndex = 1;
1619 static const int kInput = 2;
1629 : argc_(argc), flags_(flags) { }
1634 code->set_has_function_cache(RecordCallTarget());
1638 return ArgcBits::decode(minor_key);
1648 class FlagBits:
public BitField<CallFunctionFlags, 0, 2> {};
1649 class ArgcBits:
public BitField<unsigned, 2, 32 - 2> {};
1651 Major MajorKey() {
return CallFunction; }
1654 return FlagBits::encode(flags_) | ArgcBits::encode(argc_);
1657 bool RecordCallTarget() {
1661 bool CallAsMethod() {
1665 bool NeedsChecks() {
1678 code->set_has_function_cache(RecordCallTarget());
1686 Major MajorKey() {
return CallConstruct; }
1687 int MinorKey() {
return flags_; }
1689 bool RecordCallTarget() {
1693 bool CallAsMethod() {
1725 Label* receiver_not_string,
1726 Label* index_not_number,
1727 Label* index_out_of_range,
1732 receiver_not_string_(receiver_not_string),
1733 index_not_number_(index_not_number),
1734 index_out_of_range_(index_out_of_range),
1735 index_flags_(index_flags) {
1752 masm->
bind(&index_not_smi_);
1753 masm->
bind(&call_runtime_);
1762 Label* receiver_not_string_;
1763 Label* index_not_number_;
1764 Label* index_out_of_range_;
1768 Label call_runtime_;
1769 Label index_not_smi_;
1770 Label got_smi_index_;
1799 masm->
bind(&slow_case_);
1830 Label* receiver_not_string,
1831 Label* index_not_number,
1832 Label* index_out_of_range,
1834 : char_code_at_generator_(object,
1837 receiver_not_string,
1841 char_from_code_generator_(scratch, result) {}
1855 char_code_at_generator_.
GenerateSlow(masm, call_helper);
1856 char_from_code_generator_.
GenerateSlow(masm, call_helper);
1861 char_code_at_generator_.
SkipSlow(masm, bailout);
1862 char_from_code_generator_.
SkipSlow(masm, bailout);
1884 Major MajorKey() {
return KeyedLoadElement; }
1898 Major MajorKey() {
return KeyedLoadElement; }
1912 bit_field_ = SourceRegisterBits::encode(source.
code()) |
1913 DestinationRegisterBits::encode(destination.
code()) |
1914 OffsetBits::encode(offset) |
1915 IsTruncatingBits::encode(is_truncating) |
1930 return IsTruncatingBits::decode(bit_field_);
1934 return SkipFastPathBits::decode(bit_field_);
1938 return OffsetBits::decode(bit_field_);
1951 static const int kBitsPerRegisterNumber = 6;
1953 class SourceRegisterBits:
1954 public BitField<int, 0, kBitsPerRegisterNumber> {};
1955 class DestinationRegisterBits:
1956 public BitField<int, kBitsPerRegisterNumber,
1957 kBitsPerRegisterNumber> {};
1958 class IsTruncatingBits:
1959 public BitField<bool, 2 * kBitsPerRegisterNumber, 1> {};
1961 public BitField<int, 2 * kBitsPerRegisterNumber + 1, 3> {};
1962 class SkipFastPathBits:
1963 public BitField<int, 2 * kBitsPerRegisterNumber + 4, 1> {};
1965 public BitField<int, 2 * kBitsPerRegisterNumber + 5, 2> {};
1967 Major MajorKey() {
return DoubleToI; }
1968 int MinorKey() {
return bit_field_; }
1979 bit_field_ = ElementsKindBits::encode(elements_kind) |
1980 IsJSArrayBits::encode(is_js_array);
1984 return IsJSArrayBits::decode(bit_field_);
1988 return ElementsKindBits::decode(bit_field_);
1998 class ElementsKindBits:
public BitField<ElementsKind, 0, 8> {};
1999 class IsJSArrayBits:
public BitField<bool, 8, 1> {};
2000 uint32_t bit_field_;
2002 Major MajorKey() {
return KeyedLoadElement; }
2003 int NotMissMinorKey() {
return bit_field_; }
2014 bit_field_ = ElementsKindBits::encode(elements_kind) |
2015 IsJSArrayBits::encode(is_js_array) |
2016 StoreModeBits::encode(mode);
2020 return IsJSArrayBits::decode(bit_field_);
2024 return ElementsKindBits::decode(bit_field_);
2028 return StoreModeBits::decode(bit_field_);
2038 class ElementsKindBits:
public BitField<ElementsKind, 0, 8> {};
2039 class StoreModeBits:
public BitField<KeyedAccessStoreMode, 8, 4> {};
2040 class IsJSArrayBits:
public BitField<bool, 12, 1> {};
2041 uint32_t bit_field_;
2043 Major MajorKey() {
return KeyedStoreElement; }
2044 int NotMissMinorKey() {
return bit_field_; }
2055 bit_field_ = FromKindBits::encode(from_kind) |
2056 ToKindBits::encode(to_kind) |
2057 IsJSArrayBits::encode(is_js_array);
2061 return FromKindBits::decode(bit_field_);
2065 return ToKindBits::decode(bit_field_);
2069 return IsJSArrayBits::decode(bit_field_);
2079 class FromKindBits:
public BitField<ElementsKind, 8, 8> {};
2080 class ToKindBits:
public BitField<ElementsKind, 0, 8> {};
2081 class IsJSArrayBits:
public BitField<bool, 16, 1> {};
2082 uint32_t bit_field_;
2084 Major MajorKey() {
return TransitionElementsKind; }
2085 int NotMissMinorKey() {
return bit_field_; }
2100 bit_field_ = ElementsKindBits::encode(kind) |
2101 AllocationSiteOverrideModeBits::encode(override_mode);
2105 return ElementsKindBits::decode(bit_field_);
2109 return AllocationSiteOverrideModeBits::decode(bit_field_);
2123 int NotMissMinorKey() {
return bit_field_; }
2128 class ElementsKindBits:
public BitField<ElementsKind, 0, 8> {};
2129 class AllocationSiteOverrideModeBits:
public
2130 BitField<AllocationSiteOverrideMode, 8, 1> {};
2131 uint32_t bit_field_;
2152 Major MajorKey() {
return ArrayNoArgumentConstructor; }
2154 virtual void PrintName(StringStream* stream) {
2177 Major MajorKey() {
return ArraySingleArgumentConstructor; }
2179 virtual void PrintName(StringStream* stream) {
2180 BasePrintName(
"ArraySingleArgumentConstructorStub", stream);
2202 Major MajorKey() {
return ArrayNArgumentsConstructor; }
2204 virtual void PrintName(StringStream* stream) {
2227 int NotMissMinorKey() {
return kind_; }
2248 Major MajorKey() {
return InternalArrayNoArgumentConstructor; }
2267 Major MajorKey() {
return InternalArraySingleArgumentConstructor; }
2286 Major MajorKey() {
return InternalArrayNArgumentsConstructor; }
2297 : is_js_array_(is_js_array),
2298 elements_kind_(elements_kind),
2299 store_mode_(store_mode),
2300 fp_registers_(CanUseFPRegisters()) { }
2304 return ElementsKindBits::encode(elements_kind_) |
2305 IsJSArrayBits::encode(is_js_array_) |
2306 StoreModeBits::encode(store_mode_) |
2307 FPRegisters::encode(fp_registers_);
2313 class ElementsKindBits:
public BitField<ElementsKind, 0, 8> {};
2314 class StoreModeBits:
public BitField<KeyedAccessStoreMode, 8, 4> {};
2315 class IsJSArrayBits:
public BitField<bool, 12, 1> {};
2316 class FPRegisters:
public BitField<bool, 13, 1> {};
2363 : types_(static_cast<
byte>(state)) { }
2402 Major MajorKey() {
return ToBoolean; }
2418 : from_kind_(from_kind),
2420 is_jsarray_(is_jsarray),
2421 store_mode_(store_mode) {}
2435 class FromBits:
public BitField<ElementsKind, 0, 8> {};
2436 class ToBits:
public BitField<ElementsKind, 8, 8> {};
2437 class IsJSArrayBits:
public BitField<bool, 16, 1> {};
2438 class StoreModeBits:
public BitField<KeyedAccessStoreMode, 17, 4> {};
2440 Major MajorKey() {
return ElementsTransitionAndStore; }
2441 int NotMissMinorKey() {
2442 return FromBits::encode(from_kind_) |
2443 ToBits::encode(to_kind_) |
2444 IsJSArrayBits::encode(is_jsarray_) |
2445 StoreModeBits::encode(store_mode_);
2460 : fp_registers_(CanUseFPRegisters()) { }
2463 class FPRegisters:
public BitField<bool, 0, 1> {};
2465 Major MajorKey() {
return StoreArrayLiteralElement; }
2466 int MinorKey() {
return FPRegisters::encode(fp_registers_); }
2468 void Generate(MacroAssembler* masm);
2479 : fp_registers_(CanUseFPRegisters()), function_mode_(function_mode) {}
2484 class FPRegisters:
public BitField<bool, 0, 1> {};
2485 class FunctionModeField:
public BitField<StubFunctionMode, 1, 1> {};
2487 Major MajorKey() {
return StubFailureTrampoline; }
2489 return FPRegisters::encode(fp_registers_) |
2490 FunctionModeField::encode(function_mode_);
2493 void Generate(MacroAssembler* masm);
2513 static void EntryHookTrampoline(intptr_t
function,
2514 intptr_t stack_pointer,
2517 Major MajorKey() {
return ProfileEntryHook; }
2518 int MinorKey() {
return 0; }
2520 void Generate(MacroAssembler* masm);
2533 #endif // V8_CODE_STUBS_H_
Register * register_params_
virtual int NotMissMinorKey() V8_FINAL V8_OVERRIDE
virtual Handle< Code > GenerateCode(Isolate *isolate)
virtual Major MajorKey() V8_OVERRIDE
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
bool is_generator() const
MathPowStub(ExponentType exponent_type)
void GenerateFast(MacroAssembler *masm)
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
virtual void FinishCode(Handle< Code > code)
void GenerateFast(MacroAssembler *masm)
InternalArrayConstructorStub(Isolate *isolate)
ToBooleanStub(Types types=Types())
void set_representation(Representation r)
virtual void AfterCall(MacroAssembler *masm) const
static ExtraICState ComputeExtraICState(StrictMode flag)
bool check_global() const
KeyedStoreFastElementStub(bool is_js_array, ElementsKind elements_kind, KeyedAccessStoreMode mode)
FastNewClosureStub(StrictMode strict_mode, bool is_generator)
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
virtual Handle< Code > GenerateCode(Isolate *isolate)
virtual void PrintState(StringStream *stream)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
CallFunctionStub(int argc, CallFunctionFlags flags)
bool IsParameterCountRegister(int index)
virtual bool NeedsImmovableCode()
KeyedAccessStoreMode store_mode() const
static void GenerateAheadOfTime(Isolate *isolate)
virtual Code::Kind GetCodeKind() const
FastCloneShallowObjectStub(int length)
Register GetParameterRegister(int index) const
static Handle< Code > GetUninitialized(Isolate *isolate)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
static const int kFastCloneModeCount
static void DecodeMinorKey(int minor_key, CompareIC::State *left_state, CompareIC::State *right_state, CompareIC::State *handler_state, Token::Value *op)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf map
virtual Handle< Code > GenerateCode(Isolate *isolate)
void Generate(MacroAssembler *masm)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
virtual void FinishCode(Handle< Code > code)
virtual bool SometimesSetsUpAFrame()
virtual Handle< Code > GenerateCode(Isolate *isolate)
Type * GetType(Zone *zone, Handle< Map > map=Handle< Map >())
int register_param_count_
static void InstallDescriptors(Isolate *isolate)
const int kStubMajorKeyBits
virtual Handle< Code > GenerateCode(Isolate *isolate)=0
virtual Handle< Code > GenerateCode(Isolate *isolate)
static const int kConstructor
bool IsMonomorphic() const
static const uint32_t kSize
void Generate(MacroAssembler *masm)
StringCharFromCodeGenerator(Register code, Register result)
virtual InlineCacheState GetICState()
void Initialize(Code::Kind kind)
static int ExtractArgcFromMinorKey(int minor_key)
static bool IsCompareOp(Value op)
virtual Code::Kind GetCodeKind() const
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
int environment_length() const
static void GenerateAheadOfTime(Isolate *isolate)
BinaryOpICWithAllocationSiteStub(const BinaryOpIC::State &state)
ArrayConstructorStub(Isolate *isolate, int argument_count)
void SkipSlow(MacroAssembler *masm, Label *bailout)
virtual Handle< Code > GenerateCode(Isolate *isolate)
ElementsKind from_kind() const
ElementsKind elements_kind() const
void set_known_map(Handle< Map > map)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor) V8_OVERRIDE
virtual int NotMissMinorKey()=0
virtual Handle< Code > GenerateCode(Isolate *isolate)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
virtual ExtraICState GetExtraICState()
void Add(Handle< Map > map_to_find, Handle< Object > obj_to_replace)
void Generate(MacroAssembler *masm)
virtual int NotMissMinorKey() V8_OVERRIDE
CodeStubInterfaceDescriptor * code_stub_interface_descriptor(int index)
AllocationSiteOverrideMode
virtual Handle< Code > GenerateCode(Isolate *isolate)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
void BasePrintName(const char *name, StringStream *stream)
virtual void PrintState(StringStream *stream)
static const int kConstructor
bool CanBeUndetectable() const
#define ASSERT(condition)
#define ASSERT_GE(v1, v2)
virtual void AfterCall(MacroAssembler *masm) const
InstanceofStub(Flags flags)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
virtual Handle< Code > GenerateCode(Isolate *isolate)
static bool IsSafeForSnapshot(CpuFeature f)
ArraySingleArgumentConstructorStub(ElementsKind kind, AllocationSiteOverrideMode override_mode=DONT_OVERRIDE)
InternalArrayConstructorStubBase(ElementsKind kind)
virtual Code::Kind GetCodeKind() const V8_OVERRIDE
DoubleToIStub(Register source, Register destination, int offset, bool is_truncating, bool skip_fastpath=false)
virtual Handle< Code > GenerateCode(Isolate *isolate)
AllocationSiteMode allocation_site_mode() const
virtual InlineCacheState GetICState()
virtual InlineCacheState GetICState() V8_FINAL V8_OVERRIDE
virtual Handle< Code > GenerateCode(Isolate *isolate) V8_OVERRIDE
BinaryOpICStub(Token::Value op, OverwriteMode mode)
BinaryOpWithAllocationSiteStub(Token::Value op, OverwriteMode mode)
static Representation Double()
virtual Major MajorKey() V8_OVERRIDE
virtual InlineCacheState GetICState()
FunctionPrototypeStub(Code::Kind kind)
virtual InlineCacheState GetICState()
virtual ExtraICState GetExtraICState()
virtual Code::Kind GetCodeKind() const V8_OVERRIDE
static void InstallDescriptors(Isolate *isolate)
ArrayPushStub(ElementsKind kind, int argc)
virtual int NotMissMinorKey()
ElementsKind elements_kind() const
virtual ExtraICState GetExtraICState()
Address deoptimization_handler_
static const int kNumRegisters
virtual bool SometimesSetsUpAFrame()
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
static void InstallDescriptors(Isolate *isolate)
void Generate(MacroAssembler *masm)
TransitionElementsKindStub(ElementsKind from_kind, ElementsKind to_kind, bool is_js_array)
StubFunctionMode function_mode_
BinaryOpICStub(const BinaryOpIC::State &state)
virtual Handle< Code > GenerateCode(Isolate *isolate)
STATIC_ASSERT(NUMBER_OF_TYPES<=8)
virtual Code::Kind GetCodeKind() const V8_FINAL V8_OVERRIDE
virtual void AfterCall(MacroAssembler *masm) const =0
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV 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 mode(MIPS only)") DEFINE_string(expose_natives_as
static Condition ComputeCondition(Token::Value op)
void UpdateStatus(Handle< Object > object)
CallConstructStub(CallFunctionFlags flags)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
virtual Code::Kind GetCodeKind() const
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
static Representation FromKind(Kind kind)
FastNewContextStub(int slots)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV 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 expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in only print modified registers Don t break for ASM_UNIMPLEMENTED_BREAK macros print stack trace when an illegal exception is thrown randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot testing_bool_flag testing_int_flag string flag tmp file in which to serialize heap Print the time it takes to lazily compile hydrogen code stubs concurrent_recompilation concurrent_sweeping Print usage including flags
int environment_length() const
virtual Code::Kind GetCodeKind() const
virtual Handle< Code > GenerateCode(Isolate *isolate) V8_OVERRIDE
PlatformCallInterfaceDescriptor * platform_specific_descriptor_
Handle< Code > GetCodeCopyFromTemplate(Isolate *isolate, Handle< AllocationSite > allocation_site)
ElementsKind to_kind() const
bool Describes(Code *code)
StubFailureTrampolineStub(StubFunctionMode function_mode)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
virtual void BeforeCall(MacroAssembler *masm) const =0
StringCharCodeAtGenerator(Register object, Register index, Register result, Label *receiver_not_string, Label *index_not_number, Label *index_out_of_range, StringIndexFlags index_flags)
StringCharAtGenerator(Register object, Register index, Register scratch, Register result, Label *receiver_not_string, Label *index_not_number, Label *index_out_of_range, StringIndexFlags index_flags)
NilValue GetNilValue() const
virtual void BeforeCall(MacroAssembler *masm) const
virtual ~RuntimeCallHelper()
static void MaybeCallEntryHook(MacroAssembler *masm)
virtual int MinorKey() V8_OVERRIDE
static void GenerateAheadOfTime(Isolate *isolate)
virtual Code::Kind GetCodeKind() const
Register * register_params_
void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
InternalArrayNoArgumentConstructorStub(ElementsKind kind)
virtual Code::Kind GetCodeKind() const
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
void SkipSlow(MacroAssembler *masm, Label *bailout)
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
virtual Handle< Code > GenerateCode(Isolate *isolate)
int GetHandlerParameterCount()
AllocationSiteOverrideMode override_mode() const
static Register from_code(int code)
#define ASSERT_LE(v1, v2)
virtual void PrintState(StringStream *stream)
virtual void VerifyPlatformFeatures(Isolate *isolate) V8_FINAL V8_OVERRIDE
StringAddFlags flags() const
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
static const int kAllocationSite
virtual void Generate(MacroAssembler *masm)
ExternalReference miss_handler()
ArrayNoArgumentConstructorStub(ElementsKind kind, AllocationSiteOverrideMode override_mode=DONT_OVERRIDE)
StoreGlobalStub(bool is_constant, bool check_global)
static void GenerateStubsAheadOfTime(Isolate *isolate)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
const BinaryOpIC::State & state() const
PlatformCallInterfaceDescriptor * platform_specific_descriptor() const
static void InstallDescriptors(Isolate *isolate)
void Generate(MacroAssembler *masm)
Handle< Code > GenerateLightweightMissCode(Isolate *isolate)
Representation GetParameterRepresentation(int index) const
virtual InlineCacheState GetICState() V8_OVERRIDE
Handle< Code > GetCodeCopyFromTemplate(Isolate *isolate, Handle< GlobalObject > global, Handle< PropertyCell > cell)
virtual Handle< Code > GenerateCode(Isolate *isolate)
ElementsTransitionAndStoreStub(ElementsKind from_kind, ElementsKind to_kind, bool is_jsarray, KeyedAccessStoreMode store_mode)
virtual void FinishCode(Handle< Code > code)
RegExpConstructResultStub()
bool UpdateStatus(Handle< Object > object)
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
KeyedStoreElementStub(bool is_js_array, ElementsKind elements_kind, KeyedAccessStoreMode store_mode)
virtual void Generate(MacroAssembler *masm)
virtual bool SometimesSetsUpAFrame()
ElementsKind ComputeElementsKind() const
ArgumentsAccessStub(Type type)
virtual Code::Kind kind() const =0
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
static const int kHeaderSize
virtual Code::Kind kind() const
void Generate(MacroAssembler *masm)
static Handle< Code > GetUninitialized(Isolate *isolate, NilValue nil)
Type * GetInputType(Zone *zone, Handle< Map > map)
virtual Code::StubType GetStubType()
HandlerArgumentsMode handler_arguments_mode_
int ToNumber(Register reg)
bool is(Register reg) const
virtual void PrintBaseName(StringStream *stream)
KeyedLoadDictionaryElementStub()
virtual Code::StubType GetStubType()
static Handle< Code > GetUninitialized(Isolate *isolate)
void Initialize(Code::Kind kind, bool inobject, int index, Representation representation)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
HydrogenCodeStub(InitializationState state=INITIALIZED)
virtual InlineCacheState GetICState()
Representation representation()
ElementsKind from_kind() const
static Major GetMajorKey(Code *code_stub)
virtual ExtraICState GetExtraICState()
void Generate(MacroAssembler *masm)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor) V8_OVERRIDE
virtual void VerifyPlatformFeatures(Isolate *isolate) V8_OVERRIDE
virtual Code::Kind kind() const
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
InternalArrayNArgumentsConstructorStub(ElementsKind kind)
virtual Handle< Code > GenerateCode(Isolate *isolate)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)=0
PretenureFlag pretenure_flag() const
virtual void VerifyPlatformFeatures(Isolate *isolate) V8_OVERRIDE
static void InstallDescriptors(Isolate *isolate)
KeyedLoadFieldStub(bool inobject, int index, Representation representation)
int register_param_count_
CallInterfaceDescriptor()
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
Representation representation()
static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
static bool VerifyCrossCompiling()
void GenerateBody(MacroAssembler *masm, bool is_construct)
CreateAllocationSiteStub()
ICCompareStub(Token::Value op, CompareIC::State left, CompareIC::State right, CompareIC::State handler)
static void GenerateStubsAheadOfTime(Isolate *isolate)
virtual ExtraICState GetExtraICState() V8_OVERRIDE
void set_is_constant(bool value)
bool UpdateStatus(Handle< Object > object)
CodeStubInterfaceDescriptor * GetInterfaceDescriptor(Isolate *isolate)
ArrayConstructorStubBase(ElementsKind kind, AllocationSiteOverrideMode override_mode)
static void InstallDescriptors(Isolate *isolate)
void Generate(MacroAssembler *masm)
StoreICStub(Code::Kind kind, StrictMode strict_mode)
void Print(const v8::FunctionCallbackInfo< v8::Value > &args)
LoadFieldStub(bool inobject, int index, Representation representation)
InternalArraySingleArgumentConstructorStub(ElementsKind kind)
virtual Handle< Code > GenerateCode(Isolate *isolate)
static void InstallDescriptors(Isolate *isolate)
static void InitializeForIsolate(Isolate *isolate)
virtual void VerifyPlatformFeatures(Isolate *isolate) V8_OVERRIDE
void Generate(MacroAssembler *masm)
void GenerateFast(MacroAssembler *masm)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
static const int kMaximumClonedProperties
Representation * param_representations_
static Handle< HeapObject > global_placeholder(Isolate *isolate)
Register stack_parameter_count_
void TraceTransition(StateType from, StateType to)
static void InstallDescriptors(Isolate *isolate)
virtual bool SometimesSetsUpAFrame()
void Generate(MacroAssembler *masm)
StringAddStub(StringAddFlags flags, PretenureFlag pretenure_flag)
Register GetParameterRegister(int index) const
KeyedAccessStoreMode store_mode() const
static void GenerateAheadOfTime(Isolate *isolate)
static Code::Kind decode(uint32_tvalue)
CompareNilICStub(NilValue nil)
void SkipSlow(MacroAssembler *masm, Label *bailout)
virtual InlineCacheState GetICState()
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
static Representation Tagged()
virtual Handle< Code > GenerateCode(Isolate *isolate)
ElementsKind elements_kind() const
static Major MajorKeyFromKey(uint32_t key)
virtual void Generate(MacroAssembler *masm)
virtual void BeforeCall(MacroAssembler *masm) const
#define STATIC_ASSERT(test)
FastCloneShallowArrayStub(Mode mode, AllocationSiteMode allocation_site_mode, int length)
CompareNilICStub(ExtraICState ic_state, InitializationState init_state=INITIALIZED)
CallApiFunctionStub(bool is_store, bool call_data_undefined, int argc)
ElementsKind elements_kind() const
virtual ExtraICState GetExtraICState() V8_FINAL V8_OVERRIDE
virtual ExtraICState GetExtraICState()
#define CODE_STUB_LIST(V)
void Print(StringStream *stream) const
StoreArrayLiteralElementStub()
void Generate(MacroAssembler *masm)
void SetMissHandler(ExternalReference handler)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV 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 expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
CEntryStub(int result_size, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
KeyedLoadFastElementStub(bool is_js_array, ElementsKind elements_kind)
ToBooleanStub(ExtraICState state)
static const int kMaximumClonedLength
virtual void PrintState(StringStream *stream) V8_FINAL V8_OVERRIDE
virtual Handle< Code > GenerateCode(Isolate *isolate)
ArrayNArgumentsConstructorStub(ElementsKind kind, AllocationSiteOverrideMode override_mode=DONT_OVERRIDE)
static uint32_t encode(Code::Kindvalue)
virtual Handle< Code > GenerateCode(Isolate *isolate)
virtual Handle< Code > GenerateCode(Isolate *isolate)
ElementsKind to_kind() const
int hint_stack_parameter_count_
CodeStubInterfaceDescriptor()
friend class CompareNilIC
BinaryOpWithAllocationSiteStub(const BinaryOpIC::State &state)
virtual Code::Kind kind() const
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)
virtual Handle< Code > GenerateCode(Isolate *isolate)
StrictMode strict_mode() const
static int MinorKeyFromKey(uint32_t key)
virtual void InitializeInterfaceDescriptor(Isolate *isolate, CodeStubInterfaceDescriptor *descriptor)