Chromium Code Reviews| 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_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_BUILTINS_H_ |
| 6 #define V8_BUILTINS_BUILTINS_H_ | 6 #define V8_BUILTINS_BUILTINS_H_ |
| 7 | 7 |
| 8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function). | 42 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function). |
| 43 // Args: name, arguments count | 43 // Args: name, arguments count |
| 44 // TFS: Builtin in Turbofan, with CodeStub linkage. | 44 // TFS: Builtin in Turbofan, with CodeStub linkage. |
| 45 // Args: name, code kind, extra IC state, interface descriptor, return_size | 45 // Args: name, code kind, extra IC state, interface descriptor, return_size |
| 46 // ASM: Builtin in platform-dependent assembly. | 46 // ASM: Builtin in platform-dependent assembly. |
| 47 // Args: name | 47 // Args: name |
| 48 // ASH: Handlers implemented in platform-dependent assembly. | 48 // ASH: Handlers implemented in platform-dependent assembly. |
| 49 // Args: name, code kind, extra IC state | 49 // Args: name, code kind, extra IC state |
| 50 // DBG: Builtin in platform-dependent assembly, used by the debugger. | 50 // DBG: Builtin in platform-dependent assembly, used by the debugger. |
| 51 // Args: name | 51 // Args: name |
| 52 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | 52 #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 |
| 53 #define ATOMICS_BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 54 CPP(AtomicsExchange) | |
|
Jarin
2017/03/01 07:45:37
Rather than special casing here, could you keep th
aseemgarg
2017/03/02 03:26:56
Put in call to runtime function. Will ping v8-mips
| |
| 55 #else | |
| 56 #define ATOMICS_BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 57 TFJ(AtomicsExchange, 3) | |
| 58 #endif | |
| 59 | |
| 60 #define NON_ATOMICS_BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 53 ASM(Abort) \ | 61 ASM(Abort) \ |
| 54 /* Code aging */ \ | 62 /* Code aging */ \ |
| 55 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ | 63 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ |
| 56 \ | 64 \ |
| 57 /* Declared first for dependency reasons */ \ | 65 /* Declared first for dependency reasons */ \ |
| 58 ASM(CompileLazy) \ | 66 ASM(CompileLazy) \ |
| 59 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion, 1) \ | 67 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion, 1) \ |
| 60 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject, 1) \ | 68 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject, 1) \ |
| 61 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty, 1) \ | 69 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty, 1) \ |
| 62 \ | 70 \ |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 840 \ | 848 \ |
| 841 /* %AsyncFromSyncIteratorPrototype% */ \ | 849 /* %AsyncFromSyncIteratorPrototype% */ \ |
| 842 /* (proposal-async-iteration/#sec-%asyncfromsynciteratorprototype%-object)*/ \ | 850 /* (proposal-async-iteration/#sec-%asyncfromsynciteratorprototype%-object)*/ \ |
| 843 TFJ(AsyncFromSyncIteratorPrototypeNext, 1) \ | 851 TFJ(AsyncFromSyncIteratorPrototypeNext, 1) \ |
| 844 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1) \ | 852 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1) \ |
| 845 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1) \ | 853 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1) \ |
| 846 \ | 854 \ |
| 847 /* proposal-async-iteration/#sec-async-iterator-value-unwrap-functions */ \ | 855 /* proposal-async-iteration/#sec-async-iterator-value-unwrap-functions */ \ |
| 848 TFJ(AsyncIteratorValueUnwrap, 1) | 856 TFJ(AsyncIteratorValueUnwrap, 1) |
| 849 | 857 |
| 858 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 859 NON_ATOMICS_BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 860 ATOMICS_BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) | |
| 861 | |
| 850 #define IGNORE_BUILTIN(...) | 862 #define IGNORE_BUILTIN(...) |
| 851 | 863 |
| 852 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V) | 864 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V) |
| 853 | 865 |
| 854 #define BUILTIN_LIST_C(V) \ | 866 #define BUILTIN_LIST_C(V) \ |
| 855 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ | 867 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
| 856 IGNORE_BUILTIN, IGNORE_BUILTIN) | 868 IGNORE_BUILTIN, IGNORE_BUILTIN) |
| 857 | 869 |
| 858 #define BUILTIN_LIST_A(V) \ | 870 #define BUILTIN_LIST_A(V) \ |
| 859 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ | 871 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 993 | 1005 |
| 994 friend class Isolate; | 1006 friend class Isolate; |
| 995 | 1007 |
| 996 DISALLOW_COPY_AND_ASSIGN(Builtins); | 1008 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 997 }; | 1009 }; |
| 998 | 1010 |
| 999 } // namespace internal | 1011 } // namespace internal |
| 1000 } // namespace v8 | 1012 } // namespace v8 |
| 1001 | 1013 |
| 1002 #endif // V8_BUILTINS_BUILTINS_H_ | 1014 #endif // V8_BUILTINS_BUILTINS_H_ |
| OLD | NEW |