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

Unified Diff: test/mjsunit/compiler/optimized-uint32array-length.js

Issue 1970123002: [turbofan] Deoptimize on access to neutered typed arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « test/mjsunit/compiler/optimized-int32array-length.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/optimized-uint32array-length.js
diff --git a/test/mjsunit/call-intrinsic-type-error.js b/test/mjsunit/compiler/optimized-uint32array-length.js
similarity index 50%
copy from test/mjsunit/call-intrinsic-type-error.js
copy to test/mjsunit/compiler/optimized-uint32array-length.js
index 9d586977d924829f664a34c915440b5c8498dd63..d389370a4fcc3184cb9c41ae9bd9ad8ebe287831 100644
--- a/test/mjsunit/call-intrinsic-type-error.js
+++ b/test/mjsunit/compiler/optimized-uint32array-length.js
@@ -4,8 +4,10 @@
// Flags: --allow-natives-syntax
-try {
- %Call(1, 0);
-} catch (e) {
- assertTrue(e instanceof TypeError);
-}
+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);
« no previous file with comments | « test/mjsunit/compiler/optimized-int32array-length.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698