Skip to content

Instantly share code, notes, and snippets.

@gskachkov
Created December 15, 2015 19:57
Show Gist options
  • Save gskachkov/00a4ac914452122526cf to your computer and use it in GitHub Desktop.
Save gskachkov/00a4ac914452122526cf to your computer and use it in GitHub Desktop.
let out_of_scope = 0;
class Logger {
constructor() {
this._id = undefined;
}
scheduleLog() {
if (this._id) return;
let in_func_scope = 1;
// Promise.resolve(100).then(() => {
var f = () => {
print('start');
print(this);
print(in_func_scope);
print(out_of_scope);
this._id = undefined;
print("Logged!");
};
f();
}
}
var logger = new Logger;
logger.scheduleLog();
MacBook-Pro-Skachkov-2:Webkit2 Developer$ /Users/Developer/Projects/Webkit2/WebKitBuild/new_af_release/Debug/jsc --dumpGeneratedBytecodes=true --useFTLJIT\=false --useFunctionDotArguments\=true --useLLInt\=false --useFTLJIT\=false --useJIT\=true --forceDebuggerBytecodeGeneration\=1 test_function.js
<global>#A7ie1P:[0x103c77d00->0x103c80b00, NoneGlobal, 347]: 347 m_instructions; 2776 bytes; 1 parameter(s); 26 callee register(s); 5 variable(s)
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] debug willExecuteProgram, 0
[ 9] mov loc5, Undefined(const0)
[ 12] debug willExecuteStatement, 0
[ 15] resolve_scope loc6, loc3, out_of_scope(@id0), <GlobalLexicalVar>, 0, 0x103c53fc0
[ 22] put_to_scope loc6, out_of_scope(@id0), Int32: 0(const1), 1048578<DoNotThrowIfNotFound|GlobalLexicalVar|Initialization>, <structure>, 64860424
[ 29] resolve_scope loc6, loc3, Logger(@id1), <GlobalLexicalVar>, 0, 0x103c53fc0
[ 36] create_lexical_environment loc7, loc3, Cell: 0x103c3fdd0 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const2), <JSValue()>(const3)
[ 41] mov loc3, loc7
[ 44] new_func_exp loc5, loc3, f0
[ 48] new_object loc8, 0
[ 52] mov loc9, String (atomic) (identifier): constructor, ID: 4(const4)
[ 55] new_object loc10, 3
[ 59] mov loc11, True(const5)
[ 62] put_by_id loc10, configurable(@id2), loc11, IsDirect|Bottom
[ 71] put_by_id loc10, writable(@id3), loc11, IsDirect|Bottom
[ 80] put_by_id loc10, value(@id4), loc5, IsDirect|Bottom
[ 89] mov loc12, Cell: 0x103c62290 (0x103c26380:[Function, {name:100, length:101}, NonArray, Proto:0x103c35e00, Leaf]), ID: 57(const6)
[ 92] mov loc18, Undefined(const0)
[ 95] mov loc17, loc8
[ 98] mov loc16, loc9
[ 101] mov loc15, loc10
[ 104] call loc19, loc12, 4, 24 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 113] mov loc10, String (atomic) (identifier): prototype, ID: 4(const7)
[ 116] new_object loc11, 3
[ 120] mov loc12, True(const5)
[ 123] mov loc13, False(const8)
[ 126] put_by_id loc11, writable(@id3), loc13, IsDirect|Bottom
[ 135] put_by_id loc11, value(@id4), loc8, IsDirect|Bottom
[ 144] mov loc13, Cell: 0x103c62290 (0x103c26380:[Function, {name:100, length:101}, NonArray, Proto:0x103c35e00, Leaf]), ID: 57(const6)
[ 147] mov loc18, Undefined(const0)
[ 150] mov loc17, loc5
[ 153] mov loc16, loc10
[ 156] mov loc15, loc11
[ 159] call loc19, loc13, 4, 24 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 168] new_func_exp loc11, loc3, f1
[ 172] put_by_id loc11, PrivateSymbol.homeObject(@id5), loc8, Bottom
[ 181] mov loc12, String (atomic) (identifier): scheduleLog, ID: 4(const9)
[ 184] new_object loc13, 3
[ 188] mov loc14, True(const5)
[ 191] put_by_id loc13, configurable(@id2), loc14, IsDirect|Bottom
[ 200] put_by_id loc13, writable(@id3), loc14, IsDirect|Bottom
[ 209] put_by_id loc13, value(@id4), loc11, IsDirect|Bottom
[ 218] mov loc15, Cell: 0x103c62290 (0x103c26380:[Function, {name:100, length:101}, NonArray, Proto:0x103c35e00, Leaf]), ID: 57(const6)
[ 221] mov loc20, Undefined(const0)
[ 224] mov loc19, loc8
[ 227] mov loc18, loc12
[ 230] mov loc17, loc13
[ 233] call loc21, loc15, 4, 26 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 242] put_to_scope loc7, Logger(@id1), loc5, 4<ThrowIfNotFound|LocalClosureVar|Initialization>, <structure>, 0
[ 249] get_parent_scope loc11, loc7
[ 252] mov loc3, loc11
[ 255] put_to_scope loc6, Logger(@id1), loc5, 1048578<DoNotThrowIfNotFound|GlobalLexicalVar|Initialization>, <structure>, 64860416
[ 262] debug willExecuteStatement, 0
[ 265] resolve_scope loc6, loc3, logger(@id6), <GlobalVar>, 1, 0x103c33700
[ 272] resolve_scope loc7, loc3, Logger(@id1), <GlobalLexicalVar>, 0, 0x103c53fc0
[ 279] get_from_scope loc8, loc7, Logger(@id1), 1026<ThrowIfNotFound|GlobalLexicalVar|NotInitialization>, 64860416 predicting None
[ 287] mov loc10, loc8
[ 290] construct loc8, loc8, 1, 16 status(Could Take Slow Path, maxNumArguments = 1) predicting None
[ 299] put_to_scope loc6, logger(@id6), loc8, 1048577<DoNotThrowIfNotFound|GlobalVar|Initialization>, <structure>, 64997376
[ 306] debug willExecuteStatement, 0
[ 309] resolve_scope loc6, loc3, logger(@id6), <GlobalVar>, 1, 0x103c33700
[ 316] get_from_scope loc6, loc6, logger(@id6), 1025<ThrowIfNotFound|GlobalVar|NotInitialization>, 64997376 predicting None
[ 324] get_by_id loc5, loc6, scheduleLog(@id7) predicting None
[ 333] call loc5, loc5, 1, 12 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 342] debug didExecuteProgram, 0
[ 345] end loc5
Identifiers:
id0 = out_of_scope
id1 = Logger
id2 = configurable
id3 = writable
id4 = value
id5 = PrivateSymbol.homeObject
id6 = logger
id7 = scheduleLog
Constants:
k0 = Undefined
k1 = Int32: 0: in source as integer
k2 = Cell: 0x103c3fdd0 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k3 = <JSValue()>
k4 = String (atomic) (identifier): constructor, ID: 4
k5 = True
k6 = Cell: 0x103c62290 (0x103c26380:[Function, {name:100, length:101}, NonArray, Proto:0x103c35e00, Leaf]), ID: 57
k7 = String (atomic) (identifier): prototype, ID: 4
k8 = False
k9 = String (atomic) (identifier): scheduleLog, ID: 4
Logger#EW5t2p:[0x103c77a00->0x103c80800, NoneFunctionConstruct, 83 (StrictMode)]: 83 m_instructions; 664 bytes; 1 parameter(s); 12 callee register(s); 8 variable(s); lexical environment in r-7
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] create_lexical_environment loc5, loc3, Cell: 0x103c3fba0 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const1), Undefined(const2)
[ 11] mov loc3, loc5
[ 14] put_to_scope loc5, Logger(@id0), head3, 1028<ThrowIfNotFound|LocalClosureVar|NotInitialization>, <structure>, 0
[ 21] create_lexical_environment loc6, loc3, Cell: 0x103c3fc10 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const0), Undefined(const2)
[ 26] mov loc3, loc6
[ 29] mov loc7, this
[ 32] create_this this, this, 1, 0
[ 37] debug didEnterCallFrame, 0
[ 40] debug willExecuteStatement, 0
[ 43] mov loc8, this
[ 46] resolve_scope loc9, loc3, undefined(@id1), <GlobalVar>, 4, 0x103c33700
[ 53] get_from_scope loc10, loc9, undefined(@id1), 1025<ThrowIfNotFound|GlobalVar|NotInitialization>, 64882192 predicting None
[ 61] put_by_id loc8, _id(@id2), loc10, Bottom
[ 70] debug willLeaveCallFrame, 0
[ 73] is_object loc8, this
[ 76] jtrue loc8, 5(->81)
[ 79] ret this
[ 81] ret this
Identifiers:
id0 = Logger
id1 = undefined
id2 = _id
Constants:
k0 = Cell: 0x103c3fc10 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k1 = Cell: 0x103c3fba0 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k2 = Undefined
scheduleLog#CgqqI8:[0x103c77700->0x103c80700, NoneFunctionCall, 133 (StrictMode)]: 133 m_instructions; 1064 bytes; 1 parameter(s); 16 callee register(s); 8 variable(s); lexical environment in r-7
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] create_lexical_environment loc5, loc3, Cell: 0x103c3f890 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const1), Undefined(const2)
[ 11] mov loc3, loc5
[ 14] put_to_scope loc5, scheduleLog(@id0), head3, 1028<ThrowIfNotFound|LocalClosureVar|NotInitialization>, <structure>, 0
[ 21] create_lexical_environment loc6, loc3, Cell: 0x103c3f900 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const0), Undefined(const2)
[ 26] mov loc3, loc6
[ 29] to_this this, OK
[ 33] put_to_scope loc3, PrivateSymbol.thisLocal(@id1), this, 1049604<DoNotThrowIfNotFound|LocalClosureVar|NotInitialization>, <structure>, 1
[ 40] put_to_scope loc3, PrivateSymbol.newTargetLocal(@id2), loc7, 1048580<DoNotThrowIfNotFound|LocalClosureVar|Initialization>, <structure>, 2
[ 47] create_lexical_environment loc8, loc3, Cell: 0x103c3f820 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const3), <JSValue()>(const4)
[ 52] mov loc3, loc8
[ 55] debug didEnterCallFrame, 0
[ 58] debug willExecuteStatement, 0
[ 61] get_by_id loc9, this, _id(@id3) predicting None
[ 70] jfalse loc9, 11(->81)
[ 73] debug willExecuteStatement, 0
[ 76] debug willLeaveCallFrame, 0
[ 79] ret Undefined(const2)
[ 81] debug willExecuteStatement, 0
[ 84] put_to_scope loc8, in_func_scope(@id4), Int32: 1(const5), 4<ThrowIfNotFound|LocalClosureVar|Initialization>, <structure>, 0
[ 91] debug willExecuteStatement, 0
[ 94] op_new_arrow_func_exp loc9, loc3, f0
[ 98] put_to_scope loc6, f(@id5), loc9, 4<ThrowIfNotFound|LocalClosureVar|Initialization>, <structure>, 0
[ 105] debug willExecuteStatement, 0
[ 108] mov loc10, loc6
[ 111] get_from_scope loc9, loc10, f(@id5), 1027<ThrowIfNotFound|ClosureVar|NotInitialization>, 0 predicting None
[ 119] call loc9, loc9, 1, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 128] debug willLeaveCallFrame, 0
[ 131] ret Undefined(const2)
Identifiers:
id0 = scheduleLog
id1 = PrivateSymbol.thisLocal
id2 = PrivateSymbol.newTargetLocal
id3 = _id
id4 = in_func_scope
id5 = f
Constants:
k0 = Cell: 0x103c3f900 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k1 = Cell: 0x103c3f890 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k2 = Undefined
k3 = Cell: 0x103c3f820 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k4 = <JSValue()>
k5 = Int32: 1: in source as integer
f#Do3TC7:[0x103c77400->0x103c80500, NoneFunctionCall, 241 (StrictMode)]: 241 m_instructions; 1928 bytes; 1 parameter(s); 16 callee register(s); 7 variable(s); lexical environment in r-6
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] create_lexical_environment loc5, loc3, Cell: 0x103c3f740 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const0), Undefined(const1)
[ 11] mov loc3, loc5
[ 14] resolve_scope loc7, loc3, PrivateSymbol.thisLocal(@id0), <ClosureVar>, 1, 0x103c3f900
[ 21] get_from_scope this, loc7, PrivateSymbol.thisLocal(@id0), 1049603<DoNotThrowIfNotFound|ClosureVar|NotInitialization>, 1 predicting None
[ 29] debug didEnterCallFrame, 0
[ 32] debug willExecuteStatement, 0
[ 35] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 6, 0x103c33700
[ 42] get_from_scope loc7, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 50] mov loc9, String (atomic) (identifier): start, ID: 4(const2)
[ 53] call loc7, loc7, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 62] debug willExecuteStatement, 0
[ 65] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 6, 0x103c33700
[ 72] get_from_scope loc7, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 80] mov loc9, this
[ 83] call loc7, loc7, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 92] debug willExecuteStatement, 0
[ 95] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 6, 0x103c33700
[ 102] get_from_scope loc7, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 110] resolve_scope loc9, loc3, in_func_scope(@id2), <ClosureVar>, 1, 0x103c3f820
[ 117] get_from_scope loc9, loc9, in_func_scope(@id2), 1027<ThrowIfNotFound|ClosureVar|NotInitialization>, 0 predicting None
[ 125] call loc7, loc7, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 134] debug willExecuteStatement, 0
[ 137] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 6, 0x103c33700
[ 144] get_from_scope loc7, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 152] resolve_scope loc9, loc3, out_of_scope(@id3), <GlobalLexicalVar>, 5, 0x103c53fc0
[ 159] get_from_scope loc9, loc9, out_of_scope(@id3), 1026<ThrowIfNotFound|GlobalLexicalVar|NotInitialization>, 64860424 predicting None
[ 167] call loc7, loc7, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 176] debug willExecuteStatement, 0
[ 179] mov loc7, this
[ 182] resolve_scope loc8, loc3, undefined(@id4), <GlobalVar>, 6, 0x103c33700
[ 189] get_from_scope loc9, loc8, undefined(@id4), 1025<ThrowIfNotFound|GlobalVar|NotInitialization>, 64882192 predicting None
[ 197] put_by_id loc7, _id(@id5), loc9, Bottom
[ 206] debug willExecuteStatement, 0
[ 209] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 6, 0x103c33700
[ 216] get_from_scope loc7, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 224] mov loc9, String (atomic) (identifier): Logged!, ID: 4(const3)
[ 227] call loc7, loc7, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 236] debug willLeaveCallFrame, 0
[ 239] ret Undefined(const1)
Identifiers:
id0 = PrivateSymbol.thisLocal
id1 = print
id2 = in_func_scope
id3 = out_of_scope
id4 = undefined
id5 = _id
Constants:
k0 = Cell: 0x103c3f740 (0x103c27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k1 = Undefined
k2 = String (atomic) (identifier): start, ID: 4
k3 = String (atomic) (identifier): Logged!, ID: 4
start
Segmentation fault: 11
MacBook-Pro-Skachkov-2:Webkit2 Developer$ /Users/Developer/Projects/Webkit2/WebKitBuild/new_af_release/Debug/jsc --dumpGeneratedBytecodes=true --useFTLJIT\=false --useFunctionDotArguments\=true --useLLInt\=false --useFTLJIT\=false --useJIT\=true --forceDebuggerBytecodeGeneration\=0 test_function.js
<global>#A7ie1P:[0x108677d00->0x108680b00, NoneGlobal, 317]: 317 m_instructions; 2536 bytes; 1 parameter(s); 26 callee register(s); 5 variable(s)
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] mov loc5, Undefined(const0)
[ 9] resolve_scope loc6, loc3, out_of_scope(@id0), <GlobalLexicalVar>, 0, 0x108653fc0
[ 16] put_to_scope loc6, out_of_scope(@id0), Int32: 0(const1), 1048578<DoNotThrowIfNotFound|GlobalLexicalVar|Initialization>, <structure>, 142592136
[ 23] resolve_scope loc6, loc3, Logger(@id1), <GlobalLexicalVar>, 0, 0x108653fc0
[ 30] mov loc7, <JSValue()>(const2)
[ 33] new_func_exp loc5, loc3, f0
[ 37] new_object loc8, 0
[ 41] mov loc9, String (atomic) (identifier): constructor, ID: 4(const3)
[ 44] new_object loc10, 3
[ 48] mov loc11, True(const4)
[ 51] put_by_id loc10, configurable(@id2), loc11, IsDirect|Bottom
[ 60] put_by_id loc10, writable(@id3), loc11, IsDirect|Bottom
[ 69] put_by_id loc10, value(@id4), loc5, IsDirect|Bottom
[ 78] mov loc12, Cell: 0x108662290 (0x108626380:[Function, {name:100, length:101}, NonArray, Proto:0x108635e00, Leaf]), ID: 57(const5)
[ 81] mov loc18, Undefined(const0)
[ 84] mov loc17, loc8
[ 87] mov loc16, loc9
[ 90] mov loc15, loc10
[ 93] call loc19, loc12, 4, 24 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 102] mov loc10, String (atomic) (identifier): prototype, ID: 4(const6)
[ 105] new_object loc11, 3
[ 109] mov loc12, True(const4)
[ 112] mov loc13, False(const7)
[ 115] put_by_id loc11, writable(@id3), loc13, IsDirect|Bottom
[ 124] put_by_id loc11, value(@id4), loc8, IsDirect|Bottom
[ 133] mov loc13, Cell: 0x108662290 (0x108626380:[Function, {name:100, length:101}, NonArray, Proto:0x108635e00, Leaf]), ID: 57(const5)
[ 136] mov loc18, Undefined(const0)
[ 139] mov loc17, loc5
[ 142] mov loc16, loc10
[ 145] mov loc15, loc11
[ 148] call loc19, loc13, 4, 24 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 157] new_func_exp loc11, loc3, f1
[ 161] put_by_id loc11, PrivateSymbol.homeObject(@id5), loc8, Bottom
[ 170] mov loc12, String (atomic) (identifier): scheduleLog, ID: 4(const8)
[ 173] new_object loc13, 3
[ 177] mov loc14, True(const4)
[ 180] put_by_id loc13, configurable(@id2), loc14, IsDirect|Bottom
[ 189] put_by_id loc13, writable(@id3), loc14, IsDirect|Bottom
[ 198] put_by_id loc13, value(@id4), loc11, IsDirect|Bottom
[ 207] mov loc15, Cell: 0x108662290 (0x108626380:[Function, {name:100, length:101}, NonArray, Proto:0x108635e00, Leaf]), ID: 57(const5)
[ 210] mov loc20, Undefined(const0)
[ 213] mov loc19, loc8
[ 216] mov loc18, loc12
[ 219] mov loc17, loc13
[ 222] call loc21, loc15, 4, 26 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 231] mov loc7, loc5
[ 234] put_to_scope loc6, Logger(@id1), loc5, 1048578<DoNotThrowIfNotFound|GlobalLexicalVar|Initialization>, <structure>, 142592128
[ 241] resolve_scope loc6, loc3, logger(@id6), <GlobalVar>, 1, 0x108633700
[ 248] resolve_scope loc7, loc3, Logger(@id1), <GlobalLexicalVar>, 0, 0x108653fc0
[ 255] get_from_scope loc8, loc7, Logger(@id1), 1026<ThrowIfNotFound|GlobalLexicalVar|NotInitialization>, 142592128 predicting None
[ 263] mov loc10, loc8
[ 266] construct loc8, loc8, 1, 16 status(Could Take Slow Path, maxNumArguments = 1) predicting None
[ 275] put_to_scope loc6, logger(@id6), loc8, 1048577<DoNotThrowIfNotFound|GlobalVar|Initialization>, <structure>, 142593152
[ 282] resolve_scope loc6, loc3, logger(@id6), <GlobalVar>, 1, 0x108633700
[ 289] get_from_scope loc6, loc6, logger(@id6), 1025<ThrowIfNotFound|GlobalVar|NotInitialization>, 142593152 predicting None
[ 297] get_by_id loc5, loc6, scheduleLog(@id7) predicting None
[ 306] call loc5, loc5, 1, 12 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 315] end loc5
Identifiers:
id0 = out_of_scope
id1 = Logger
id2 = configurable
id3 = writable
id4 = value
id5 = PrivateSymbol.homeObject
id6 = logger
id7 = scheduleLog
Constants:
k0 = Undefined
k1 = Int32: 0: in source as integer
k2 = <JSValue()>
k3 = String (atomic) (identifier): constructor, ID: 4
k4 = True
k5 = Cell: 0x108662290 (0x108626380:[Function, {name:100, length:101}, NonArray, Proto:0x108635e00, Leaf]), ID: 57
k6 = String (atomic) (identifier): prototype, ID: 4
k7 = False
k8 = String (atomic) (identifier): scheduleLog, ID: 4
Logger#EW5t2p:[0x108677a00->0x108680800, NoneFunctionConstruct, 54 (StrictMode)]: 54 m_instructions; 432 bytes; 1 parameter(s); 10 callee register(s); 7 variable(s)
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] mov loc5, head3
[ 9] mov loc6, this
[ 12] create_this this, this, 1, 0
[ 17] mov loc7, this
[ 20] resolve_scope loc8, loc3, undefined(@id0), <GlobalVar>, 1, 0x108633700
[ 27] get_from_scope loc9, loc8, undefined(@id0), 1025<ThrowIfNotFound|GlobalVar|NotInitialization>, 142476816 predicting None
[ 35] put_by_id loc7, _id(@id1), loc9, Bottom
[ 44] is_object loc7, this
[ 47] jtrue loc7, 5(->52)
[ 50] ret this
[ 52] ret this
Identifiers:
id0 = undefined
id1 = _id
Constants:
k0 = Cell: 0x10863fd60 (0x108627600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
scheduleLog#CgqqI8:[0x108677700->0x108680700, NoneFunctionCall, 85 (StrictMode)]: 85 m_instructions; 680 bytes; 1 parameter(s); 18 callee register(s); 9 variable(s); lexical environment in r-7
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] mov loc5, head3
[ 9] create_lexical_environment loc6, loc3, Cell: 0x10863fb30 (0x108627600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const0), Undefined(const1)
[ 14] mov loc3, loc6
[ 17] to_this this, OK
[ 21] put_to_scope loc3, PrivateSymbol.thisLocal(@id0), this, 1049604<DoNotThrowIfNotFound|LocalClosureVar|NotInitialization>, <structure>, 0
[ 28] put_to_scope loc3, PrivateSymbol.newTargetLocal(@id1), loc8, 1048580<DoNotThrowIfNotFound|LocalClosureVar|Initialization>, <structure>, 1
[ 35] create_lexical_environment loc9, loc3, Cell: 0x10863fac0 (0x108627600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const2), <JSValue()>(const3)
[ 40] mov loc3, loc9
[ 43] get_by_id loc10, this, _id(@id2) predicting None
[ 52] jfalse loc10, 5(->57)
[ 55] ret Undefined(const1)
[ 57] put_to_scope loc9, in_func_scope(@id3), Int32: 1(const4), 4<ThrowIfNotFound|LocalClosureVar|Initialization>, <structure>, 0
[ 64] op_new_arrow_func_exp loc7, loc3, f0
[ 68] mov loc10, loc7
[ 71] mov loc12, Undefined(const1)
[ 74] call loc10, loc10, 1, 18 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 83] ret Undefined(const1)
Identifiers:
id0 = PrivateSymbol.thisLocal
id1 = PrivateSymbol.newTargetLocal
id2 = _id
id3 = in_func_scope
Constants:
k0 = Cell: 0x10863fb30 (0x108627600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k1 = Undefined
k2 = Cell: 0x10863fac0 (0x108627600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k3 = <JSValue()>
k4 = Int32: 1: in source as integer
f#Do3TC7:[0x108677400->0x108680500, NoneFunctionCall, 209 (StrictMode)]: 209 m_instructions; 1672 bytes; 1 parameter(s); 16 callee register(s); 6 variable(s)
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] resolve_scope loc6, loc3, PrivateSymbol.thisLocal(@id0), <ClosureVar>, 1, 0x10863fb30
[ 13] get_from_scope this, loc6, PrivateSymbol.thisLocal(@id0), 1049603<DoNotThrowIfNotFound|ClosureVar|NotInitialization>, 0 predicting None
[ 21] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 3, 0x108633700
[ 28] get_from_scope loc6, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 36] mov loc9, String (atomic) (identifier): start, ID: 4(const1)
[ 39] call loc6, loc6, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 48] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 3, 0x108633700
[ 55] get_from_scope loc6, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 63] mov loc9, this
[ 66] call loc6, loc6, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 75] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 3, 0x108633700
[ 82] get_from_scope loc6, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 90] resolve_scope loc9, loc3, in_func_scope(@id2), <ClosureVar>, 0, 0x10863fac0
[ 97] get_from_scope loc9, loc9, in_func_scope(@id2), 1027<ThrowIfNotFound|ClosureVar|NotInitialization>, 0 predicting None
[ 105] call loc6, loc6, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 114] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 3, 0x108633700
[ 121] get_from_scope loc6, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 129] resolve_scope loc9, loc3, out_of_scope(@id3), <GlobalLexicalVar>, 2, 0x108653fc0
[ 136] get_from_scope loc9, loc9, out_of_scope(@id3), 1026<ThrowIfNotFound|GlobalLexicalVar|NotInitialization>, 142592136 predicting None
[ 144] call loc6, loc6, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 153] mov loc6, this
[ 156] resolve_scope loc7, loc3, undefined(@id4), <GlobalVar>, 3, 0x108633700
[ 163] get_from_scope loc8, loc7, undefined(@id4), 1025<ThrowIfNotFound|GlobalVar|NotInitialization>, 142476816 predicting None
[ 171] put_by_id loc6, _id(@id5), loc8, Bottom
[ 180] resolve_scope loc10, loc3, print(@id1), <GlobalProperty>, 3, 0x108633700
[ 187] get_from_scope loc6, loc10, print(@id1), 1024<ThrowIfNotFound|GlobalProperty|NotInitialization>, 151 predicting None
[ 195] mov loc9, String (atomic) (identifier): Logged!, ID: 4(const2)
[ 198] call loc6, loc6, 2, 16 status(Could Take Slow Path, maxNumArguments = 1) Original; predicting None
[ 207] ret Undefined(const3)
Identifiers:
id0 = PrivateSymbol.thisLocal
id1 = print
id2 = in_func_scope
id3 = out_of_scope
id4 = undefined
id5 = _id
Constants:
k0 = Cell: 0x10863f9e0 (0x108627600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k1 = String (atomic) (identifier): start, ID: 4
k2 = String (atomic) (identifier): Logged!, ID: 4
k3 = Undefined
start
[object Object]
1
0
Logged!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment