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

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

Issue 2471523005: [turbofan] Disable usage of {maybe_assigned} variable flag. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | test/mjsunit/regress/regress-crbug-659915a.js » ('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 161a33a10d4ac8663c2e57e81b99a737b8468cfc..6cd47ec5dd1cf3db103b6138250767c9e74f7b2f 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -3359,7 +3359,11 @@ Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
case VariableLocation::CONTEXT: {
// Context variable (potentially up the context chain).
int depth = current_scope()->ContextChainLength(variable->scope());
- bool immutable = variable->maybe_assigned() == kNotAssigned;
+ // TODO(mstarzinger): The {maybe_assigned} flag computed during variable
+ // resolution is highly inaccurate and cannot be trusted. We are only
+ // taking this information into account when asm.js compilation is used.
+ bool immutable = variable->maybe_assigned() == kNotAssigned &&
+ info()->is_function_context_specializing();
const Operator* op =
javascript()->LoadContext(depth, variable->index(), immutable);
Node* value = NewNode(op, current_context());
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-659915a.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698