--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/91385b8f-a198-4dd1-8c51-585309c26e3f%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/fe63e255-ee49-4b6c-8811-28b4eb774c55%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAFKEYJjR77auN-9bxL6T54fPUw1gU_nNGKed6LXqAQH%3DEViuaA%40mail.gmail.com.
d8> const x = 10; function f1() {return x;}
--- AST ---
FUNC at 0. KIND 0. SUSPEND COUNT 0. NAME "". INFERRED NAME "". DECLS. . VARIABLE (0x7f94e001ce28) (mode = CONST) "x". . FUNCTION "f1" = function f1. BLOCK NOCOMPLETIONS at -1. . EXPRESSION STATEMENT at 10. . . INIT at 10. . . . VAR PROXY context[4] (0x7f94e001ce28) (mode = CONST) "x" . . . . LITERAL 10
/** FUNCTION PROLOGUE START **/
0xccc69fa90ca @ 0 : 12 00 LdaConstant [0] 0xccc69fa90cc @ 2 : 26 f9 Star r2 0xccc69fa90ce @ 4 : 27 fe fa Mov <closure>, r1 0xccc69fa90d1 @ 7 : 5e 7f 01 fa 02 CallRuntime [NewScriptContext], r1-r2 0xccc69fa90d6 @ 12 : 16 fa PushContext r1
/** FUNCTION PROLUGE END **/
/** VARIABLE PROXY in ContextSlot 4? **/ 0xccc69fa90d8 @ 14 : 0f LdaTheHole
0xccc69fa90d9 @ 15 : 1d 04 StaCurrentContextSlot [4]
/** NO CreateClosure bytecode? but Mov <closure>? **/ 0xccc69fa90db @ 17 : 12 01 LdaConstant [1] // accumulator = SCRIPT_SCOPE 0xccc69fa90dd @ 19 : 26 f9 Star r2 // r2 = SCRIPT_SCOPE 0xccc69fa90df @ 21 : 0b LdaZero 0xccc69fa90e0 @ 22 : 26 f8 Star r3 // r3 = 0 0xccc69fa90e2 @ 24 : 27 fe f7 Mov <closure>, r4 // r4 = <closure>
0xccc69fa90e5 @ 27 : 5e 76 01 f9 03 CallRuntime [DeclareGlobals], r2-r4
/** entering function, because there's StackCheck bytecode **/ 0 E> 0xccc69fa90ea @ 32 : a0 StackCheck
/** store small integer 10 into variable proxy in ContextSlot 4? **/ 10 S> 0xccc69fa90eb @ 33 : 0c 0a LdaSmi [10] 10 E> 0xccc69fa90ed @ 35 : 1d 04 StaCurrentContextSlot [4]
0xccc69fa90ef @ 37 : 0d LdaUndefined 38 S> 0xccc69fa90f0 @ 38 : a4 ReturnConstant pool (size = 2)0xccc69fa9059: [FixedArray] in OldSpace - map: 0xccc20b82361 <Map> - length: 2 0: 0xccc69fa8f39 <ScopeInfo SCRIPT_SCOPE [12]> 1: 0xccc69fa8fa9 <FixedArray[4]>To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/fe63e255-ee49-4b6c-8811-28b4eb774c55%40googlegroups.com.
--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAFKEYJjR77auN-9bxL6T54fPUw1gU_nNGKed6LXqAQH%3DEViuaA%40mail.gmail.com.
I have some confusion around LdaHole, and its usage.
Here is the generated bytecode from D8, please see my question in comments below:
/** FUNCTION PROLOGUE START **/
0xccc69fa90ca @ 0 : 12 00 LdaConstant [0]0xccc69fa90cc @ 2 : 26 f9 Star r20xccc69fa90ce @ 4 : 27 fe fa Mov <closure>, r10xccc69fa90d1 @ 7 : 5e 7f 01 fa 02 CallRuntime [NewScriptContext], r1-r20xccc69fa90d6 @ 12 : 16 fa PushContext r1
/** FUNCTION PROLUGE END **/
/** VARIABLE PROXY in ContextSlot 4? **/0xccc69fa90d8 @ 14 : 0f LdaTheHole0xccc69fa90d9 @ 15 : 1d 04 StaCurrentContextSlot [4]
/** NO CreateClosure bytecode? but Mov <closure>? **/0xccc69fa90db @ 17 : 12 01 LdaConstant [1] // accumulator = SCRIPT_SCOPE0xccc69fa90dd @ 19 : 26 f9 Star r2 // r2 = SCRIPT_SCOPE0xccc69fa90df @ 21 : 0b LdaZero0xccc69fa90e0 @ 22 : 26 f8 Star r3 // r3 = 00xccc69fa90e2 @ 24 : 27 fe f7 Mov <closure>, r4 // r4 = <closure>0xccc69fa90e5 @ 27 : 5e 76 01 f9 03 CallRuntime [DeclareGlobals], r2-r4
/** entering function, because there's StackCheck bytecode **/0 E> 0xccc69fa90ea @ 32 : a0 StackCheck
/** store small integer 10 into variable proxy in ContextSlot 4? **/10 S> 0xccc69fa90eb @ 33 : 0c 0a LdaSmi [10]10 E> 0xccc69fa90ed @ 35 : 1d 04 StaCurrentContextSlot [4]