PageRenderTime 16ms CodeModel.GetById 8ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/js/src/jit-test/tests/jaeger/getter-hook-2.js

http://github.com/zpao/v8monkey
JavaScript | 19 lines | 17 code | 1 blank | 1 comment | 3 complexity | 5a5af0269f3a60976faedba98f664112 MD5 | raw file
 1// PIC on CALLPROP invoking getter hook.
 2
 3function foo(arr) {
 4  for (var i = 0; i < 100; i++)
 5    arr[i].caller(false);
 6}
 7arr = Object.create(Object.prototype);
 8first = Object.create({});
 9first.caller = bar;
10second = Object.create({});
11second.caller = bar;
12for (var i = 0; i < 100; )
13  arr[i++] = foo;
14foo.caller;
15function bar(x) {
16  if (x)
17    foo(arr);
18}
19bar(true);