OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_H_ |
6 #define V8_BUILTINS_H_ | 6 #define V8_BUILTINS_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 V(Sexagenarian, A) \ | 21 V(Sexagenarian, A) \ |
22 V(Septuagenarian, A) \ | 22 V(Septuagenarian, A) \ |
23 V(Octogenarian, A) | 23 V(Octogenarian, A) |
24 | 24 |
25 #define CODE_AGE_LIST_IGNORE_ARG(X, V) V(X) | 25 #define CODE_AGE_LIST_IGNORE_ARG(X, V) V(X) |
26 | 26 |
27 #define CODE_AGE_LIST(V) \ | 27 #define CODE_AGE_LIST(V) \ |
28 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V) | 28 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V) |
29 | 29 |
30 #define CODE_AGE_LIST_COMPLETE(V) \ | 30 #define CODE_AGE_LIST_COMPLETE(V) \ |
| 31 V(ToBeExecutedOnce) \ |
31 V(NotExecuted) \ | 32 V(NotExecuted) \ |
32 V(ExecutedOnce) \ | 33 V(ExecutedOnce) \ |
33 V(NoAge) \ | 34 V(NoAge) \ |
34 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V) | 35 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V) |
35 | 36 |
36 #define DECLARE_CODE_AGE_BUILTIN(C, V) \ | 37 #define DECLARE_CODE_AGE_BUILTIN(C, V) \ |
37 V(Make##C##CodeYoungAgainOddMarking, BUILTIN, \ | 38 V(Make##C##CodeYoungAgainOddMarking, BUILTIN, \ |
38 UNINITIALIZED, kNoExtraICState) \ | 39 UNINITIALIZED, kNoExtraICState) \ |
39 V(Make##C##CodeYoungAgainEvenMarking, BUILTIN, \ | 40 V(Make##C##CodeYoungAgainEvenMarking, BUILTIN, \ |
40 UNINITIALIZED, kNoExtraICState) | 41 UNINITIALIZED, kNoExtraICState) |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 V(InternalArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 116 V(InternalArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
116 V(ArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 117 V(ArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
117 \ | 118 \ |
118 V(StringConstructCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 119 V(StringConstructCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
119 \ | 120 \ |
120 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 121 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
121 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 122 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
122 V(OsrAfterStackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 123 V(OsrAfterStackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
123 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 124 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
124 \ | 125 \ |
| 126 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
125 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 127 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
126 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 128 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
127 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) | 129 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) |
128 | 130 |
129 // Define list of builtin handlers implemented in assembly. | 131 // Define list of builtin handlers implemented in assembly. |
130 #define BUILTIN_LIST_H(V) \ | 132 #define BUILTIN_LIST_H(V) \ |
131 V(LoadIC_Slow, LOAD_IC) \ | 133 V(LoadIC_Slow, LOAD_IC) \ |
132 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ | 134 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ |
133 V(StoreIC_Slow, STORE_IC) \ | 135 V(StoreIC_Slow, STORE_IC) \ |
134 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ | 136 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 static void Generate_StackCheck(MacroAssembler* masm); | 335 static void Generate_StackCheck(MacroAssembler* masm); |
334 | 336 |
335 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ | 337 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ |
336 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ | 338 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ |
337 MacroAssembler* masm); \ | 339 MacroAssembler* masm); \ |
338 static void Generate_Make##C##CodeYoungAgainOddMarking( \ | 340 static void Generate_Make##C##CodeYoungAgainOddMarking( \ |
339 MacroAssembler* masm); | 341 MacroAssembler* masm); |
340 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) | 342 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) |
341 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR | 343 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR |
342 | 344 |
| 345 static void Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm); |
343 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm); | 346 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm); |
344 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm); | 347 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm); |
345 | 348 |
346 static void InitBuiltinFunctionTable(); | 349 static void InitBuiltinFunctionTable(); |
347 | 350 |
348 bool initialized_; | 351 bool initialized_; |
349 | 352 |
350 friend class BuiltinFunctionTable; | 353 friend class BuiltinFunctionTable; |
351 friend class Isolate; | 354 friend class Isolate; |
352 | 355 |
353 DISALLOW_COPY_AND_ASSIGN(Builtins); | 356 DISALLOW_COPY_AND_ASSIGN(Builtins); |
354 }; | 357 }; |
355 | 358 |
356 } } // namespace v8::internal | 359 } } // namespace v8::internal |
357 | 360 |
358 #endif // V8_BUILTINS_H_ | 361 #endif // V8_BUILTINS_H_ |
OLD | NEW |