Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: src/bootstrapper.cc

Issue 254783003: Convert function.name to API-style accessor and make CallApiGetterStub serializable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/assembler.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index f99c852eaf0a23ff24ad698694c60603cb4d0a02..44028c6910587b50c85ae67805c83e7ebb900c6c 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -388,7 +388,6 @@ void Genesis::SetFunctionInstanceDescriptor(
int size = (prototypeMode == DONT_ADD_PROTOTYPE) ? 4 : 5;
Map::EnsureDescriptorSlack(map, size);
- Handle<Foreign> name(factory()->NewForeign(&Accessors::FunctionName));
Handle<Foreign> args(factory()->NewForeign(&Accessors::FunctionArguments));
Handle<Foreign> caller(factory()->NewForeign(&Accessors::FunctionCaller));
PropertyAttributes attribs = static_cast<PropertyAttributes>(
@@ -401,8 +400,11 @@ void Genesis::SetFunctionInstanceDescriptor(
length, attribs);
map->AppendDescriptor(&d);
}
+ Handle<AccessorInfo> name =
+ Accessors::FunctionNameInfo(isolate(), attribs);
{ // Add name.
- CallbacksDescriptor d(factory()->name_string(), name, attribs);
+ CallbacksDescriptor d(Handle<Name>(Name::cast(name->name())),
+ name, attribs);
map->AppendDescriptor(&d);
}
{ // Add arguments.
@@ -519,7 +521,6 @@ void Genesis::SetStrictFunctionInstanceDescriptor(
int size = (prototypeMode == DONT_ADD_PROTOTYPE) ? 4 : 5;
Map::EnsureDescriptorSlack(map, size);
- Handle<Foreign> name(factory()->NewForeign(&Accessors::FunctionName));
Handle<AccessorPair> arguments(factory()->NewAccessorPair());
Handle<AccessorPair> caller(factory()->NewAccessorPair());
PropertyAttributes rw_attribs =
@@ -534,8 +535,11 @@ void Genesis::SetStrictFunctionInstanceDescriptor(
length, ro_attribs);
map->AppendDescriptor(&d);
}
+ Handle<AccessorInfo> name =
+ Accessors::FunctionNameInfo(isolate(), ro_attribs);
{ // Add name.
- CallbacksDescriptor d(factory()->name_string(), name, ro_attribs);
+ CallbacksDescriptor d(Handle<Name>(Name::cast(name->name())),
+ name, ro_attribs);
map->AppendDescriptor(&d);
}
{ // Add arguments.
« no previous file with comments | « src/assembler.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698