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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 798243004: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test on windows Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/builtins.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 // a later occurrence of the same key. For the marked expressions, no store 919 // a later occurrence of the same key. For the marked expressions, no store
920 // code is emitted. 920 // code is emitted.
921 expr->CalculateEmitStore(zone()); 921 expr->CalculateEmitStore(zone());
922 922
923 // Create nodes to store computed values into the literal. 923 // Create nodes to store computed values into the literal.
924 AccessorTable accessor_table(zone()); 924 AccessorTable accessor_table(zone());
925 for (int i = 0; i < expr->properties()->length(); i++) { 925 for (int i = 0; i < expr->properties()->length(); i++) {
926 ObjectLiteral::Property* property = expr->properties()->at(i); 926 ObjectLiteral::Property* property = expr->properties()->at(i);
927 if (property->IsCompileTimeValue()) continue; 927 if (property->IsCompileTimeValue()) continue;
928 928
929 Literal* key = property->key(); 929 Literal* key = property->key()->AsLiteral();
930 switch (property->kind()) { 930 switch (property->kind()) {
931 case ObjectLiteral::Property::CONSTANT: 931 case ObjectLiteral::Property::CONSTANT:
932 UNREACHABLE(); 932 UNREACHABLE();
933 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 933 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
934 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); 934 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value()));
935 // Fall through. 935 // Fall through.
936 case ObjectLiteral::Property::COMPUTED: { 936 case ObjectLiteral::Property::COMPUTED: {
937 // It is safe to use [[Put]] here because the boilerplate already 937 // It is safe to use [[Put]] here because the boilerplate already
938 // contains computed properties with an uninitialized value. 938 // contains computed properties with an uninitialized value.
939 if (key->value()->IsInternalizedString()) { 939 if (key->value()->IsInternalizedString()) {
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 2245
2246 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( 2246 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop(
2247 IterationStatement* stmt) { 2247 IterationStatement* stmt) {
2248 if (loop_assignment_analysis_ == NULL) return NULL; 2248 if (loop_assignment_analysis_ == NULL) return NULL;
2249 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); 2249 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt);
2250 } 2250 }
2251 2251
2252 } // namespace compiler 2252 } // namespace compiler
2253 } // namespace internal 2253 } // namespace internal
2254 } // namespace v8 2254 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698