PageRenderTime 6ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/jaeger/bug563000/eif-trap-typechange.js

http://github.com/zpao/v8monkey
JavaScript | 13 lines | 10 code | 1 blank | 2 comment | 0 complexity | c2e130beaad425d5e33ff3648e56f119 MD5 | raw file
 1// |jit-test| mjitalways;debug
 2setDebug(true);
 3
 4function nop(){}
 5function 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.
11var pc = line2pc(caller, pc2line(caller, 0) + 2);
12trap(caller, pc, "x = 'success'; nop()");
13assertEq(caller(this), "success");