Merge V8 5.2.361.47  DO NOT MERGE

https://chromium.googlesource.com/v8/v8/+/5.2.361.47

FPIIM-449

Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/test/mjsunit/compiler/escape-analysis-1.js b/test/mjsunit/compiler/escape-analysis-1.js
index b8c6644..f05040b 100644
--- a/test/mjsunit/compiler/escape-analysis-1.js
+++ b/test/mjsunit/compiler/escape-analysis-1.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f(a) {
   "use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-10.js b/test/mjsunit/compiler/escape-analysis-10.js
index c53cf4d..4f06d57 100644
--- a/test/mjsunit/compiler/escape-analysis-10.js
+++ b/test/mjsunit/compiler/escape-analysis-10.js
@@ -26,6 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
+
 (function() {
   "use strict";
   function f() {
diff --git a/test/mjsunit/compiler/escape-analysis-2.js b/test/mjsunit/compiler/escape-analysis-2.js
index d116e9a..49f440e 100644
--- a/test/mjsunit/compiler/escape-analysis-2.js
+++ b/test/mjsunit/compiler/escape-analysis-2.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f(a) {
   "use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-3.js b/test/mjsunit/compiler/escape-analysis-3.js
index d1ebc9b..b92d1c3 100644
--- a/test/mjsunit/compiler/escape-analysis-3.js
+++ b/test/mjsunit/compiler/escape-analysis-3.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f(a) {
   "use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-4.js b/test/mjsunit/compiler/escape-analysis-4.js
index d9fdccc..ef9f95f 100644
--- a/test/mjsunit/compiler/escape-analysis-4.js
+++ b/test/mjsunit/compiler/escape-analysis-4.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f(a) {
   "use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-5.js b/test/mjsunit/compiler/escape-analysis-5.js
index cfaf81d..54b5e82 100644
--- a/test/mjsunit/compiler/escape-analysis-5.js
+++ b/test/mjsunit/compiler/escape-analysis-5.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f(h) {
   "use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-6.js b/test/mjsunit/compiler/escape-analysis-6.js
index 6143cfb..c36e7d9 100644
--- a/test/mjsunit/compiler/escape-analysis-6.js
+++ b/test/mjsunit/compiler/escape-analysis-6.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f(a) {
   "use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-7.js b/test/mjsunit/compiler/escape-analysis-7.js
index 16bc71c..cfa30cb 100644
--- a/test/mjsunit/compiler/escape-analysis-7.js
+++ b/test/mjsunit/compiler/escape-analysis-7.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f() {
   this.x=0;
diff --git a/test/mjsunit/compiler/escape-analysis-8.js b/test/mjsunit/compiler/escape-analysis-8.js
index bc5b1d9..d9c6d25 100644
--- a/test/mjsunit/compiler/escape-analysis-8.js
+++ b/test/mjsunit/compiler/escape-analysis-8.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f(a) {
   this.x=a;
diff --git a/test/mjsunit/compiler/escape-analysis-9.js b/test/mjsunit/compiler/escape-analysis-9.js
index a19786b..0b8f75c 100644
--- a/test/mjsunit/compiler/escape-analysis-9.js
+++ b/test/mjsunit/compiler/escape-analysis-9.js
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Flags: --allow-natives-syntax --turbo-escape
-//
 
 function f() {
   return arguments;
diff --git a/test/mjsunit/compiler/optimized-float32array-length.js b/test/mjsunit/compiler/optimized-float32array-length.js
new file mode 100644
index 0000000..eed8922
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-float32array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 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 a = new Float32Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/optimized-float64array-length.js b/test/mjsunit/compiler/optimized-float64array-length.js
new file mode 100644
index 0000000..f6a3d77
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-float64array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 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 a = new Float64Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/optimized-instanceof-1.js b/test/mjsunit/compiler/optimized-instanceof-1.js
new file mode 100644
index 0000000..538b0ef
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-instanceof-1.js
@@ -0,0 +1,17 @@
+// Copyright 2016 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 --harmony-instanceof
+
+function F() {}
+var f = new F
+
+var proto = Object.getPrototypeOf(F);
+Object.setPrototypeOf(F, null);
+F[Symbol.hasInstance] = function(v) { return true };
+Object.setPrototypeOf(F, proto);
+
+function foo(x) { return x instanceof F };
+%OptimizeFunctionOnNextCall(foo);
+assertTrue(foo(1));
diff --git a/test/mjsunit/compiler/optimized-instanceof-2.js b/test/mjsunit/compiler/optimized-instanceof-2.js
new file mode 100644
index 0000000..80bbdcd
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-instanceof-2.js
@@ -0,0 +1,19 @@
+// Copyright 2016 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 --harmony-instanceof
+
+function F() {}
+var f = new F
+
+function foo(x) { return x instanceof F };
+%OptimizeFunctionOnNextCall(foo);
+assertFalse(foo(1));
+
+var proto = Object.getPrototypeOf(F);
+Object.setPrototypeOf(F, null);
+F[Symbol.hasInstance] = function(v) { return true };
+Object.setPrototypeOf(F, proto);
+
+assertTrue(foo(1));
diff --git a/test/mjsunit/compiler/optimized-int32array-length.js b/test/mjsunit/compiler/optimized-int32array-length.js
new file mode 100644
index 0000000..250d523
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-int32array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 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 a = new Int32Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/optimized-uint32array-length.js b/test/mjsunit/compiler/optimized-uint32array-length.js
new file mode 100644
index 0000000..d389370
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-uint32array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 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 a = new Uint32Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/osr-alignment.js b/test/mjsunit/compiler/osr-alignment.js
index 085d6c4..f815e71 100644
--- a/test/mjsunit/compiler/osr-alignment.js
+++ b/test/mjsunit/compiler/osr-alignment.js
@@ -25,7 +25,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function f1() {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-backedges1.js b/test/mjsunit/compiler/osr-backedges1.js
index d415f4a..18a7e04 100644
--- a/test/mjsunit/compiler/osr-backedges1.js
+++ b/test/mjsunit/compiler/osr-backedges1.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function foo(a) {
   var i = a | 0;
diff --git a/test/mjsunit/compiler/osr-block-scope-func.js b/test/mjsunit/compiler/osr-block-scope-func.js
index df4076c..7c41f54 100644
--- a/test/mjsunit/compiler/osr-block-scope-func.js
+++ b/test/mjsunit/compiler/osr-block-scope-func.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 "use strict";
 
diff --git a/test/mjsunit/compiler/osr-block-scope-id.js b/test/mjsunit/compiler/osr-block-scope-id.js
index 923c72f..bcc7cdd 100644
--- a/test/mjsunit/compiler/osr-block-scope-id.js
+++ b/test/mjsunit/compiler/osr-block-scope-id.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 "use strict";
 
diff --git a/test/mjsunit/compiler/osr-block-scope.js b/test/mjsunit/compiler/osr-block-scope.js
index 0d78cdc..c60f8af 100644
--- a/test/mjsunit/compiler/osr-block-scope.js
+++ b/test/mjsunit/compiler/osr-block-scope.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 "use strict";
 
diff --git a/test/mjsunit/compiler/osr-follow.js b/test/mjsunit/compiler/osr-follow.js
index b6a2e8e..46581a8 100644
--- a/test/mjsunit/compiler/osr-follow.js
+++ b/test/mjsunit/compiler/osr-follow.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function foo(a) {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-for-let.js b/test/mjsunit/compiler/osr-for-let.js
index 4b2fa3e..b8cef78 100644
--- a/test/mjsunit/compiler/osr-for-let.js
+++ b/test/mjsunit/compiler/osr-for-let.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 "use strict";
 
diff --git a/test/mjsunit/compiler/osr-forin-nested.js b/test/mjsunit/compiler/osr-forin-nested.js
index ad55b30..dd81089 100644
--- a/test/mjsunit/compiler/osr-forin-nested.js
+++ b/test/mjsunit/compiler/osr-forin-nested.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --turbo-osr --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 function test(e, f, v) {
   assertEquals(e, f(v));
diff --git a/test/mjsunit/compiler/osr-forin.js b/test/mjsunit/compiler/osr-forin.js
index 8d16782..b45d200 100644
--- a/test/mjsunit/compiler/osr-forin.js
+++ b/test/mjsunit/compiler/osr-forin.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function f(a) {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-forof.js b/test/mjsunit/compiler/osr-forof.js
index 36bff09..ce7b24d 100644
--- a/test/mjsunit/compiler/osr-forof.js
+++ b/test/mjsunit/compiler/osr-forof.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function f(a) {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-function-id.js b/test/mjsunit/compiler/osr-function-id.js
index c506ae8..8761e85 100644
--- a/test/mjsunit/compiler/osr-function-id.js
+++ b/test/mjsunit/compiler/osr-function-id.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function id(f) { return f; }
 
diff --git a/test/mjsunit/compiler/osr-function-id2.js b/test/mjsunit/compiler/osr-function-id2.js
index 561c62e..e25ec31 100644
--- a/test/mjsunit/compiler/osr-function-id2.js
+++ b/test/mjsunit/compiler/osr-function-id2.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function id(f) { return f; }
 
diff --git a/test/mjsunit/compiler/osr-function.js b/test/mjsunit/compiler/osr-function.js
index 06d137b..cee7e9d 100644
--- a/test/mjsunit/compiler/osr-function.js
+++ b/test/mjsunit/compiler/osr-function.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function foo() {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-infinite.js b/test/mjsunit/compiler/osr-infinite.js
index aa74c87..9d0bb47 100644
--- a/test/mjsunit/compiler/osr-infinite.js
+++ b/test/mjsunit/compiler/osr-infinite.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --allow-natives-syntax --turbo-osr
+// Flags: --use-osr --allow-natives-syntax
 
 var global_counter = 0;
 
diff --git a/test/mjsunit/compiler/osr-labeled.js b/test/mjsunit/compiler/osr-labeled.js
index 1a97092..1384e9a 100644
--- a/test/mjsunit/compiler/osr-labeled.js
+++ b/test/mjsunit/compiler/osr-labeled.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function foo() {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-literals-adapted.js b/test/mjsunit/compiler/osr-literals-adapted.js
index 950d8b0..4d1798c 100644
--- a/test/mjsunit/compiler/osr-literals-adapted.js
+++ b/test/mjsunit/compiler/osr-literals-adapted.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function mod() {
   function f0() {
diff --git a/test/mjsunit/compiler/osr-literals.js b/test/mjsunit/compiler/osr-literals.js
index d9f68a0..f2051dc 100644
--- a/test/mjsunit/compiler/osr-literals.js
+++ b/test/mjsunit/compiler/osr-literals.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function mod() {
   function f0() {
diff --git a/test/mjsunit/compiler/osr-manual1.js b/test/mjsunit/compiler/osr-manual1.js
index 29a4948..c3db796 100644
--- a/test/mjsunit/compiler/osr-manual1.js
+++ b/test/mjsunit/compiler/osr-manual1.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 var counter = 111;
 
diff --git a/test/mjsunit/compiler/osr-manual2.js b/test/mjsunit/compiler/osr-manual2.js
index 8aa5d69..de7ec24 100644
--- a/test/mjsunit/compiler/osr-manual2.js
+++ b/test/mjsunit/compiler/osr-manual2.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 var counter = 188;
 
diff --git a/test/mjsunit/compiler/osr-multiple.js b/test/mjsunit/compiler/osr-multiple.js
index c318645..72fff85 100644
--- a/test/mjsunit/compiler/osr-multiple.js
+++ b/test/mjsunit/compiler/osr-multiple.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function f1(a,b,c) {
   var x = 0;
diff --git a/test/mjsunit/compiler/osr-multiple2.js b/test/mjsunit/compiler/osr-multiple2.js
index 9a81bfb..edb627a 100644
--- a/test/mjsunit/compiler/osr-multiple2.js
+++ b/test/mjsunit/compiler/osr-multiple2.js
@@ -3,7 +3,6 @@
 // found in the LICENSE file.
 
 // Flags: --use-osr
-// TODO(titzer): enable --turbo-osr when nested OSR works.
 
 function f1(a,b,c) {
   var x = 0;
diff --git a/test/mjsunit/compiler/osr-multiple3.js b/test/mjsunit/compiler/osr-multiple3.js
index 0fb1ac7..fa703ea 100644
--- a/test/mjsunit/compiler/osr-multiple3.js
+++ b/test/mjsunit/compiler/osr-multiple3.js
@@ -3,7 +3,6 @@
 // found in the LICENSE file.
 
 // Flags: --use-osr
-// TODO(titzer): enable --turbo-osr when nested OSR works.
 
 function f1(a,b,c) {
   var x = 0;
diff --git a/test/mjsunit/compiler/osr-nested2.js b/test/mjsunit/compiler/osr-nested2.js
index 41bd9b2..efe31f1 100644
--- a/test/mjsunit/compiler/osr-nested2.js
+++ b/test/mjsunit/compiler/osr-nested2.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function f() {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-nested2b.js b/test/mjsunit/compiler/osr-nested2b.js
index e64c10c..1808811 100644
--- a/test/mjsunit/compiler/osr-nested2b.js
+++ b/test/mjsunit/compiler/osr-nested2b.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function f() {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-nested3.js b/test/mjsunit/compiler/osr-nested3.js
index f5d09ba..d7c144b 100644
--- a/test/mjsunit/compiler/osr-nested3.js
+++ b/test/mjsunit/compiler/osr-nested3.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function f() {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-nested3b.js b/test/mjsunit/compiler/osr-nested3b.js
index 32ac2a7..a10d328 100644
--- a/test/mjsunit/compiler/osr-nested3b.js
+++ b/test/mjsunit/compiler/osr-nested3b.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function f() {
   var sum = 0;
diff --git a/test/mjsunit/compiler/osr-regex-id.js b/test/mjsunit/compiler/osr-regex-id.js
index 7831b14..e0b4dad 100644
--- a/test/mjsunit/compiler/osr-regex-id.js
+++ b/test/mjsunit/compiler/osr-regex-id.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function id(f) { return f; }
 
diff --git a/test/mjsunit/compiler/osr-sar.js b/test/mjsunit/compiler/osr-sar.js
index cc04adc..02684f0 100644
--- a/test/mjsunit/compiler/osr-sar.js
+++ b/test/mjsunit/compiler/osr-sar.js
@@ -25,7 +25,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 function test() {
   // Loop to force OSR.
diff --git a/test/mjsunit/compiler/osr-warm.js b/test/mjsunit/compiler/osr-warm.js
index 7c30c07..73e1fd5 100644
--- a/test/mjsunit/compiler/osr-warm.js
+++ b/test/mjsunit/compiler/osr-warm.js
@@ -25,7 +25,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
 
 function f1(x) {
   while (x > 0) {
diff --git a/test/mjsunit/compiler/osr-while-let.js b/test/mjsunit/compiler/osr-while-let.js
index c19cf6c..11ebc4b 100644
--- a/test/mjsunit/compiler/osr-while-let.js
+++ b/test/mjsunit/compiler/osr-while-let.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
 
 "use strict";
 
diff --git a/test/mjsunit/compiler/regress-607493.js b/test/mjsunit/compiler/regress-607493.js
new file mode 100644
index 0000000..540b47e
--- /dev/null
+++ b/test/mjsunit/compiler/regress-607493.js
@@ -0,0 +1,37 @@
+// Copyright 2016 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
+
+(function ForInTryCatchContrinueOsr() {
+  var a = [1];
+
+  function g() {
+    for (var x in a) {
+      try {
+        for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
+        return;
+      } catch(e) {
+        continue;
+      }
+    }
+  }
+
+  g();
+})();
+
+(function ForInContinueNestedOsr() {
+  var a = [1];
+
+  function g() {
+    for (var x in a) {
+      if (x) {
+        for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
+      }
+      continue;
+    }
+  }
+
+  g();
+})();
diff --git a/test/mjsunit/compiler/regress-621147.js b/test/mjsunit/compiler/regress-621147.js
new file mode 100644
index 0000000..0a5a221
--- /dev/null
+++ b/test/mjsunit/compiler/regress-621147.js
@@ -0,0 +1,29 @@
+// 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 --turbo-filter=test2
+
+function test(n) {
+  return Array(n);
+}
+
+function test2() {
+  return test(2);
+}
+
+function test3(a) {
+  a[0] = 1;
+}
+
+test(0);
+
+var smi_array = [1,2];
+smi_array[2] = 3;
+test3(smi_array);
+
+%OptimizeFunctionOnNextCall(test2);
+
+var broken_array = test2();
+test3(broken_array);
+1+broken_array[0];
diff --git a/test/mjsunit/compiler/try-osr.js b/test/mjsunit/compiler/try-osr.js
index e4eb8dd..c0ef27a 100644
--- a/test/mjsunit/compiler/try-osr.js
+++ b/test/mjsunit/compiler/try-osr.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --turbo-osr
+// Flags: --allow-natives-syntax
 
 function OSRInsideTry(x) {
   try {