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" |
11 #include "src/globals.h" | 11 #include "src/globals.h" |
12 #include "src/ic/ic-state.h" | 12 #include "src/ic/ic-state.h" |
13 #include "src/interface-descriptors.h" | 13 #include "src/interface-descriptors.h" |
14 #include "src/macro-assembler.h" | 14 #include "src/macro-assembler.h" |
15 #include "src/ostreams.h" | 15 #include "src/ostreams.h" |
16 | 16 |
17 namespace v8 { | 17 namespace v8 { |
18 namespace internal { | 18 namespace internal { |
19 | 19 |
20 // List of code stubs used on all platforms. | 20 // List of code stubs used on all platforms. |
21 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \ | 21 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
22 /* PlatformCodeStubs */ \ | 22 /* PlatformCodeStubs */ \ |
23 V(ArgumentsAccess) \ | 23 V(ArgumentsAccess) \ |
24 V(ArrayConstructor) \ | 24 V(ArrayConstructor) \ |
25 V(BinaryOpICWithAllocationSite) \ | 25 V(BinaryOpICWithAllocationSite) \ |
26 V(CallApiFunction) \ | 26 V(CallApiFunction) \ |
27 V(CallApiAccessor) \ | 27 V(CallApiAccessor) \ |
28 V(CallApiGetter) \ | 28 V(CallApiGetter) \ |
29 V(CallConstruct) \ | |
30 V(CallIC) \ | 29 V(CallIC) \ |
| 30 V(ConstructIC) \ |
31 V(CEntry) \ | 31 V(CEntry) \ |
32 V(CompareIC) \ | 32 V(CompareIC) \ |
33 V(DoubleToI) \ | 33 V(DoubleToI) \ |
34 V(FunctionPrototype) \ | 34 V(FunctionPrototype) \ |
35 V(InstanceOf) \ | 35 V(InstanceOf) \ |
36 V(InternalArrayConstructor) \ | 36 V(InternalArrayConstructor) \ |
37 V(JSEntry) \ | 37 V(JSEntry) \ |
38 V(KeyedLoadICTrampoline) \ | 38 V(KeyedLoadICTrampoline) \ |
39 V(LoadICTrampoline) \ | 39 V(LoadICTrampoline) \ |
40 V(CallICTrampoline) \ | 40 V(CallICTrampoline) \ |
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 // Parameters accessed via CodeStubGraphBuilder::GetParameter() | 1955 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
1956 static const int kLength = 0; | 1956 static const int kLength = 0; |
1957 static const int kIndex = 1; | 1957 static const int kIndex = 1; |
1958 static const int kInput = 2; | 1958 static const int kInput = 2; |
1959 | 1959 |
1960 DEFINE_CALL_INTERFACE_DESCRIPTOR(RegExpConstructResult); | 1960 DEFINE_CALL_INTERFACE_DESCRIPTOR(RegExpConstructResult); |
1961 DEFINE_HYDROGEN_CODE_STUB(RegExpConstructResult, HydrogenCodeStub); | 1961 DEFINE_HYDROGEN_CODE_STUB(RegExpConstructResult, HydrogenCodeStub); |
1962 }; | 1962 }; |
1963 | 1963 |
1964 | 1964 |
1965 // TODO(bmeurer/mvstanton): Turn CallConstructStub into ConstructICStub. | 1965 class ConstructICStub final : public PlatformCodeStub { |
1966 class CallConstructStub final : public PlatformCodeStub { | |
1967 public: | 1966 public: |
1968 explicit CallConstructStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 1967 explicit ConstructICStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
1969 | 1968 |
1970 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallConstruct); | 1969 Code::Kind GetCodeKind() const override { return Code::CONSTRUCT_IC; } |
1971 DEFINE_PLATFORM_CODE_STUB(CallConstruct, PlatformCodeStub); | 1970 |
| 1971 InlineCacheState GetICState() const final { return GENERIC; } |
| 1972 |
| 1973 DEFINE_CALL_INTERFACE_DESCRIPTOR(Construct); |
| 1974 DEFINE_PLATFORM_CODE_STUB(ConstructIC, PlatformCodeStub); |
1972 }; | 1975 }; |
1973 | 1976 |
1974 | 1977 |
1975 enum StringIndexFlags { | 1978 enum StringIndexFlags { |
1976 // Accepts smis or heap numbers. | 1979 // Accepts smis or heap numbers. |
1977 STRING_INDEX_IS_NUMBER, | 1980 STRING_INDEX_IS_NUMBER, |
1978 | 1981 |
1979 // Accepts smis or heap numbers that are valid array indices | 1982 // Accepts smis or heap numbers that are valid array indices |
1980 // (ECMA-262 15.4). Invalid indices are reported as being out of | 1983 // (ECMA-262 15.4). Invalid indices are reported as being out of |
1981 // range. | 1984 // range. |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3061 #undef DEFINE_HYDROGEN_CODE_STUB | 3064 #undef DEFINE_HYDROGEN_CODE_STUB |
3062 #undef DEFINE_CODE_STUB | 3065 #undef DEFINE_CODE_STUB |
3063 #undef DEFINE_CODE_STUB_BASE | 3066 #undef DEFINE_CODE_STUB_BASE |
3064 | 3067 |
3065 extern Representation RepresentationFromType(Type* type); | 3068 extern Representation RepresentationFromType(Type* type); |
3066 | 3069 |
3067 } // namespace internal | 3070 } // namespace internal |
3068 } // namespace v8 | 3071 } // namespace v8 |
3069 | 3072 |
3070 #endif // V8_CODE_STUBS_H_ | 3073 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |