OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 V(InternalArrayNArgumentsConstructor) \ | 73 V(InternalArrayNArgumentsConstructor) \ |
74 V(InternalArrayNoArgumentConstructor) \ | 74 V(InternalArrayNoArgumentConstructor) \ |
75 V(InternalArraySingleArgumentConstructor) \ | 75 V(InternalArraySingleArgumentConstructor) \ |
76 V(KeyedLoadGeneric) \ | 76 V(KeyedLoadGeneric) \ |
77 V(LoadScriptContextField) \ | 77 V(LoadScriptContextField) \ |
78 V(LoadDictionaryElement) \ | 78 V(LoadDictionaryElement) \ |
79 V(LoadFastElement) \ | 79 V(LoadFastElement) \ |
80 V(MegamorphicLoad) \ | 80 V(MegamorphicLoad) \ |
81 V(NameDictionaryLookup) \ | 81 V(NameDictionaryLookup) \ |
82 V(NumberToString) \ | 82 V(NumberToString) \ |
| 83 V(Typeof) \ |
83 V(RegExpConstructResult) \ | 84 V(RegExpConstructResult) \ |
84 V(StoreFastElement) \ | 85 V(StoreFastElement) \ |
85 V(StoreScriptContextField) \ | 86 V(StoreScriptContextField) \ |
86 V(StringAdd) \ | 87 V(StringAdd) \ |
87 V(ToBoolean) \ | 88 V(ToBoolean) \ |
88 V(TransitionElementsKind) \ | 89 V(TransitionElementsKind) \ |
89 V(VectorRawKeyedLoad) \ | 90 V(VectorRawKeyedLoad) \ |
90 V(VectorRawLoad) \ | 91 V(VectorRawLoad) \ |
91 /* IC Handler stubs */ \ | 92 /* IC Handler stubs */ \ |
92 V(ArrayBufferViewLoadField) \ | 93 V(ArrayBufferViewLoadField) \ |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} | 589 explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} |
589 | 590 |
590 // Parameters accessed via CodeStubGraphBuilder::GetParameter() | 591 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
591 static const int kNumber = 0; | 592 static const int kNumber = 0; |
592 | 593 |
593 DEFINE_CALL_INTERFACE_DESCRIPTOR(NumberToString); | 594 DEFINE_CALL_INTERFACE_DESCRIPTOR(NumberToString); |
594 DEFINE_HYDROGEN_CODE_STUB(NumberToString, HydrogenCodeStub); | 595 DEFINE_HYDROGEN_CODE_STUB(NumberToString, HydrogenCodeStub); |
595 }; | 596 }; |
596 | 597 |
597 | 598 |
| 599 class TypeofStub final : public HydrogenCodeStub { |
| 600 public: |
| 601 explicit TypeofStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} |
| 602 |
| 603 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
| 604 static const int kObject = 0; |
| 605 |
| 606 static void GenerateAheadOfTime(Isolate* isolate); |
| 607 |
| 608 DEFINE_CALL_INTERFACE_DESCRIPTOR(Typeof); |
| 609 DEFINE_HYDROGEN_CODE_STUB(Typeof, HydrogenCodeStub); |
| 610 }; |
| 611 |
| 612 |
598 class FastNewClosureStub : public HydrogenCodeStub { | 613 class FastNewClosureStub : public HydrogenCodeStub { |
599 public: | 614 public: |
600 FastNewClosureStub(Isolate* isolate, LanguageMode language_mode, | 615 FastNewClosureStub(Isolate* isolate, LanguageMode language_mode, |
601 FunctionKind kind) | 616 FunctionKind kind) |
602 : HydrogenCodeStub(isolate) { | 617 : HydrogenCodeStub(isolate) { |
603 DCHECK(IsValidFunctionKind(kind)); | 618 DCHECK(IsValidFunctionKind(kind)); |
604 set_sub_minor_key(LanguageModeBits::encode(language_mode) | | 619 set_sub_minor_key(LanguageModeBits::encode(language_mode) | |
605 FunctionKindBits::encode(kind)); | 620 FunctionKindBits::encode(kind)); |
606 } | 621 } |
607 | 622 |
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2820 | 2835 |
2821 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2836 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
2822 #undef DEFINE_PLATFORM_CODE_STUB | 2837 #undef DEFINE_PLATFORM_CODE_STUB |
2823 #undef DEFINE_HANDLER_CODE_STUB | 2838 #undef DEFINE_HANDLER_CODE_STUB |
2824 #undef DEFINE_HYDROGEN_CODE_STUB | 2839 #undef DEFINE_HYDROGEN_CODE_STUB |
2825 #undef DEFINE_CODE_STUB | 2840 #undef DEFINE_CODE_STUB |
2826 #undef DEFINE_CODE_STUB_BASE | 2841 #undef DEFINE_CODE_STUB_BASE |
2827 } } // namespace v8::internal | 2842 } } // namespace v8::internal |
2828 | 2843 |
2829 #endif // V8_CODE_STUBS_H_ | 2844 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |