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

Unified Diff: src/factory.cc

Issue 2595893002: [runtime] Remove specific Descriptor subclasses and add respective factory methods instead. (Closed)
Patch Set: Created 4 years 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/bootstrapper.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index a1c3c6d6a1d1493a56beed7a0c719beb9a80bde6..f5d2a497ce75eed41d2829dc1846ff1273de9c40 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -2644,8 +2644,8 @@ void Factory::SetFunctionInstanceDescriptor(Handle<Map> map,
Handle<AccessorInfo> length =
Accessors::FunctionLengthInfo(isolate(), roc_attribs);
{ // Add length.
- AccessorConstantDescriptor d(Handle<Name>(Name::cast(length->name())),
- length, roc_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ Handle<Name>(Name::cast(length->name())), length, roc_attribs);
map->AppendDescriptor(&d);
}
@@ -2653,22 +2653,22 @@ void Factory::SetFunctionInstanceDescriptor(Handle<Map> map,
Handle<AccessorInfo> name =
Accessors::FunctionNameInfo(isolate(), ro_attribs);
{ // Add name.
- AccessorConstantDescriptor d(Handle<Name>(Name::cast(name->name())), name,
- roc_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ Handle<Name>(Name::cast(name->name())), name, roc_attribs);
map->AppendDescriptor(&d);
}
Handle<AccessorInfo> args =
Accessors::FunctionArgumentsInfo(isolate(), ro_attribs);
{ // Add arguments.
- AccessorConstantDescriptor d(Handle<Name>(Name::cast(args->name())), args,
- ro_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ Handle<Name>(Name::cast(args->name())), args, ro_attribs);
map->AppendDescriptor(&d);
}
Handle<AccessorInfo> caller =
Accessors::FunctionCallerInfo(isolate(), ro_attribs);
{ // Add caller.
- AccessorConstantDescriptor d(Handle<Name>(Name::cast(caller->name())),
- caller, ro_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ Handle<Name>(Name::cast(caller->name())), caller, ro_attribs);
map->AppendDescriptor(&d);
}
if (IsFunctionModeWithPrototype(function_mode)) {
@@ -2677,8 +2677,8 @@ void Factory::SetFunctionInstanceDescriptor(Handle<Map> map,
}
Handle<AccessorInfo> prototype =
Accessors::FunctionPrototypeInfo(isolate(), ro_attribs);
- AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
- prototype, ro_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ Handle<Name>(Name::cast(prototype->name())), prototype, ro_attribs);
map->AppendDescriptor(&d);
}
}
@@ -2712,8 +2712,8 @@ void Factory::SetStrictFunctionInstanceDescriptor(Handle<Map> map,
{ // Add length.
Handle<AccessorInfo> length =
Accessors::FunctionLengthInfo(isolate(), roc_attribs);
- AccessorConstantDescriptor d(handle(Name::cast(length->name())), length,
- roc_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ handle(Name::cast(length->name())), length, roc_attribs);
map->AppendDescriptor(&d);
}
@@ -2721,8 +2721,8 @@ void Factory::SetStrictFunctionInstanceDescriptor(Handle<Map> map,
{ // Add name.
Handle<AccessorInfo> name =
Accessors::FunctionNameInfo(isolate(), roc_attribs);
- AccessorConstantDescriptor d(handle(Name::cast(name->name())), name,
- roc_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ handle(Name::cast(name->name())), name, roc_attribs);
map->AppendDescriptor(&d);
}
if (IsFunctionModeWithPrototype(function_mode)) {
@@ -2732,8 +2732,8 @@ void Factory::SetStrictFunctionInstanceDescriptor(Handle<Map> map,
: ro_attribs;
Handle<AccessorInfo> prototype =
Accessors::FunctionPrototypeInfo(isolate(), attribs);
- AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
- prototype, attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ Handle<Name>(Name::cast(prototype->name())), prototype, attribs);
map->AppendDescriptor(&d);
}
}
@@ -2759,8 +2759,8 @@ void Factory::SetClassFunctionInstanceDescriptor(Handle<Map> map) {
{ // Add length.
Handle<AccessorInfo> length =
Accessors::FunctionLengthInfo(isolate(), roc_attribs);
- AccessorConstantDescriptor d(handle(Name::cast(length->name())), length,
- roc_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ handle(Name::cast(length->name())), length, roc_attribs);
map->AppendDescriptor(&d);
}
@@ -2768,8 +2768,8 @@ void Factory::SetClassFunctionInstanceDescriptor(Handle<Map> map) {
// Add prototype.
Handle<AccessorInfo> prototype =
Accessors::FunctionPrototypeInfo(isolate(), rw_attribs);
- AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
- prototype, rw_attribs);
+ Descriptor d = Descriptor::AccessorConstant(
+ Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs);
map->AppendDescriptor(&d);
}
}
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698