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

Unified Diff: src/hydrogen.cc

Issue 811593004: Revert of ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 9f4075eb470cbc5bd2010fc959c8cb6da9d541d2..987d60b334115809200ccec79c35c489da3ffaa6 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5552,13 +5552,6 @@
DCHECK(!HasStackOverflow());
DCHECK(current_block() != NULL);
DCHECK(current_block()->HasPredecessor());
-
- for (int i = 0; i < expr->properties()->length(); i++) {
- if (expr->properties()->at(i)->is_computed_name()) {
- return Bailout(kComputedPropertyName);
- }
- }
-
expr->BuildConstantProperties(isolate());
Handle<JSFunction> closure = function_state()->compilation_info()->closure();
HInstruction* literal;
@@ -5614,10 +5607,9 @@
for (int i = 0; i < expr->properties()->length(); i++) {
ObjectLiteral::Property* property = expr->properties()->at(i);
- DCHECK(!property->is_computed_name());
if (property->IsCompileTimeValue()) continue;
- Literal* key = property->key()->AsLiteral();
+ Literal* key = property->key();
Expression* value = property->value();
switch (property->kind()) {
@@ -5643,7 +5635,7 @@
}
Handle<Map> map = property->GetReceiverType();
- Handle<String> name = key->AsPropertyName();
+ Handle<String> name = property->key()->AsPropertyName();
HInstruction* store;
if (map.is_null()) {
// If we don't know the monomorphic type, do a generic store.
« no previous file with comments | « src/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698