| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 DCHECK(index < builtin_count); | 276 DCHECK(index < builtin_count); |
| 277 return names_[index]; | 277 return names_[index]; |
| 278 } | 278 } |
| 279 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } | 279 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } |
| 280 static int NumberOfJavaScriptBuiltins() { return id_count; } | 280 static int NumberOfJavaScriptBuiltins() { return id_count; } |
| 281 | 281 |
| 282 bool is_initialized() const { return initialized_; } | 282 bool is_initialized() const { return initialized_; } |
| 283 | 283 |
| 284 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( | 284 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( |
| 285 Handle<JSFunction> function, Handle<Object> receiver, int argc, | 285 Handle<JSFunction> function, Handle<Object> receiver, int argc, |
| 286 Handle<Object> args[]); | 286 Handle<Object> args[], bool is_construct); |
| 287 | 287 |
| 288 private: | 288 private: |
| 289 Builtins(); | 289 Builtins(); |
| 290 | 290 |
| 291 // The external C++ functions called from the code. | 291 // The external C++ functions called from the code. |
| 292 static Address const c_functions_[cfunction_count]; | 292 static Address const c_functions_[cfunction_count]; |
| 293 | 293 |
| 294 // Note: These are always Code objects, but to conform with | 294 // Note: These are always Code objects, but to conform with |
| 295 // IterateBuiltins() above which assumes Object**'s for the callback | 295 // IterateBuiltins() above which assumes Object**'s for the callback |
| 296 // function f, we use an Object* array here. | 296 // function f, we use an Object* array here. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 friend class BuiltinFunctionTable; | 350 friend class BuiltinFunctionTable; |
| 351 friend class Isolate; | 351 friend class Isolate; |
| 352 | 352 |
| 353 DISALLOW_COPY_AND_ASSIGN(Builtins); | 353 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 354 }; | 354 }; |
| 355 | 355 |
| 356 } } // namespace v8::internal | 356 } } // namespace v8::internal |
| 357 | 357 |
| 358 #endif // V8_BUILTINS_H_ | 358 #endif // V8_BUILTINS_H_ |
| OLD | NEW |