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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 const char* name(int index) { | 269 const char* name(int index) { |
270 DCHECK(index >= 0); | 270 DCHECK(index >= 0); |
271 DCHECK(index < builtin_count); | 271 DCHECK(index < builtin_count); |
272 return names_[index]; | 272 return names_[index]; |
273 } | 273 } |
274 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } | 274 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } |
275 static int NumberOfJavaScriptBuiltins() { return id_count; } | 275 static int NumberOfJavaScriptBuiltins() { return id_count; } |
276 | 276 |
277 bool is_initialized() const { return initialized_; } | 277 bool is_initialized() const { return initialized_; } |
278 | 278 |
| 279 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( |
| 280 Handle<JSFunction> function, Handle<Object> receiver, int argc, |
| 281 Handle<Object> args[]); |
| 282 |
279 private: | 283 private: |
280 Builtins(); | 284 Builtins(); |
281 | 285 |
282 // The external C++ functions called from the code. | 286 // The external C++ functions called from the code. |
283 static Address const c_functions_[cfunction_count]; | 287 static Address const c_functions_[cfunction_count]; |
284 | 288 |
285 // Note: These are always Code objects, but to conform with | 289 // Note: These are always Code objects, but to conform with |
286 // IterateBuiltins() above which assumes Object**'s for the callback | 290 // IterateBuiltins() above which assumes Object**'s for the callback |
287 // function f, we use an Object* array here. | 291 // function f, we use an Object* array here. |
288 Object* builtins_[builtin_count]; | 292 Object* builtins_[builtin_count]; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 341 |
338 friend class BuiltinFunctionTable; | 342 friend class BuiltinFunctionTable; |
339 friend class Isolate; | 343 friend class Isolate; |
340 | 344 |
341 DISALLOW_COPY_AND_ASSIGN(Builtins); | 345 DISALLOW_COPY_AND_ASSIGN(Builtins); |
342 }; | 346 }; |
343 | 347 |
344 } } // namespace v8::internal | 348 } } // namespace v8::internal |
345 | 349 |
346 #endif // V8_BUILTINS_H_ | 350 #endif // V8_BUILTINS_H_ |
OLD | NEW |