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

Unified Diff: test/mjsunit/wasm/asm-wasm.js

Issue 1838973002: optimized switch implementation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/mjsunit.status ('k') | test/mjsunit/wasm/asm-wasm-switch.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/asm-wasm.js
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js
index 2efb006436a23333c7bf5bb48d92a46022a7d2d5..6a03ce5d6a09923b13413a369fa804ba42f881bd 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -769,82 +769,6 @@ function TestConditional() {
assertWasm(41, TestConditional);
-function TestSwitch() {
- "use asm"
-
- function caller() {
- var ret = 0;
- var x = 7;
- switch (x) {
- case 1: return 0;
- case 7: {
- ret = 12;
- break;
- }
- default: return 0;
- }
- switch (x) {
- case 1: return 0;
- case 8: return 0;
- default: ret = (ret + 11)|0;
- }
- return ret|0;
- }
-
- return {caller:caller};
-}
-
-assertWasm(23, TestSwitch);
-
-
-function TestSwitchFallthrough() {
- "use asm"
-
- function caller() {
- var x = 17;
- var ret = 0;
- switch (x) {
- case 17:
- case 14: ret = 39;
- case 1: ret = (ret + 3)|0;
- case 4: break;
- default: ret = (ret + 1)|0;
- }
- return ret|0;
- }
-
- return {caller:caller};
-}
-
-assertWasm(42, TestSwitchFallthrough);
-
-
-function TestNestedSwitch() {
- "use asm"
-
- function caller() {
- var x = 3;
- var y = -13;
- switch (x) {
- case 1: return 0;
- case 3: {
- switch (y) {
- case 2: return 0;
- case -13: return 43;
- default: return 0;
- }
- }
- default: return 0;
- }
- return 0;
- }
-
- return {caller:caller};
-}
-
-assertWasm(43, TestNestedSwitch);
-
-
(function () {
function TestInitFunctionWithNoGlobals() {
"use asm";
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | test/mjsunit/wasm/asm-wasm-switch.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698