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

Unified Diff: src/bootstrapper.cc

Issue 1221713003: Distinguish slow from fast sloppy arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.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 867a0da57225e5b28fd51cee14ffcfcb66df48a2..493421fdc8ee29b587c07182d8f94fa14e382759 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1357,12 +1357,17 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
DCHECK(IsFastObjectElementsKind(map->elements_kind()));
}
- { // --- aliased arguments map
- Handle<Map> map =
- Map::Copy(isolate->sloppy_arguments_map(), "AliasedArguments");
- map->set_elements_kind(SLOPPY_ARGUMENTS_ELEMENTS);
+ { // --- fast and slow aliased arguments map
+ Handle<Map> map = isolate->sloppy_arguments_map();
+ map = Map::Copy(map, "FastAliasedArguments");
+ map->set_elements_kind(FAST_SLOPPY_ARGUMENTS_ELEMENTS);
+ DCHECK_EQ(2, map->pre_allocated_property_fields());
+ native_context()->set_fast_aliased_arguments_map(*map);
+
+ map = Map::Copy(map, "SlowAliasedArguments");
+ map->set_elements_kind(SLOW_SLOPPY_ARGUMENTS_ELEMENTS);
DCHECK_EQ(2, map->pre_allocated_property_fields());
- native_context()->set_aliased_arguments_map(*map);
+ native_context()->set_slow_aliased_arguments_map(*map);
}
{ // --- strict mode arguments map
@@ -2440,7 +2445,14 @@ bool Genesis::InstallNatives() {
{
AccessorConstantDescriptor d(factory()->iterator_symbol(),
arguments_iterator, attribs);
- Handle<Map> map(native_context()->aliased_arguments_map());
+ Handle<Map> map(native_context()->fast_aliased_arguments_map());
+ Map::EnsureDescriptorSlack(map, 1);
+ map->AppendDescriptor(&d);
+ }
+ {
+ AccessorConstantDescriptor d(factory()->iterator_symbol(),
+ arguments_iterator, attribs);
+ Handle<Map> map(native_context()->slow_aliased_arguments_map());
Map::EnsureDescriptorSlack(map, 1);
map->AppendDescriptor(&d);
}
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698