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

Unified Diff: src/lookup.h

Issue 1714753003: Don't internalize names that are array indexes since they aren't used for lookup (the index is) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/factory.cc ('k') | src/lookup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.h
diff --git a/src/lookup.h b/src/lookup.h
index fd27f506e0c289fa1607e6780bd35010a835e9e4..b800a57bcb2dd97d449827a7845094bdc08c9be0 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -127,27 +127,27 @@ class LookupIterator final BASE_EMBEDDED {
static LookupIterator PropertyOrElement(
Isolate* isolate, Handle<Object> receiver, Handle<Name> name,
Configuration configuration = DEFAULT) {
- name = isolate->factory()->InternalizeName(name);
uint32_t index;
- LookupIterator it =
- name->AsArrayIndex(&index)
- ? LookupIterator(isolate, receiver, index, configuration)
- : LookupIterator(receiver, name, configuration);
- it.name_ = name;
- return it;
+ if (name->AsArrayIndex(&index)) {
+ LookupIterator it =
+ LookupIterator(isolate, receiver, index, configuration);
+ it.name_ = name;
+ return it;
+ }
+ return LookupIterator(receiver, name, configuration);
}
static LookupIterator PropertyOrElement(
Isolate* isolate, Handle<Object> receiver, Handle<Name> name,
Handle<JSReceiver> holder, Configuration configuration = DEFAULT) {
- name = isolate->factory()->InternalizeName(name);
uint32_t index;
- LookupIterator it =
- name->AsArrayIndex(&index)
- ? LookupIterator(isolate, receiver, index, holder, configuration)
- : LookupIterator(receiver, name, holder, configuration);
- it.name_ = name;
- return it;
+ if (name->AsArrayIndex(&index)) {
+ LookupIterator it =
+ LookupIterator(isolate, receiver, index, holder, configuration);
+ it.name_ = name;
+ return it;
+ }
+ return LookupIterator(receiver, name, holder, configuration);
}
static LookupIterator PropertyOrElement(
« no previous file with comments | « src/factory.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698