Home > front end >  V8 engine how to check the machine
V8 engine how to check the machine

Time:10-06

Newcomer help you a great god, due to the need of paper, need to obtain a v8 engine will js code compiled machine code, because the first contact with v8 engine, want to know how to operate,

CodePudding user response:

On zhihu!

This asked in CSDN is too high

CodePudding user response:

- print - all - code

CodePudding user response:

- print - code can also be

 - Raw source -- -- -- 
//t (1, 2);


The/var/t=9876345;
The function of t () {
Print (" ha ha ha ");
}

//print (a);
Print (t);

T ();

//function c () {
//print (" ha ha ha ");
//}

T ();//
T ();//
T ();//

- Code -- -- --
Source_position=0
Kind=FUNCTION
The compiler=full - codegen
Instructions (size=260)
0 x32e31db687e0 0 55 push RBP;; The debug: position 0
0 x32e31db687e1 1 4889 e5 REX w. movq RBP, RSP
0 x32e31db687e4 4 56 push rsi
57 push 0 x32e31db687e5 5 rdi
0 6 41 x32e31db687e6 ff75a0 push [r13-0 x60]
0 x32e31db687ea 10 49 bab9d4fc297e230000 REX w. movq r10, 0 x237e29fcd4b9;; Object: 0 x237e29fcd4b9 & lt; FixedArray [2] & gt;
0 x32e31db687f4 20 4152 push r10
22 6 0 x32e31db687f6 a00:1450:8006 push 0 x0
0 x32e31db687f8 24 b802000000 movl rax, 0 x2
0 x32e31db687fd 29 48 bb105da20000000000 REX w. movq RBX, 0 xa25d10
39 e8d4d8f9ff call 0 0 x32e31db68807 x32e31db060e0;; Code: STUB, CEntryStub, minor: 4
0 x32e31db6880c 44 493 ba5200b0000 REX w. CMPQ RSP, [r13 + 0 xb20]
58 (0 0 x32e31db68813 51, 7305 JNC x32e31db6881a)
0 x32e31db68815 53 e8c6acfdff call StackCheck x32e31db434e0 (0);; Code: BUILTIN
0 x32e31db6881a 58 48 b80000000005000000 REX w. movq rax, 0 x500000000;; The debug: 87
the statement0 x32e31db68824 e897f9ffff call 68 0 x32e31db681c0;; Code: LOAD_GLOBAL_IC
0 x32e31db68829 73 50 push rax
0 x32e31db6882a 74 49 ba9943f0297e230000 REX w. movq r10, 0 x237e29f04399;; Object: 0 x237e29f04399 & lt; Undefined>
84 4152 0 x32e31db68834 push r10
0 x32e31db68836 86 48 b80000000001000000 REX w. movq rax, 0 x100000000;; The debug: position 93
0 x32e31db68840 e87bf9ffff call 96 0 x32e31db681c0;; Code: LOAD_GLOBAL_IC
0 x32e31db68845 101 50 push rax
0 x32e31db68846 102 48 ba0000000003000000 REX w. movq RDX, 0 x300000000;; The debug: position 87
112 488 0 x32e31db68850 b7c2410 REX w. movq rdi, [RSP + 0 x10]
0 x32e31db68855 e8a6fcffff call 117 0 x32e31db68500;; Code: CALL_IC
122 488 0 x32e31db6885a b75f8 REX w. movq rsi, [RBP by 8 0]
126 4883 0 x32e31db6885e c408 REX w. addq RSP, by 8 0
0 x32e31db68862 130 48 b80000000001000000 REX w. movq rax, 0 x100000000;; The debug: 98
the statement0 x32e31db6886c e84ff9ffff call 140 0 x32e31db681c0;; Code: LOAD_GLOBAL_IC
0 x32e31db68871 145 50 push rax
0 x32e31db68872 146 49 ba9943f0297e230000 REX w. movq r10, 0 x237e29f04399;; Object: 0 x237e29f04399 & lt; Undefined>
156 4152 0 x32e31db6887c push r10
0 x32e31db6887e 158 48 ba0000000007000000 REX w. movq RDX, 0 x700000000
168 488 0 x32e31db68888 b7c2408 REX w. movq rdi, [RSP + 0 by 8]
0 x32e31db6888d e8cefeffff call 173 0 x32e31db68760;; Code: CALL_IC
178 488 0 x32e31db68892 b75f8 REX w. movq rsi, [RBP by 8 0]
182 4883 0 x32e31db68896 c408 REX w. addq RSP, by 8 0
186 488945 0 x32e31db6889a e8 REX w. movq [RBP x18] 0, rax
190 488 0 x32e31db6889e b45e8 REX w. movq rax, [RBP x18] 0
0 x32e31db688a2 194 48 bbe1d3fc297e230000 REX w. movq RBX, 0 x237e29fcd3e1;; Object: 0 x237e29fcd3e1 Cell for 6144
204 83430 0 x32e31db688ac bd1 addl [RBX + 0 xb], 0 xd1
241 (0 0 x32e31db688b0 208 791 f JNS x32e31db688d1)
0 x32e31db688b2 210 50 push rax
0 x32e31db688b3 211 e8a8abfdff call InterruptCheck x32e31db43460 (0);; Code: BUILTIN
0 x32e31db688b8 216 58 pop rax
0 x32e31db688b9 217 48 bbe1d3fc297e230000 REX w. movq RBX, 0 x237e29fcd3e1;; Object: 0 x237e29fcd3e1 Cell for 6144
0 x32e31db688c3 227 49 ba0000000000180000 REX w. movq r10, 0 x180000000000
0 x32e31db688cd 237 4 c895307 REX w. movq [RBX + 0 x7], r10
0 x32e31db688d1 c9 leavel; 241; The debug: 175
the statementBy 8 0 x32e31db688d2 242 c20800 ret 0
245 498 0 x32e31db688d5 b45a0 REX w. movq rax, [r13-0 x60]
194 (0 0 x32e31db688d9 249 e9c4ffffff JMP x32e31db688a2)
254 6690 0 x32e31db688de nop

Deoptimization Output Data (deopt points=0)

The Back edges (size=0)
Ast_id pc_offset loop_depth

0 x237e29fcd599: [TypeFeedbackInfo]
- ic_total_count: 5, ic_with_type_info_count: 0, ic_generic_count: 0

RelocInfo (size=33)
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related