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

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

Issue 858673002: Fix issue with __proto__ when using ES6 object literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase 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/ast.cc ('k') | src/ia32/full-codegen-ia32.cc » ('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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 898
899 VisitForValue(property->key()); 899 VisitForValue(property->key());
900 environment()->Push(BuildToName(environment()->Pop())); 900 environment()->Push(BuildToName(environment()->Pop()));
901 VisitForValue(property->value()); 901 VisitForValue(property->value());
902 Node* value = environment()->Pop(); 902 Node* value = environment()->Pop();
903 Node* key = environment()->Pop(); 903 Node* key = environment()->Pop();
904 Node* receiver = environment()->Pop(); 904 Node* receiver = environment()->Pop();
905 switch (property->kind()) { 905 switch (property->kind()) {
906 case ObjectLiteral::Property::CONSTANT: 906 case ObjectLiteral::Property::CONSTANT:
907 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 907 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
908 case ObjectLiteral::Property::PROTOTYPE:
908 UNREACHABLE(); 909 UNREACHABLE();
909 case ObjectLiteral::Property::COMPUTED: 910 case ObjectLiteral::Property::COMPUTED: {
910 case ObjectLiteral::Property::PROTOTYPE: {
911 const Operator* op = 911 const Operator* op =
912 javascript()->CallRuntime(Runtime::kDefineClassMethod, 3); 912 javascript()->CallRuntime(Runtime::kDefineClassMethod, 3);
913 NewNode(op, receiver, key, value); 913 NewNode(op, receiver, key, value);
914 break; 914 break;
915 } 915 }
916 case ObjectLiteral::Property::GETTER: { 916 case ObjectLiteral::Property::GETTER: {
917 const Operator* op = javascript()->CallRuntime( 917 const Operator* op = javascript()->CallRuntime(
918 Runtime::kDefineGetterPropertyUnchecked, 3); 918 Runtime::kDefineGetterPropertyUnchecked, 3);
919 NewNode(op, receiver, key, value); 919 NewNode(op, receiver, key, value);
920 break; 920 break;
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 2367
2368 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( 2368 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop(
2369 IterationStatement* stmt) { 2369 IterationStatement* stmt) {
2370 if (loop_assignment_analysis_ == NULL) return NULL; 2370 if (loop_assignment_analysis_ == NULL) return NULL;
2371 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); 2371 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt);
2372 } 2372 }
2373 2373
2374 } // namespace compiler 2374 } // namespace compiler
2375 } // namespace internal 2375 } // namespace internal
2376 } // namespace v8 2376 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698