Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / jit-test / tests / jaeger / bug563000 / eif-trap-typechange.js
1 // |jit-test| mjitalways;debug
2 setDebug(true);
3
4 function nop(){}
5 function caller(obj) {
6   assertJit();
7   var x = ({ dana : "zuul" });
8   return x;
9 }
10 // 0 is the pc of "assertJit()", we want the pc of "return x", 2 lines below.
11 var pc = line2pc(caller, pc2line(caller, 0) + 2);
12 trap(caller, pc, "x = 'success'; nop()");
13 assertEq(caller(this), "success");