Revision: 20461
Author:   [email protected]
Date:     Thu Apr  3 07:35:13 2014 UTC
Log:      Do not generate LDummyUse instruction for HCapturedObject

LDummyUse confuses the register allocator (since there is no definition
for the use).

[email protected]
BUG=

Review URL: https://codereview.chromium.org/222283002
http://code.google.com/p/v8/source/detail?r=20461

Added:
/branches/bleeding_edge/test/mjsunit/regress/regress-captured-object-no-dummy-use.js
Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc

=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-captured-object-no-dummy-use.js Thu Apr 3 07:35:13 2014 UTC
@@ -0,0 +1,18 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --allow-natives-syntax
+
+var global = "10.1";
+function f() { }
+function g(a) { this.d = a; }
+function h() {
+  var x = new f();
+  global.dummy = this;
+  var y = new g(x);
+}
+h();
+h();
+%OptimizeFunctionOnNextCall(h);
+h();
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Tue Apr 1 10:32:25 2014 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Apr 3 07:35:13 2014 UTC
@@ -509,6 +509,7 @@
       !(block()->IsReachable() ||
         IsBlockEntry() ||
         IsControlInstruction() ||
+        IsCapturedObject() ||
         IsSimulate() ||
         IsEnterInlined() ||
         IsLeaveInlined());

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to