Reviewers: Søren Gjesse, Kevin Millikin,

Description:
Fix treatment of const variables in assigned variable analysis.

Const variables are not considered as trivial sub-expressions since
we have the check for the hole value as a side-effect.


Please review this at http://codereview.chromium.org/849003

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/data-flow.cc


Index: src/data-flow.cc
===================================================================
--- src/data-flow.cc    (revision 4101)
+++ src/data-flow.cc    (working copy)
@@ -1125,6 +1125,7 @@
   if (var != NULL &&
       var->IsStackAllocated() &&
       !var->is_arguments() &&
+      var->mode() != Variable::CONST &&
       (var->is_this() || !av_.Contains(BitIndex(var)))) {
     expr->AsVariableProxy()->set_is_trivial(true);
   }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to