| 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) \ |
| 29 V(CallIC) \ | 30 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 class ConstructICStub final : public PlatformCodeStub { | 1965 // TODO(bmeurer/mvstanton): Turn CallConstructStub into ConstructICStub. |
| 1966 class CallConstructStub final : public PlatformCodeStub { |
| 1966 public: | 1967 public: |
| 1967 explicit ConstructICStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 1968 explicit CallConstructStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 1968 | 1969 |
| 1969 Code::Kind GetCodeKind() const override { return Code::CONSTRUCT_IC; } | 1970 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallConstruct); |
| 1970 | 1971 DEFINE_PLATFORM_CODE_STUB(CallConstruct, PlatformCodeStub); |
| 1971 InlineCacheState GetICState() const final { return GENERIC; } | |
| 1972 | |
| 1973 DEFINE_CALL_INTERFACE_DESCRIPTOR(Construct); | |
| 1974 DEFINE_PLATFORM_CODE_STUB(ConstructIC, PlatformCodeStub); | |
| 1975 }; | 1972 }; |
| 1976 | 1973 |
| 1977 | 1974 |
| 1978 enum StringIndexFlags { | 1975 enum StringIndexFlags { |
| 1979 // Accepts smis or heap numbers. | 1976 // Accepts smis or heap numbers. |
| 1980 STRING_INDEX_IS_NUMBER, | 1977 STRING_INDEX_IS_NUMBER, |
| 1981 | 1978 |
| 1982 // Accepts smis or heap numbers that are valid array indices | 1979 // Accepts smis or heap numbers that are valid array indices |
| 1983 // (ECMA-262 15.4). Invalid indices are reported as being out of | 1980 // (ECMA-262 15.4). Invalid indices are reported as being out of |
| 1984 // range. | 1981 // range. |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3064 #undef DEFINE_HYDROGEN_CODE_STUB | 3061 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3065 #undef DEFINE_CODE_STUB | 3062 #undef DEFINE_CODE_STUB |
| 3066 #undef DEFINE_CODE_STUB_BASE | 3063 #undef DEFINE_CODE_STUB_BASE |
| 3067 | 3064 |
| 3068 extern Representation RepresentationFromType(Type* type); | 3065 extern Representation RepresentationFromType(Type* type); |
| 3069 | 3066 |
| 3070 } // namespace internal | 3067 } // namespace internal |
| 3071 } // namespace v8 | 3068 } // namespace v8 |
| 3072 | 3069 |
| 3073 #endif // V8_CODE_STUBS_H_ | 3070 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |