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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 880963002: Add missing FrameState to JSToName nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ported to other architectures. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/operator-properties.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 28378a59a5d2fa6372e2bc73e49dd8953dfd8f13..d37ca7eab2183fa1d97298f3ca764e680af9d2b1 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -899,7 +899,8 @@ void AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
environment()->Push(property->is_static() ? literal : proto);
VisitForValue(property->key());
- environment()->Push(BuildToName(environment()->Pop()));
+ environment()->Push(
+ BuildToName(environment()->Pop(), expr->GetIdForProperty(i)));
VisitForValue(property->value());
Node* value = environment()->Pop();
Node* key = environment()->Pop();
@@ -1131,7 +1132,8 @@ void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
environment()->Push(literal); // Duplicate receiver.
VisitForValue(property->key());
- environment()->Push(BuildToName(environment()->Pop()));
+ environment()->Push(BuildToName(environment()->Pop(),
+ expr->GetIdForProperty(property_index)));
// TODO(mstarzinger): For ObjectLiteral::Property::PROTOTYPE the key should
// not be on the operand stack while the value is being evaluated. Come up
// with a repro for this and fix it. Also find a nice way to do so. :)
@@ -2324,11 +2326,13 @@ Node* AstGraphBuilder::BuildToBoolean(Node* input) {
}
-Node* AstGraphBuilder::BuildToName(Node* input) {
+Node* AstGraphBuilder::BuildToName(Node* input, BailoutId bailout_id) {
// TODO(turbofan): Possible optimization is to NOP on name constants. But the
// same caveat as with BuildToBoolean applies, and it should be factored out
// into a JSOperatorReducer.
- return NewNode(javascript()->ToName(), input);
+ Node* name = NewNode(javascript()->ToName(), input);
+ PrepareFrameState(name, bailout_id);
+ return name;
}
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/operator-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698