-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathjitdefer.js
41 lines (34 loc) · 973 Bytes
/
jitdefer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function foo(param)
{
var x = 100;
function bar()
{
WScript.Echo(x);
}
function baz(param1)
{
function inner(){
count++;
WScript.Echo("COUNT: " + count);
bar();
o["i"] = arguments["callee"];
}
if(param1)
return inner()
else
return bar();
}
if(param)
return baz(true);
else
return baz(false);
}
var count = 0;
var o = {};
WScript.Echo(foo(false));
WScript.Echo(foo(true));
WScript.Echo(o.i());