Index: src/builtins/builtins.h |
diff --git a/src/builtins/builtins.h b/src/builtins/builtins.h |
index 10d6f21705b3c99e1f8e039d0cd5722d08192449..0be09e429ef1fd4d159837e230524986371436c7 100644 |
--- a/src/builtins/builtins.h |
+++ b/src/builtins/builtins.h |
@@ -569,13 +569,29 @@ class Builtins { |
#define DEF_ENUM(Name, ...) k##Name, |
BUILTIN_LIST_ALL(DEF_ENUM) |
#undef DEF_ENUM |
- builtin_count |
+ BUILTIN_COUNT |
}; |
#define DECLARE_BUILTIN_ACCESSOR(Name, ...) Handle<Code> Name(); |
BUILTIN_LIST_ALL(DECLARE_BUILTIN_ACCESSOR) |
#undef DECLARE_BUILTIN_ACCESSOR |
+ enum Kind { CPP, API, TFJ, TFS, ASM, ASH, DBG }; |
+ |
+ struct Descriptor { |
+ Name id; |
+ Kind kind; |
+ |
+ // For CPP and API functions, this is the C++ entry point. |
+ Address entry; |
+ |
+ // Note: These are always Code objects, but to conform with |
+ // IterateBuiltins(), we use an Object* here. |
+ Object* code; |
+ |
+ const char* debug_name; |
+ }; |
+ |
// Convenience wrappers. |
Handle<Code> CallFunction( |
ConvertReceiverMode = ConvertReceiverMode::kAny, |
@@ -593,11 +609,11 @@ class Builtins { |
Code* builtin(Name name) { |
// Code::cast cannot be used here since we access builtins |
// during the marking phase of mark sweep. See IC::Clear. |
- return reinterpret_cast<Code*>(builtins_[name]); |
+ return reinterpret_cast<Code*>(builtins_[name].code); |
} |
Address builtin_address(Name name) { |
- return reinterpret_cast<Address>(&builtins_[name]); |
+ return reinterpret_cast<Address>(&builtins_[name].code); |
} |
const char* name(int index); |
@@ -651,10 +667,7 @@ class Builtins { |
#undef DECLARE_ASM |
#undef DECLARE_TF |
- // Note: These are always Code objects, but to conform with |
- // IterateBuiltins() above which assumes Object**'s for the callback |
- // function f, we use an Object* array here. |
- Object* builtins_[builtin_count]; |
+ Descriptor builtins_[BUILTIN_COUNT]; |
bool initialized_; |
friend class Isolate; |