| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 V(InternalArrayNoArgumentConstructor) \ | 83 V(InternalArrayNoArgumentConstructor) \ |
| 84 V(InternalArraySingleArgumentConstructor) \ | 84 V(InternalArraySingleArgumentConstructor) \ |
| 85 V(InternalArrayNArgumentsConstructor) \ | 85 V(InternalArrayNArgumentsConstructor) \ |
| 86 V(KeyedStoreElement) \ | 86 V(KeyedStoreElement) \ |
| 87 V(DebuggerStatement) \ | 87 V(DebuggerStatement) \ |
| 88 V(NameDictionaryLookup) \ | 88 V(NameDictionaryLookup) \ |
| 89 V(ElementsTransitionAndStore) \ | 89 V(ElementsTransitionAndStore) \ |
| 90 V(TransitionElementsKind) \ | 90 V(TransitionElementsKind) \ |
| 91 V(StoreArrayLiteralElement) \ | 91 V(StoreArrayLiteralElement) \ |
| 92 V(StubFailureTrampoline) \ | 92 V(StubFailureTrampoline) \ |
| 93 V(StubFailureTailCallTrampoline) \ |
| 93 V(ArrayConstructor) \ | 94 V(ArrayConstructor) \ |
| 94 V(InternalArrayConstructor) \ | 95 V(InternalArrayConstructor) \ |
| 95 V(ProfileEntryHook) \ | 96 V(ProfileEntryHook) \ |
| 96 V(StoreGlobal) \ | 97 V(StoreGlobal) \ |
| 97 /* IC Handler stubs */ \ | 98 /* IC Handler stubs */ \ |
| 98 V(LoadField) \ | 99 V(LoadField) \ |
| 99 V(KeyedLoadField) | 100 V(KeyedLoadField) \ |
| 101 V(KeyedArrayCall) |
| 100 | 102 |
| 101 // List of code stubs only used on ARM platforms. | 103 // List of code stubs only used on ARM platforms. |
| 102 #if V8_TARGET_ARCH_ARM | 104 #if V8_TARGET_ARCH_ARM |
| 103 #define CODE_STUB_LIST_ARM(V) \ | 105 #define CODE_STUB_LIST_ARM(V) \ |
| 104 V(GetProperty) \ | 106 V(GetProperty) \ |
| 105 V(SetProperty) \ | 107 V(SetProperty) \ |
| 106 V(InvokeBuiltin) \ | 108 V(InvokeBuiltin) \ |
| 107 V(DirectCEntry) | 109 V(DirectCEntry) |
| 108 #else | 110 #else |
| 109 #define CODE_STUB_LIST_ARM(V) | 111 #define CODE_STUB_LIST_ARM(V) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 bool is_pregenerated = IsPregenerated(isolate); | 165 bool is_pregenerated = IsPregenerated(isolate); |
| 164 Code* code = NULL; | 166 Code* code = NULL; |
| 165 CHECK(!is_pregenerated || FindCodeInCache(&code, isolate)); | 167 CHECK(!is_pregenerated || FindCodeInCache(&code, isolate)); |
| 166 return is_pregenerated; | 168 return is_pregenerated; |
| 167 } | 169 } |
| 168 | 170 |
| 169 // See comment above, where Instanceof is defined. | 171 // See comment above, where Instanceof is defined. |
| 170 virtual bool IsPregenerated(Isolate* isolate) { return false; } | 172 virtual bool IsPregenerated(Isolate* isolate) { return false; } |
| 171 | 173 |
| 172 static void GenerateStubsAheadOfTime(Isolate* isolate); | 174 static void GenerateStubsAheadOfTime(Isolate* isolate); |
| 175 static void GenerateStubsRequiringBuiltinsAheadOfTime(Isolate* isolate); |
| 173 static void GenerateFPStubs(Isolate* isolate); | 176 static void GenerateFPStubs(Isolate* isolate); |
| 174 | 177 |
| 175 // Some stubs put untagged junk on the stack that cannot be scanned by the | 178 // Some stubs put untagged junk on the stack that cannot be scanned by the |
| 176 // GC. This means that we must be statically sure that no GC can occur while | 179 // GC. This means that we must be statically sure that no GC can occur while |
| 177 // they are running. If that is the case they should override this to return | 180 // they are running. If that is the case they should override this to return |
| 178 // true, which will cause an assertion if we try to call something that can | 181 // true, which will cause an assertion if we try to call something that can |
| 179 // GC or if we try to put a stack frame on top of the junk, which would not | 182 // GC or if we try to put a stack frame on top of the junk, which would not |
| 180 // result in a traversable stack. | 183 // result in a traversable stack. |
| 181 virtual bool SometimesSetsUpAFrame() { return true; } | 184 virtual bool SometimesSetsUpAFrame() { return true; } |
| 182 | 185 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 275 |
| 273 protected: | 276 protected: |
| 274 // Generates the assembler code for the stub. | 277 // Generates the assembler code for the stub. |
| 275 virtual void Generate(MacroAssembler* masm) = 0; | 278 virtual void Generate(MacroAssembler* masm) = 0; |
| 276 }; | 279 }; |
| 277 | 280 |
| 278 | 281 |
| 279 enum StubFunctionMode { NOT_JS_FUNCTION_STUB_MODE, JS_FUNCTION_STUB_MODE }; | 282 enum StubFunctionMode { NOT_JS_FUNCTION_STUB_MODE, JS_FUNCTION_STUB_MODE }; |
| 280 enum HandlerArgumentsMode { DONT_PASS_ARGUMENTS, PASS_ARGUMENTS }; | 283 enum HandlerArgumentsMode { DONT_PASS_ARGUMENTS, PASS_ARGUMENTS }; |
| 281 | 284 |
| 285 enum ContinuationType { NORMAL_CONTINUATION, TAIL_CALL_CONTINUATION }; |
| 286 |
| 287 |
| 282 struct CodeStubInterfaceDescriptor { | 288 struct CodeStubInterfaceDescriptor { |
| 283 CodeStubInterfaceDescriptor(); | 289 CodeStubInterfaceDescriptor(); |
| 284 int register_param_count_; | 290 int register_param_count_; |
| 285 | 291 |
| 286 Register stack_parameter_count_; | 292 Register stack_parameter_count_; |
| 287 // if hint_stack_parameter_count_ > 0, the code stub can optimize the | 293 // if hint_stack_parameter_count_ > 0, the code stub can optimize the |
| 288 // return sequence. Default value is -1, which means it is ignored. | 294 // return sequence. Default value is -1, which means it is ignored. |
| 289 int hint_stack_parameter_count_; | 295 int hint_stack_parameter_count_; |
| 296 ContinuationType continuation_type_; |
| 290 StubFunctionMode function_mode_; | 297 StubFunctionMode function_mode_; |
| 291 Register* register_params_; | 298 Register* register_params_; |
| 292 | 299 |
| 293 Address deoptimization_handler_; | 300 Address deoptimization_handler_; |
| 294 HandlerArgumentsMode handler_arguments_mode_; | 301 HandlerArgumentsMode handler_arguments_mode_; |
| 295 | 302 |
| 303 bool initialized() const { return register_param_count_ >= 0; } |
| 304 |
| 305 bool HasTailCallContinuation() const { |
| 306 return continuation_type_ == TAIL_CALL_CONTINUATION; |
| 307 } |
| 308 |
| 296 int environment_length() const { | 309 int environment_length() const { |
| 297 return register_param_count_; | 310 return register_param_count_; |
| 298 } | 311 } |
| 299 | 312 |
| 300 bool initialized() const { return register_param_count_ >= 0; } | |
| 301 | |
| 302 void SetMissHandler(ExternalReference handler) { | 313 void SetMissHandler(ExternalReference handler) { |
| 303 miss_handler_ = handler; | 314 miss_handler_ = handler; |
| 304 has_miss_handler_ = true; | 315 has_miss_handler_ = true; |
| 305 // Our miss handler infrastructure doesn't currently support | 316 // Our miss handler infrastructure doesn't currently support |
| 306 // variable stack parameter counts. | 317 // variable stack parameter counts. |
| 307 ASSERT(!stack_parameter_count_.is_valid()); | 318 ASSERT(!stack_parameter_count_.is_valid()); |
| 308 } | 319 } |
| 309 | 320 |
| 310 ExternalReference miss_handler() { | 321 ExternalReference miss_handler() { |
| 311 ASSERT(has_miss_handler_); | 322 ASSERT(has_miss_handler_); |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 protected: | 880 protected: |
| 870 class KindBits: public BitField<Code::Kind, 0, 4> {}; | 881 class KindBits: public BitField<Code::Kind, 0, 4> {}; |
| 871 virtual Code::Kind kind() const = 0; | 882 virtual Code::Kind kind() const = 0; |
| 872 }; | 883 }; |
| 873 | 884 |
| 874 | 885 |
| 875 class HandlerStub: public HICStub { | 886 class HandlerStub: public HICStub { |
| 876 public: | 887 public: |
| 877 virtual Code::Kind GetCodeKind() const { return Code::HANDLER; } | 888 virtual Code::Kind GetCodeKind() const { return Code::HANDLER; } |
| 878 virtual int GetStubFlags() { return kind(); } | 889 virtual int GetStubFlags() { return kind(); } |
| 890 |
| 891 protected: |
| 892 HandlerStub() : HICStub() { } |
| 893 virtual int NotMissMinorKey() { return bit_field_; } |
| 894 int bit_field_; |
| 879 }; | 895 }; |
| 880 | 896 |
| 881 | 897 |
| 882 class LoadFieldStub: public HandlerStub { | 898 class LoadFieldStub: public HandlerStub { |
| 883 public: | 899 public: |
| 884 LoadFieldStub(bool inobject, int index, Representation representation) { | 900 LoadFieldStub(bool inobject, int index, Representation representation) { |
| 885 Initialize(Code::LOAD_IC, inobject, index, representation); | 901 Initialize(Code::LOAD_IC, inobject, index, representation); |
| 886 } | 902 } |
| 887 | 903 |
| 888 virtual Handle<Code> GenerateCode(Isolate* isolate); | 904 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 908 int index = IndexBits::decode(bit_field_); | 924 int index = IndexBits::decode(bit_field_); |
| 909 int offset = index * kPointerSize; | 925 int offset = index * kPointerSize; |
| 910 if (is_inobject()) return offset; | 926 if (is_inobject()) return offset; |
| 911 return FixedArray::kHeaderSize + offset; | 927 return FixedArray::kHeaderSize + offset; |
| 912 } | 928 } |
| 913 | 929 |
| 914 bool unboxed_double() { | 930 bool unboxed_double() { |
| 915 return UnboxedDoubleBits::decode(bit_field_); | 931 return UnboxedDoubleBits::decode(bit_field_); |
| 916 } | 932 } |
| 917 | 933 |
| 918 virtual Code::StubType GetStubType() { return Code::FIELD; } | 934 virtual Code::StubType GetStubType() { return Code::FAST; } |
| 919 | 935 |
| 920 protected: | 936 protected: |
| 921 LoadFieldStub() : HandlerStub() { } | 937 LoadFieldStub() : HandlerStub() { } |
| 922 | 938 |
| 923 void Initialize(Code::Kind kind, | 939 void Initialize(Code::Kind kind, |
| 924 bool inobject, | 940 bool inobject, |
| 925 int index, | 941 int index, |
| 926 Representation representation) { | 942 Representation representation) { |
| 927 bool unboxed_double = FLAG_track_double_fields && representation.IsDouble(); | 943 bool unboxed_double = FLAG_track_double_fields && representation.IsDouble(); |
| 928 bit_field_ = KindBits::encode(kind) | 944 bit_field_ = KindBits::encode(kind) |
| 929 | InobjectBits::encode(inobject) | 945 | InobjectBits::encode(inobject) |
| 930 | IndexBits::encode(index) | 946 | IndexBits::encode(index) |
| 931 | UnboxedDoubleBits::encode(unboxed_double); | 947 | UnboxedDoubleBits::encode(unboxed_double); |
| 932 } | 948 } |
| 933 | 949 |
| 934 private: | 950 private: |
| 935 STATIC_ASSERT(KindBits::kSize == 4); | 951 STATIC_ASSERT(KindBits::kSize == 4); |
| 936 class InobjectBits: public BitField<bool, 4, 1> {}; | 952 class InobjectBits: public BitField<bool, 4, 1> {}; |
| 937 class IndexBits: public BitField<int, 5, 11> {}; | 953 class IndexBits: public BitField<int, 5, 11> {}; |
| 938 class UnboxedDoubleBits: public BitField<bool, 16, 1> {}; | 954 class UnboxedDoubleBits: public BitField<bool, 16, 1> {}; |
| 939 virtual CodeStub::Major MajorKey() { return LoadField; } | 955 virtual CodeStub::Major MajorKey() { return LoadField; } |
| 940 virtual int NotMissMinorKey() { return bit_field_; } | |
| 941 | |
| 942 int bit_field_; | |
| 943 }; | 956 }; |
| 944 | 957 |
| 945 | 958 |
| 946 class StoreGlobalStub : public HandlerStub { | 959 class StoreGlobalStub : public HandlerStub { |
| 947 public: | 960 public: |
| 948 StoreGlobalStub(StrictModeFlag strict_mode, bool is_constant) { | 961 StoreGlobalStub(StrictModeFlag strict_mode, bool is_constant) { |
| 949 bit_field_ = StrictModeBits::encode(strict_mode) | | 962 bit_field_ = StrictModeBits::encode(strict_mode) | |
| 950 IsConstantBits::encode(is_constant); | 963 IsConstantBits::encode(is_constant); |
| 951 } | 964 } |
| 952 | 965 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 Isolate* isolate, | 1024 Isolate* isolate, |
| 1012 CodeStubInterfaceDescriptor* descriptor); | 1025 CodeStubInterfaceDescriptor* descriptor); |
| 1013 | 1026 |
| 1014 virtual Handle<Code> GenerateCode(Isolate* isolate); | 1027 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 1015 | 1028 |
| 1016 private: | 1029 private: |
| 1017 virtual CodeStub::Major MajorKey() { return KeyedLoadField; } | 1030 virtual CodeStub::Major MajorKey() { return KeyedLoadField; } |
| 1018 }; | 1031 }; |
| 1019 | 1032 |
| 1020 | 1033 |
| 1034 class KeyedArrayCallStub: public HICStub { |
| 1035 public: |
| 1036 KeyedArrayCallStub(bool holey, int argc) : HICStub(), argc_(argc) { |
| 1037 bit_field_ = ContextualBits::encode(false) | HoleyBits::encode(holey); |
| 1038 } |
| 1039 |
| 1040 virtual Code::Kind kind() const { return Code::KEYED_CALL_IC; } |
| 1041 virtual Code::ExtraICState GetExtraICState() { return bit_field_; } |
| 1042 |
| 1043 ElementsKind elements_kind() { |
| 1044 return HoleyBits::decode(bit_field_) ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS; |
| 1045 } |
| 1046 |
| 1047 int argc() { return argc_; } |
| 1048 virtual int GetStubFlags() { return argc(); } |
| 1049 |
| 1050 static bool IsHoley(Handle<Code> code) { |
| 1051 Code::ExtraICState state = code->extra_ic_state(); |
| 1052 return HoleyBits::decode(state); |
| 1053 } |
| 1054 |
| 1055 virtual void InitializeInterfaceDescriptor( |
| 1056 Isolate* isolate, |
| 1057 CodeStubInterfaceDescriptor* descriptor); |
| 1058 |
| 1059 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 1060 |
| 1061 private: |
| 1062 virtual int NotMissMinorKey() { |
| 1063 return GetExtraICState() | ArgcBits::encode(argc_); |
| 1064 } |
| 1065 |
| 1066 class ContextualBits: public BitField<bool, 0, 1> {}; |
| 1067 STATIC_ASSERT(CallICBase::Contextual::kShift == ContextualBits::kShift); |
| 1068 STATIC_ASSERT(CallICBase::Contextual::kSize == ContextualBits::kSize); |
| 1069 class HoleyBits: public BitField<bool, 1, 1> {}; |
| 1070 STATIC_ASSERT(Code::kArgumentsBits <= kStubMinorKeyBits - 2); |
| 1071 class ArgcBits: public BitField<int, 2, Code::kArgumentsBits> {}; |
| 1072 virtual CodeStub::Major MajorKey() { return KeyedArrayCall; } |
| 1073 int bit_field_; |
| 1074 int argc_; |
| 1075 }; |
| 1076 |
| 1077 |
| 1021 class BinaryOpStub: public HydrogenCodeStub { | 1078 class BinaryOpStub: public HydrogenCodeStub { |
| 1022 public: | 1079 public: |
| 1023 BinaryOpStub(Token::Value op, OverwriteMode mode) | 1080 BinaryOpStub(Token::Value op, OverwriteMode mode) |
| 1024 : HydrogenCodeStub(UNINITIALIZED), op_(op), mode_(mode) { | 1081 : HydrogenCodeStub(UNINITIALIZED), op_(op), mode_(mode) { |
| 1025 ASSERT(op <= LAST_TOKEN && op >= FIRST_TOKEN); | 1082 ASSERT(op <= LAST_TOKEN && op >= FIRST_TOKEN); |
| 1026 Initialize(); | 1083 Initialize(); |
| 1027 } | 1084 } |
| 1028 | 1085 |
| 1029 explicit BinaryOpStub(Code::ExtraICState state) | 1086 explicit BinaryOpStub(Code::ExtraICState state) |
| 1030 : op_(decode_token(OpBits::decode(state))), | 1087 : op_(decode_token(OpBits::decode(state))), |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 } | 1832 } |
| 1776 | 1833 |
| 1777 private: | 1834 private: |
| 1778 MacroAssembler* masm_; | 1835 MacroAssembler* masm_; |
| 1779 bool previous_allow_; | 1836 bool previous_allow_; |
| 1780 | 1837 |
| 1781 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); | 1838 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |
| 1782 }; | 1839 }; |
| 1783 | 1840 |
| 1784 | 1841 |
| 1785 class KeyedLoadDictionaryElementStub : public PlatformCodeStub { | 1842 class KeyedLoadDictionaryElementStub : public HydrogenCodeStub { |
| 1786 public: | 1843 public: |
| 1787 KeyedLoadDictionaryElementStub() {} | 1844 KeyedLoadDictionaryElementStub() {} |
| 1788 | 1845 |
| 1846 virtual Handle<Code> GenerateCode(Isolate* isolate) V8_OVERRIDE; |
| 1847 |
| 1848 virtual void InitializeInterfaceDescriptor( |
| 1849 Isolate* isolate, |
| 1850 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; |
| 1851 |
| 1852 private: |
| 1853 Major MajorKey() { return KeyedLoadElement; } |
| 1854 int NotMissMinorKey() { return DICTIONARY_ELEMENTS; } |
| 1855 |
| 1856 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementStub); |
| 1857 }; |
| 1858 |
| 1859 |
| 1860 class KeyedLoadDictionaryElementPlatformStub : public PlatformCodeStub { |
| 1861 public: |
| 1862 KeyedLoadDictionaryElementPlatformStub() {} |
| 1863 |
| 1789 void Generate(MacroAssembler* masm); | 1864 void Generate(MacroAssembler* masm); |
| 1790 | 1865 |
| 1791 private: | 1866 private: |
| 1792 Major MajorKey() { return KeyedLoadElement; } | 1867 Major MajorKey() { return KeyedLoadElement; } |
| 1793 int MinorKey() { return DICTIONARY_ELEMENTS; } | 1868 int MinorKey() { return DICTIONARY_ELEMENTS; } |
| 1794 | 1869 |
| 1795 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementStub); | 1870 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementPlatformStub); |
| 1796 }; | 1871 }; |
| 1797 | 1872 |
| 1798 | 1873 |
| 1799 class DoubleToIStub : public PlatformCodeStub { | 1874 class DoubleToIStub : public PlatformCodeStub { |
| 1800 public: | 1875 public: |
| 1801 DoubleToIStub(Register source, | 1876 DoubleToIStub(Register source, |
| 1802 Register destination, | 1877 Register destination, |
| 1803 int offset, | 1878 int offset, |
| 1804 bool is_truncating, | 1879 bool is_truncating, |
| 1805 bool skip_fastpath = false) : bit_field_(0) { | 1880 bool skip_fastpath = false) : bit_field_(0) { |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2392 | 2467 |
| 2393 void Generate(MacroAssembler* masm); | 2468 void Generate(MacroAssembler* masm); |
| 2394 | 2469 |
| 2395 bool fp_registers_; | 2470 bool fp_registers_; |
| 2396 StubFunctionMode function_mode_; | 2471 StubFunctionMode function_mode_; |
| 2397 | 2472 |
| 2398 DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub); | 2473 DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub); |
| 2399 }; | 2474 }; |
| 2400 | 2475 |
| 2401 | 2476 |
| 2477 class StubFailureTailCallTrampolineStub : public PlatformCodeStub { |
| 2478 public: |
| 2479 StubFailureTailCallTrampolineStub() : fp_registers_(CanUseFPRegisters()) {} |
| 2480 |
| 2481 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE { return true; } |
| 2482 |
| 2483 static void GenerateAheadOfTime(Isolate* isolate); |
| 2484 |
| 2485 private: |
| 2486 class FPRegisters: public BitField<bool, 0, 1> {}; |
| 2487 Major MajorKey() { return StubFailureTailCallTrampoline; } |
| 2488 int MinorKey() { return FPRegisters::encode(fp_registers_); } |
| 2489 |
| 2490 void Generate(MacroAssembler* masm); |
| 2491 |
| 2492 bool fp_registers_; |
| 2493 |
| 2494 DISALLOW_COPY_AND_ASSIGN(StubFailureTailCallTrampolineStub); |
| 2495 }; |
| 2496 |
| 2497 |
| 2402 class ProfileEntryHookStub : public PlatformCodeStub { | 2498 class ProfileEntryHookStub : public PlatformCodeStub { |
| 2403 public: | 2499 public: |
| 2404 explicit ProfileEntryHookStub() {} | 2500 explicit ProfileEntryHookStub() {} |
| 2405 | 2501 |
| 2406 // The profile entry hook function is not allowed to cause a GC. | 2502 // The profile entry hook function is not allowed to cause a GC. |
| 2407 virtual bool SometimesSetsUpAFrame() { return false; } | 2503 virtual bool SometimesSetsUpAFrame() { return false; } |
| 2408 | 2504 |
| 2409 // Generates a call to the entry hook if it's enabled. | 2505 // Generates a call to the entry hook if it's enabled. |
| 2410 static void MaybeCallEntryHook(MacroAssembler* masm); | 2506 static void MaybeCallEntryHook(MacroAssembler* masm); |
| 2411 | 2507 |
| 2412 private: | 2508 private: |
| 2413 static void EntryHookTrampoline(intptr_t function, | 2509 static void EntryHookTrampoline(intptr_t function, |
| 2414 intptr_t stack_pointer, | 2510 intptr_t stack_pointer, |
| 2415 Isolate* isolate); | 2511 Isolate* isolate); |
| 2416 | 2512 |
| 2417 Major MajorKey() { return ProfileEntryHook; } | 2513 Major MajorKey() { return ProfileEntryHook; } |
| 2418 int MinorKey() { return 0; } | 2514 int MinorKey() { return 0; } |
| 2419 | 2515 |
| 2420 void Generate(MacroAssembler* masm); | 2516 void Generate(MacroAssembler* masm); |
| 2421 | 2517 |
| 2422 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2518 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 2423 }; | 2519 }; |
| 2424 | 2520 |
| 2425 } } // namespace v8::internal | 2521 } } // namespace v8::internal |
| 2426 | 2522 |
| 2427 #endif // V8_CODE_STUBS_H_ | 2523 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |