| 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/handles.h" | 9 #include "src/handles.h" |
| 10 | 10 |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 Code* builtin(Name name) { | 593 Code* builtin(Name name) { |
| 594 // Code::cast cannot be used here since we access builtins | 594 // Code::cast cannot be used here since we access builtins |
| 595 // during the marking phase of mark sweep. See IC::Clear. | 595 // during the marking phase of mark sweep. See IC::Clear. |
| 596 return reinterpret_cast<Code*>(builtins_[name]); | 596 return reinterpret_cast<Code*>(builtins_[name]); |
| 597 } | 597 } |
| 598 | 598 |
| 599 Address builtin_address(Name name) { | 599 Address builtin_address(Name name) { |
| 600 return reinterpret_cast<Address>(&builtins_[name]); | 600 return reinterpret_cast<Address>(&builtins_[name]); |
| 601 } | 601 } |
| 602 | 602 |
| 603 const char* name(int index); | 603 static const char* name(int index); |
| 604 |
| 605 // Returns the C++ entry point for builtins implemented in C++, and the null |
| 606 // Address otherwise. |
| 607 static Address CppEntryOf(int index); |
| 608 |
| 609 static bool IsCpp(int index); |
| 610 static bool IsApi(int index); |
| 611 static bool HasCppImplementation(int index); |
| 604 | 612 |
| 605 bool is_initialized() const { return initialized_; } | 613 bool is_initialized() const { return initialized_; } |
| 606 | 614 |
| 607 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( | 615 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( |
| 608 Isolate* isolate, bool is_construct, Handle<HeapObject> function, | 616 Isolate* isolate, bool is_construct, Handle<HeapObject> function, |
| 609 Handle<Object> receiver, int argc, Handle<Object> args[], | 617 Handle<Object> receiver, int argc, Handle<Object> args[], |
| 610 Handle<HeapObject> new_target); | 618 Handle<HeapObject> new_target); |
| 611 | 619 |
| 612 enum ExitFrameType { EXIT, BUILTIN_EXIT }; | 620 enum ExitFrameType { EXIT, BUILTIN_EXIT }; |
| 613 | 621 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 | 667 |
| 660 friend class Isolate; | 668 friend class Isolate; |
| 661 | 669 |
| 662 DISALLOW_COPY_AND_ASSIGN(Builtins); | 670 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 663 }; | 671 }; |
| 664 | 672 |
| 665 } // namespace internal | 673 } // namespace internal |
| 666 } // namespace v8 | 674 } // namespace v8 |
| 667 | 675 |
| 668 #endif // V8_BUILTINS_BUILTINS_H_ | 676 #endif // V8_BUILTINS_BUILTINS_H_ |
| OLD | NEW |