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 |
52 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | 53 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ |
53 ASM(Abort) \ | 54 ASM(Abort) \ |
54 /* Code aging */ \ | 55 /* Code aging */ \ |
55 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ | 56 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ |
56 \ | 57 \ |
57 /* Declared first for dependency reasons */ \ | 58 /* Declared first for dependency reasons */ \ |
58 ASM(CompileLazy) \ | 59 ASM(CompileLazy) \ |
59 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion, 1) \ | 60 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion, 1) \ |
60 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject, 1) \ | 61 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject, 1) \ |
61 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty, 1) \ | 62 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty, 1) \ |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 TFS(RegExpReplace, BUILTIN, kNoExtraICState, RegExpReplace, 1) \ | 725 TFS(RegExpReplace, BUILTIN, kNoExtraICState, RegExpReplace, 1) \ |
725 TFJ(RegExpPrototypeReplace, 2) \ | 726 TFJ(RegExpPrototypeReplace, 2) \ |
726 \ | 727 \ |
727 TFS(RegExpSplit, BUILTIN, kNoExtraICState, RegExpSplit, 1) \ | 728 TFS(RegExpSplit, BUILTIN, kNoExtraICState, RegExpSplit, 1) \ |
728 TFJ(RegExpPrototypeSplit, 2) \ | 729 TFJ(RegExpPrototypeSplit, 2) \ |
729 \ | 730 \ |
730 /* SharedArrayBuffer */ \ | 731 /* SharedArrayBuffer */ \ |
731 CPP(SharedArrayBufferPrototypeGetByteLength) \ | 732 CPP(SharedArrayBufferPrototypeGetByteLength) \ |
732 TFJ(AtomicsLoad, 2) \ | 733 TFJ(AtomicsLoad, 2) \ |
733 TFJ(AtomicsStore, 3) \ | 734 TFJ(AtomicsStore, 3) \ |
| 735 TFJ(AtomicsExchange, 3) \ |
734 \ | 736 \ |
735 /* String */ \ | 737 /* String */ \ |
736 ASM(StringConstructor) \ | 738 ASM(StringConstructor) \ |
737 ASM(StringConstructor_ConstructStub) \ | 739 ASM(StringConstructor_ConstructStub) \ |
738 CPP(StringFromCodePoint) \ | 740 CPP(StringFromCodePoint) \ |
739 /* ES6 section 21.1.2.1 String.fromCharCode ( ...codeUnits ) */ \ | 741 /* ES6 section 21.1.2.1 String.fromCharCode ( ...codeUnits ) */ \ |
740 TFJ(StringFromCharCode, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ | 742 TFJ(StringFromCharCode, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ |
741 /* ES6 section 21.1.3.1 String.prototype.charAt ( pos ) */ \ | 743 /* ES6 section 21.1.3.1 String.prototype.charAt ( pos ) */ \ |
742 TFJ(StringPrototypeCharAt, 1) \ | 744 TFJ(StringPrototypeCharAt, 1) \ |
743 /* ES6 section 21.1.3.2 String.prototype.charCodeAt ( pos ) */ \ | 745 /* ES6 section 21.1.3.2 String.prototype.charCodeAt ( pos ) */ \ |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 | 996 |
995 friend class Isolate; | 997 friend class Isolate; |
996 | 998 |
997 DISALLOW_COPY_AND_ASSIGN(Builtins); | 999 DISALLOW_COPY_AND_ASSIGN(Builtins); |
998 }; | 1000 }; |
999 | 1001 |
1000 } // namespace internal | 1002 } // namespace internal |
1001 } // namespace v8 | 1003 } // namespace v8 |
1002 | 1004 |
1003 #endif // V8_BUILTINS_BUILTINS_H_ | 1005 #endif // V8_BUILTINS_BUILTINS_H_ |
OLD | NEW |