PageRenderTime 24ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/basic/testReconstructImacroPCStack.js

http://github.com/zpao/v8monkey
JavaScript | 28 lines | 23 code | 5 blank | 0 comment | 2 complexity | ca129508c86ca7b5b0f6a8c7ff144f44 MD5 | raw file
 1x = Proxy.create((function () {
 2    return {
 3        get: function () {}
 4    }
 5}()), Object.e)
 6
 7var hit = false;
 8
 9try {
10    Function("\
11      for(var a = 0; a < 2; ++a) {\
12        if (a == 0) {}\
13        else {\
14          x > x\
15        }\
16      }\
17    ")()
18} catch (e) {
19    hit = true;
20
21    var str = String(e);
22    var match = (str == "TypeError: x is not a function" ||
23                 str == "TypeError: can't convert x to number");
24
25    assertEq(match, true);
26}
27
28assertEq(hit, true);