Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: src/builtins/builtins.h

Issue 2803853005: Inline Array.prototype.forEach in TurboFan (Closed)
Patch Set: fix v8heapconst.py Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/builtins/builtins-definitions.h" 9 #include "src/builtins/builtins-definitions.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
11 #include "src/utils.h"
Michael Starzinger 2017/05/24 13:54:59 nit: Assuming this is only needed for BailoutId, w
danno 2017/06/06 12:04:51 Done.
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 class Callable; 16 class Callable;
16 template <typename T> 17 template <typename T>
17 class Handle; 18 class Handle;
18 class Isolate; 19 class Isolate;
19 20
20 // Forward declarations. 21 // Forward declarations.
(...skipping 15 matching lines...) Expand all
36 // Disassembler support. 37 // Disassembler support.
37 const char* Lookup(byte* pc); 38 const char* Lookup(byte* pc);
38 39
39 enum Name : int32_t { 40 enum Name : int32_t {
40 #define DEF_ENUM(Name, ...) k##Name, 41 #define DEF_ENUM(Name, ...) k##Name,
41 BUILTIN_LIST_ALL(DEF_ENUM) 42 BUILTIN_LIST_ALL(DEF_ENUM)
42 #undef DEF_ENUM 43 #undef DEF_ENUM
43 builtin_count 44 builtin_count
44 }; 45 };
45 46
47 static BailoutId GetContinuationBailoutId(Name name);
48 static Name GetBuiltinFromBailoutId(BailoutId);
49
46 #define DECLARE_BUILTIN_ACCESSOR(Name, ...) \ 50 #define DECLARE_BUILTIN_ACCESSOR(Name, ...) \
47 V8_EXPORT_PRIVATE Handle<Code> Name(); 51 V8_EXPORT_PRIVATE Handle<Code> Name();
48 BUILTIN_LIST_ALL(DECLARE_BUILTIN_ACCESSOR) 52 BUILTIN_LIST_ALL(DECLARE_BUILTIN_ACCESSOR)
49 #undef DECLARE_BUILTIN_ACCESSOR 53 #undef DECLARE_BUILTIN_ACCESSOR
50 54
51 // Convenience wrappers. 55 // Convenience wrappers.
52 Handle<Code> CallFunction( 56 Handle<Code> CallFunction(
53 ConvertReceiverMode = ConvertReceiverMode::kAny, 57 ConvertReceiverMode = ConvertReceiverMode::kAny,
54 TailCallMode tail_call_mode = TailCallMode::kDisallow); 58 TailCallMode tail_call_mode = TailCallMode::kDisallow);
55 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, 59 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny,
(...skipping 17 matching lines...) Expand all
73 } 77 }
74 78
75 Address builtin_address(Name name) { 79 Address builtin_address(Name name) {
76 return reinterpret_cast<Address>(&builtins_[name]); 80 return reinterpret_cast<Address>(&builtins_[name]);
77 } 81 }
78 82
79 static int GetBuiltinParameterCount(Name name); 83 static int GetBuiltinParameterCount(Name name);
80 84
81 static Callable CallableFor(Isolate* isolate, Name name); 85 static Callable CallableFor(Isolate* isolate, Name name);
82 86
87 static int GetStackParameterCount(Isolate* isolate, Name name);
88
83 static const char* name(int index); 89 static const char* name(int index);
84 90
85 // Returns the C++ entry point for builtins implemented in C++, and the null 91 // Returns the C++ entry point for builtins implemented in C++, and the null
86 // Address otherwise. 92 // Address otherwise.
87 static Address CppEntryOf(int index); 93 static Address CppEntryOf(int index);
88 94
89 static bool IsCpp(int index); 95 static bool IsCpp(int index);
90 static bool IsApi(int index); 96 static bool IsApi(int index);
91 static bool HasCppImplementation(int index); 97 static bool HasCppImplementation(int index);
92 98
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 friend class Isolate; 159 friend class Isolate;
154 friend class SetupIsolateDelegate; 160 friend class SetupIsolateDelegate;
155 161
156 DISALLOW_COPY_AND_ASSIGN(Builtins); 162 DISALLOW_COPY_AND_ASSIGN(Builtins);
157 }; 163 };
158 164
159 } // namespace internal 165 } // namespace internal
160 } // namespace v8 166 } // namespace v8
161 167
162 #endif // V8_BUILTINS_BUILTINS_H_ 168 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698