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

Unified Diff: src/bootstrapper.cc

Issue 12330012: ES6 symbols: Allow symbols as property names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platform ports Created 7 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/arm/stub-cache-arm.cc ('k') | src/code-stubs.h » ('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 1824d220039c68b754045a235c34e5a5a9974715..71cfe4957c2af33a70e1e7e765202f769a25b9f1 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2239,7 +2239,7 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
switch (details.type()) {
case FIELD: {
HandleScope inner;
- Handle<String> key = Handle<String>(descs->GetKey(i));
+ Handle<Name> key = Handle<Name>(descs->GetKey(i));
int index = descs->GetFieldIndex(i);
Handle<Object> value = Handle<Object>(from->FastPropertyAt(index));
CHECK_NOT_EMPTY_HANDLE(to->GetIsolate(),
@@ -2249,7 +2249,7 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
}
case CONSTANT_FUNCTION: {
HandleScope inner;
- Handle<String> key = Handle<String>(descs->GetKey(i));
+ Handle<Name> key = Handle<Name>(descs->GetKey(i));
Handle<JSFunction> fun =
Handle<JSFunction>(descs->GetConstantFunction(i));
CHECK_NOT_EMPTY_HANDLE(to->GetIsolate(),
@@ -2265,7 +2265,7 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
HandleScope inner;
ASSERT(!to->HasFastProperties());
// Add to dictionary.
- Handle<String> key = Handle<String>(descs->GetKey(i));
+ Handle<Name> key = Handle<Name>(descs->GetKey(i));
Handle<Object> callbacks(descs->GetCallbacksObject(i));
PropertyDetails d = PropertyDetails(details.attributes(),
CALLBACKS,
@@ -2285,19 +2285,19 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
}
}
} else {
- Handle<StringDictionary> properties =
- Handle<StringDictionary>(from->property_dictionary());
+ Handle<NameDictionary> properties =
+ Handle<NameDictionary>(from->property_dictionary());
int capacity = properties->Capacity();
for (int i = 0; i < capacity; i++) {
Object* raw_key(properties->KeyAt(i));
if (properties->IsKey(raw_key)) {
- ASSERT(raw_key->IsString());
+ ASSERT(raw_key->IsName());
// If the property is already there we skip it.
LookupResult result(isolate());
- to->LocalLookup(String::cast(raw_key), &result);
+ to->LocalLookup(Name::cast(raw_key), &result);
if (result.IsFound()) continue;
// Set the property.
- Handle<String> key = Handle<String>(String::cast(raw_key));
+ Handle<Name> key = Handle<Name>(Name::cast(raw_key));
Handle<Object> value = Handle<Object>(properties->ValueAt(i));
if (value->IsJSGlobalPropertyCell()) {
value = Handle<Object>(JSGlobalPropertyCell::cast(*value)->value());
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698