Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 4604872aaf581fcf02fea1862a09b1f86ebe8254..72f9d577e039798df4ee8215471d1b8e3678f43a 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -1576,7 +1576,7 @@ void Builtins::InitBuiltinFunctionTable() { |
functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
functions->c_code = NULL; \ |
functions->s_name = #aname; \ |
- functions->name = aname; \ |
+ functions->name = k##aname; \ |
functions->flags = Code::ComputeFlags(Code::kind, \ |
NOT_IN_LOOP, \ |
state, \ |
@@ -1685,4 +1685,23 @@ const char* Builtins::Lookup(byte* pc) { |
} |
+#define DEFINE_BUILTIN_ACCESSOR_C(name, ignore) \ |
+Handle<Code> Builtins::name() { \ |
+ Code** code_address = \ |
+ reinterpret_cast<Code**>(builtin_address(k##name)); \ |
+ return Handle<Code>(code_address); \ |
+} |
+#define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \ |
+Handle<Code> Builtins::name() { \ |
+ Code** code_address = \ |
+ reinterpret_cast<Code**>(builtin_address(k##name)); \ |
+ return Handle<Code>(code_address); \ |
+} |
+BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
+BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
+BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
+#undef DEFINE_BUILTIN_ACCESSOR_C |
+#undef DEFINE_BUILTIN_ACCESSOR_A |
+ |
+ |
} } // namespace v8::internal |