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