js/src/jit-test/tests/ion/bug824863.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 Module = {};
michael@0 2 var Runtime = {
michael@0 3 alignMemory: function alignMemory(size, quantum) {
michael@0 4 return Math.ceil((size) / (quantum ? quantum : 4)) * (quantum ? quantum : 4);
michael@0 5 },
michael@0 6 }
michael@0 7 function assert(condition, text) {
michael@0 8 throw text;
michael@0 9 }
michael@0 10 STACK_ROOT = STACKTOP = Runtime.alignMemory(1);
michael@0 11 function _main() {
michael@0 12 var __stackBase__ = STACKTOP;
michael@0 13 var label;
michael@0 14 label = 2;
michael@0 15 while (1) {
michael@0 16 switch (label) {
michael@0 17 case 2:
michael@0 18 var $f = __stackBase__;
michael@0 19 var $1 = __stackBase__ + 12;
michael@0 20 var $2 = __stackBase__ + 24;
michael@0 21 var $3 = $f | 0;
michael@0 22 var $4 = $f + 4 | 0;
michael@0 23 var $5 = $f + 8 | 0;
michael@0 24 var $_0 = $1 | 0;
michael@0 25 var $_1 = $1 + 4 | 0;
michael@0 26 var $_2 = $1 + 8 | 0;
michael@0 27 var $j_012 = 0;
michael@0 28 label = 4;
michael@0 29 break;
michael@0 30 case 4:
michael@0 31 assertEq($_2, 24);
michael@0 32 if (($j_012 | 0) != 110) {
michael@0 33 var $j_012 = $j_012 + 1;
michael@0 34 break;
michael@0 35 }
michael@0 36 var $23 = $i_014 + 1 | 0;
michael@0 37 if (($23 | 0) != 110) {
michael@0 38 var $i_014 = $23;
michael@0 39 var $j_012 = 0;
michael@0 40 label = 4;
michael@0 41 break;
michael@0 42 }
michael@0 43 default:
michael@0 44 assert(0, "bad label: " + label);
michael@0 45 }
michael@0 46 }
michael@0 47 }
michael@0 48 try {
michael@0 49 _main(0, [], 0);
michael@0 50 assertEq(0, 1);
michael@0 51 } catch(e) {
michael@0 52 assertEq(e, "bad label: 4");
michael@0 53 }

mercurial