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_RUNTIME_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_RUNTIME_H_ |
6 #define V8_RUNTIME_RUNTIME_H_ | 6 #define V8_RUNTIME_RUNTIME_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/platform/time.h" | 9 #include "src/base/platform/time.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // * IDs are Runtime::k##name and Runtime::kInline##name, respectively. | 24 // * IDs are Runtime::k##name and Runtime::kInline##name, respectively. |
25 // | 25 // |
26 // * All intrinsics have a C++ implementation Runtime_##name. | 26 // * All intrinsics have a C++ implementation Runtime_##name. |
27 // | 27 // |
28 // * Each compiler has an explicit list of intrisics it supports, falling back | 28 // * Each compiler has an explicit list of intrisics it supports, falling back |
29 // to a simple runtime call if necessary. | 29 // to a simple runtime call if necessary. |
30 | 30 |
31 | 31 |
32 // Entries have the form F(name, number of arguments, number of values): | 32 // Entries have the form F(name, number of arguments, number of values): |
33 | 33 |
34 #define FOR_EACH_INTRINSIC_ARRAY(F) \ | 34 #define FOR_EACH_INTRINSIC_ARRAY(F) \ |
35 F(FinishArrayPrototypeSetup, 1, 1) \ | 35 F(FinishArrayPrototypeSetup, 1, 1) \ |
36 F(SpecialArrayFunctions, 0, 1) \ | 36 F(SpecialArrayFunctions, 0, 1) \ |
37 F(TransitionElementsKind, 2, 1) \ | 37 F(TransitionElementsKind, 2, 1) \ |
38 F(RemoveArrayHoles, 2, 1) \ | 38 F(RemoveArrayHoles, 2, 1) \ |
39 F(MoveArrayContents, 2, 1) \ | 39 F(MoveArrayContents, 2, 1) \ |
40 F(EstimateNumberOfElements, 1, 1) \ | 40 F(EstimateNumberOfElements, 1, 1) \ |
41 F(GetArrayKeys, 2, 1) \ | 41 F(GetArrayKeys, 2, 1) \ |
42 F(ArrayConstructor, -1, 1) \ | 42 F(ArrayConstructor, -1, 1) \ |
43 F(NewArray, -1 /* >= 3 */, 1) \ | 43 F(NewArray, -1 /* >= 3 */, 1) \ |
44 F(InternalArrayConstructor, -1, 1) \ | 44 F(InternalArrayConstructor, -1, 1) \ |
45 F(ArrayPush, -1, 1) \ | 45 F(ArraySingleArgumentConstructor, -1, 1) \ |
46 F(NormalizeElements, 1, 1) \ | 46 F(ArrayPush, -1, 1) \ |
47 F(GrowArrayElements, 2, 1) \ | 47 F(NormalizeElements, 1, 1) \ |
48 F(HasComplexElements, 1, 1) \ | 48 F(GrowArrayElements, 2, 1) \ |
49 F(IsArray, 1, 1) \ | 49 F(HasComplexElements, 1, 1) \ |
50 F(ArrayIsArray, 1, 1) \ | 50 F(IsArray, 1, 1) \ |
51 F(HasCachedArrayIndex, 1, 1) \ | 51 F(ArrayIsArray, 1, 1) \ |
52 F(GetCachedArrayIndex, 1, 1) \ | 52 F(HasCachedArrayIndex, 1, 1) \ |
53 F(FixedArrayGet, 2, 1) \ | 53 F(GetCachedArrayIndex, 1, 1) \ |
54 F(FixedArraySet, 3, 1) \ | 54 F(FixedArrayGet, 2, 1) \ |
| 55 F(FixedArraySet, 3, 1) \ |
55 F(ArraySpeciesConstructor, 1, 1) | 56 F(ArraySpeciesConstructor, 1, 1) |
56 | 57 |
57 #define FOR_EACH_INTRINSIC_ATOMICS(F) \ | 58 #define FOR_EACH_INTRINSIC_ATOMICS(F) \ |
58 F(ThrowNotIntegerSharedTypedArrayError, 1, 1) \ | 59 F(ThrowNotIntegerSharedTypedArrayError, 1, 1) \ |
59 F(ThrowNotInt32SharedTypedArrayError, 1, 1) \ | 60 F(ThrowNotInt32SharedTypedArrayError, 1, 1) \ |
60 F(ThrowInvalidAtomicAccessIndexError, 0, 1) \ | 61 F(ThrowInvalidAtomicAccessIndexError, 0, 1) \ |
61 F(AtomicsCompareExchange, 4, 1) \ | 62 F(AtomicsCompareExchange, 4, 1) \ |
62 F(AtomicsAdd, 3, 1) \ | 63 F(AtomicsAdd, 3, 1) \ |
63 F(AtomicsSub, 3, 1) \ | 64 F(AtomicsSub, 3, 1) \ |
64 F(AtomicsAnd, 3, 1) \ | 65 F(AtomicsAnd, 3, 1) \ |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 | 1163 |
1163 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; | 1164 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; |
1164 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; | 1165 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; |
1165 STATIC_ASSERT(LANGUAGE_END == 3); | 1166 STATIC_ASSERT(LANGUAGE_END == 3); |
1166 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; | 1167 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; |
1167 | 1168 |
1168 } // namespace internal | 1169 } // namespace internal |
1169 } // namespace v8 | 1170 } // namespace v8 |
1170 | 1171 |
1171 #endif // V8_RUNTIME_RUNTIME_H_ | 1172 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |