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

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: Remove unused function 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
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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 environment()->Push(property->is_static() ? literal : proto); 895 environment()->Push(property->is_static() ? literal : proto);
896 896
897 VisitForValue(property->key()); 897 VisitForValue(property->key());
898 VisitForValue(property->value()); 898 VisitForValue(property->value());
899 Node* value = environment()->Pop(); 899 Node* value = environment()->Pop();
900 Node* key = environment()->Pop(); 900 Node* key = environment()->Pop();
901 Node* receiver = environment()->Pop(); 901 Node* receiver = environment()->Pop();
902 switch (property->kind()) { 902 switch (property->kind()) {
903 case ObjectLiteral::Property::CONSTANT: 903 case ObjectLiteral::Property::CONSTANT:
904 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 904 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
905 case ObjectLiteral::Property::PROTOTYPE:
905 UNREACHABLE(); 906 UNREACHABLE();
906 case ObjectLiteral::Property::COMPUTED: 907 case ObjectLiteral::Property::COMPUTED: {
907 case ObjectLiteral::Property::PROTOTYPE: {
908 const Operator* op = 908 const Operator* op =
909 javascript()->CallRuntime(Runtime::kDefineClassMethod, 3); 909 javascript()->CallRuntime(Runtime::kDefineClassMethod, 3);
910 NewNode(op, receiver, key, value); 910 NewNode(op, receiver, key, value);
911 break; 911 break;
912 } 912 }
913 case ObjectLiteral::Property::GETTER: { 913 case ObjectLiteral::Property::GETTER: {
914 const Operator* op = javascript()->CallRuntime( 914 const Operator* op = javascript()->CallRuntime(
915 Runtime::kDefineGetterPropertyUnchecked, 3); 915 Runtime::kDefineGetterPropertyUnchecked, 3);
916 NewNode(op, receiver, key, value); 916 NewNode(op, receiver, key, value);
917 break; 917 break;
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 2357
2358 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( 2358 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop(
2359 IterationStatement* stmt) { 2359 IterationStatement* stmt) {
2360 if (loop_assignment_analysis_ == NULL) return NULL; 2360 if (loop_assignment_analysis_ == NULL) return NULL;
2361 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); 2361 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt);
2362 } 2362 }
2363 2363
2364 } // namespace compiler 2364 } // namespace compiler
2365 } // namespace internal 2365 } // namespace internal
2366 } // namespace v8 2366 } // namespace v8
OLDNEW
« src/ast.cc ('K') | « 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