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

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

Issue 1011123002: [turbofan] Follow-up to evaluation order in AstGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-cr-467531
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 // during evaluation of the method values. 1401 // during evaluation of the method values.
1402 environment()->Push(literal); 1402 environment()->Push(literal);
1403 environment()->Push(proto); 1403 environment()->Push(proto);
1404 1404
1405 // Create nodes to store method values into the literal. 1405 // Create nodes to store method values into the literal.
1406 for (int i = 0; i < expr->properties()->length(); i++) { 1406 for (int i = 0; i < expr->properties()->length(); i++) {
1407 ObjectLiteral::Property* property = expr->properties()->at(i); 1407 ObjectLiteral::Property* property = expr->properties()->at(i);
1408 environment()->Push(property->is_static() ? literal : proto); 1408 environment()->Push(property->is_static() ? literal : proto);
1409 1409
1410 VisitForValue(property->key()); 1410 VisitForValue(property->key());
1411 environment()->Push( 1411 Node* name = BuildToName(environment()->Pop(), expr->GetIdForProperty(i));
1412 BuildToName(environment()->Pop(), expr->GetIdForProperty(i))); 1412 environment()->Push(name);
1413 1413
1414 // The static prototype property is read only. We handle the non computed 1414 // The static prototype property is read only. We handle the non computed
1415 // property name case in the parser. Since this is the only case where we 1415 // property name case in the parser. Since this is the only case where we
1416 // need to check for an own read only property we special case this so we do 1416 // need to check for an own read only property we special case this so we do
1417 // not need to do this for every property. 1417 // not need to do this for every property.
1418 if (property->is_static() && property->is_computed_name()) { 1418 if (property->is_static() && property->is_computed_name()) {
1419 Node* name = environment()->Pop(); 1419 Node* check = BuildThrowIfStaticPrototype(environment()->Pop(),
1420 environment()->Push( 1420 expr->GetIdForProperty(i));
1421 BuildThrowIfStaticPrototype(name, expr->GetIdForProperty(i))); 1421 environment()->Push(check);
1422 } 1422 }
1423 1423
1424 VisitForValue(property->value()); 1424 VisitForValue(property->value());
1425 Node* value = environment()->Pop(); 1425 Node* value = environment()->Pop();
1426 Node* key = environment()->Pop(); 1426 Node* key = environment()->Pop();
1427 Node* receiver = environment()->Pop(); 1427 Node* receiver = environment()->Pop();
1428 BuildSetHomeObject(value, receiver, property->value()); 1428 BuildSetHomeObject(value, receiver, property->value());
1429 1429
1430 switch (property->kind()) { 1430 switch (property->kind()) {
1431 case ObjectLiteral::Property::CONSTANT: 1431 case ObjectLiteral::Property::CONSTANT:
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
3353 // Phi does not exist yet, introduce one. 3353 // Phi does not exist yet, introduce one.
3354 value = NewPhi(inputs, value, control); 3354 value = NewPhi(inputs, value, control);
3355 value->ReplaceInput(inputs - 1, other); 3355 value->ReplaceInput(inputs - 1, other);
3356 } 3356 }
3357 return value; 3357 return value;
3358 } 3358 }
3359 3359
3360 } // namespace compiler 3360 } // namespace compiler
3361 } // namespace internal 3361 } // namespace internal
3362 } // namespace v8 3362 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698