Created
February 18, 2018 17:10
-
-
Save mraleph/a1f36a67676a8dfef0af081f27f3eb6a to your computer and use it in GitHub Desktop.
charCodeAt lowering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Raw source --- | |
(str, i) { | |
return str.charCodeAt(i); | |
} | |
--- Optimized code --- | |
optimization_id = 0 | |
source_position = 14 | |
kind = OPTIMIZED_FUNCTION | |
name = foo | |
stack_slots = 5 | |
compiler = turbofan | |
address = 0x1654793c3781 | |
Body (size = 546) | |
Instructions (size = 508) | |
0x1654793c37e0 0 488b59d0 REX.W movq rbx,[rcx-0x30] | |
0x1654793c37e4 4 f6430f01 testb [rbx+0xf],0x1 | |
0x1654793c37e8 8 0f85321af5ff jnz 0x165479315220 (CompileLazyDeoptimizedCode) ;; code: BUILTIN | |
-- B0 start (construct frame) -- | |
0x1654793c37ee e 55 push rbp | |
0x1654793c37ef f 4889e5 REX.W movq rbp,rsp | |
0x1654793c37f2 12 56 push rsi | |
0x1654793c37f3 13 57 push rdi | |
0x1654793c37f4 14 4883ec08 REX.W subq rsp,0x8 | |
0x1654793c37f8 18 493ba5f00e0000 REX.W cmpq rsp,[r13+0xef0] | |
0x1654793c37ff 1f 0f8636010000 jna 0x1654793c393b <+0x15b> | |
-- B2 start -- | |
-- B3 start -- | |
0x1654793c3805 25 488b4518 REX.W movq rax,[rbp+0x18] | |
0x1654793c3809 29 a801 test al,0x1 | |
0x1654793c380b 2b 0f84a6010000 jz 0x1654793c39b7 <+0x1d7> | |
0x1654793c3811 31 488b58ff REX.W movq rbx,[rax-0x1] | |
0x1654793c3815 35 0fb75b0b movzxwl rbx,[rbx+0xb] | |
0x1654793c3819 39 66f7c387ff testw rbx,0xffffffffffffff87 | |
0x1654793c381e 3e 0f8598010000 jnz 0x1654793c39bc <+0x1dc> | |
0x1654793c3824 44 488b58ff REX.W movq rbx,[rax-0x1] | |
0x1654793c3828 48 0fb75b0b movzxwl rbx,[rbx+0xb] | |
0x1654793c382c 4c 81fb80000000 cmpl rbx,0x80 | |
0x1654793c3832 52 0f8389010000 jnc 0x1654793c39c1 <+0x1e1> | |
0x1654793c3838 58 488b580f REX.W movq rbx,[rax+0xf] | |
0x1654793c383c 5c 488b5510 REX.W movq rdx,[rbp+0x10] | |
0x1654793c3840 60 f6c201 testb rdx,0x1 | |
0x1654793c3843 63 0f850c010000 jnz 0x1654793c3955 <+0x175> | |
-- B5 start -- | |
0x1654793c3849 69 488bca REX.W movq rcx,rdx | |
0x1654793c384c 6c 48c1e920 REX.W shrq rcx, 32 | |
-- B6 start -- | |
0x1654793c3850 70 48c1eb20 REX.W shrq rbx, 32 | |
0x1654793c3854 74 488bf1 REX.W movq rsi,rcx | |
0x1654793c3857 77 f7d6 notl rsi | |
0x1654793c3859 79 488bf9 REX.W movq rdi,rcx | |
0x1654793c385c 7c 2bfb subl rdi,rbx | |
0x1654793c385e 7e 23f7 andl rsi,rdi | |
0x1654793c3860 80 c1fe1f sarl rsi, 31 | |
0x1654793c3863 83 23f1 andl rsi,rcx | |
0x1654793c3865 85 3bcb cmpl rcx,rbx | |
0x1654793c3867 87 0f8359010000 jnc 0x1654793c39c6 <+0x1e6> | |
0x1654793c386d 8d 0f1f00 nop | |
-- B7 start (loop up to 14) -- | |
0x1654793c3870 90 488b58ff REX.W movq rbx,[rax-0x1] | |
0x1654793c3874 94 0fb75b0b movzxwl rbx,[rbx+0xb] | |
0x1654793c3878 98 488bd3 REX.W movq rdx,rbx | |
0x1654793c387b 9b 83e207 andl rdx,0x7 | |
0x1654793c387e 9e 83fa02 cmpl rdx,0x2 | |
0x1654793c3881 a1 0f847a000000 jz 0x1654793c3901 <+0x121> | |
0x1654793c3887 a7 83fa05 cmpl rdx,0x5 | |
0x1654793c388a aa 0f8442000000 jz 0x1654793c38d2 <+0xf2> | |
0x1654793c3890 b0 83fa01 cmpl rdx,0x1 | |
0x1654793c3893 b3 0f8425000000 jz 0x1654793c38be <+0xde> | |
0x1654793c3899 b9 83fa00 cmpl rdx,0x0 | |
0x1654793c389c bc 0f8436000000 jz 0x1654793c38d8 <+0xf8> | |
-- B8 start (in loop 7) -- | |
0x1654793c38a2 c2 83fa03 cmpl rdx,0x3 | |
0x1654793c38a5 c5 0f85e6000000 jnz 0x1654793c3991 <+0x1b1> | |
-- B9 start (in loop 7) -- | |
0x1654793c38ab cb 488b581f REX.W movq rbx,[rax+0x1f] | |
0x1654793c38af cf 48c1eb20 REX.W shrq rbx, 32 | |
0x1654793c38b3 d3 03de addl rbx,rsi | |
0x1654793c38b5 d5 488b4017 REX.W movq rax,[rax+0x17] | |
0x1654793c38b9 d9 488bf3 REX.W movq rsi,rbx | |
0x1654793c38bc dc ebb2 jmp 0x1654793c3870 <+0x90> | |
-- B10 start (in loop 7) -- | |
0x1654793c38be de 488b581f REX.W movq rbx,[rax+0x1f] | |
0x1654793c38c2 e2 49395dc8 REX.W cmpq [r13-0x38],rbx | |
0x1654793c38c6 e6 0f85c5000000 jnz 0x1654793c3991 <+0x1b1> | |
-- B11 start (in loop 7) -- | |
0x1654793c38cc ec 488b4017 REX.W movq rax,[rax+0x17] | |
0x1654793c38d0 f0 eb9e jmp 0x1654793c3870 <+0x90> | |
-- B12 start (in loop 7) -- | |
0x1654793c38d2 f2 488b4017 REX.W movq rax,[rax+0x17] | |
0x1654793c38d6 f6 eb98 jmp 0x1654793c3870 <+0x90> | |
-- B13 start (in loop 7) -- | |
-- B15 start -- | |
0x1654793c38d8 f8 8bd6 movl rdx,rsi | |
0x1654793c38da fa f6c308 testb rbx,0x8 | |
0x1654793c38dd fd 0f8511000000 jnz 0x1654793c38f4 <+0x114> | |
-- B16 start -- | |
0x1654793c38e3 103 488d1c5517000000 REX.W leaq rbx,[rdx*2+0x17] | |
0x1654793c38eb 10b 0fb70403 movzxwl rax,[rbx+rax*1] | |
0x1654793c38ef 10f e93c000000 jmp 0x1654793c3930 <+0x150> | |
-- B17 start -- | |
0x1654793c38f4 114 488d5a17 REX.W leaq rbx,[rdx+0x17] | |
0x1654793c38f8 118 0fb60403 movzxbl rax,[rbx+rax*1] | |
0x1654793c38fc 11c e92f000000 jmp 0x1654793c3930 <+0x150> | |
-- B18 start -- | |
-- B20 start -- | |
0x1654793c3901 121 488bd3 REX.W movq rdx,rbx | |
0x1654793c3904 124 83e220 andl rdx,0x20 | |
0x1654793c3907 127 83fa20 cmpl rdx,0x20 | |
0x1654793c390a 12a 0f8481000000 jz 0x1654793c3991 <+0x1b1> | |
-- B21 start -- | |
0x1654793c3910 130 4863d6 REX.W movsxlq rdx,rsi | |
0x1654793c3913 133 488b401f REX.W movq rax,[rax+0x1f] | |
0x1654793c3917 137 f6c308 testb rbx,0x8 | |
0x1654793c391a 13a 0f8409000000 jz 0x1654793c3929 <+0x149> | |
-- B22 start -- | |
0x1654793c3920 140 0fb60410 movzxbl rax,[rax+rdx*1] | |
0x1654793c3924 144 e907000000 jmp 0x1654793c3930 <+0x150> | |
-- B23 start -- | |
0x1654793c3929 149 8d1c12 leal rbx,[rdx+rdx*1] | |
0x1654793c392c 14c 0fb70418 movzxwl rax,[rax+rbx*1] | |
-- B26 start (deconstruct frame) -- | |
0x1654793c3930 150 48c1e020 REX.W shlq rax, 32 | |
0x1654793c3934 154 488be5 REX.W movq rsp,rbp | |
0x1654793c3937 157 5d pop rbp | |
0x1654793c3938 158 c21800 ret 0x18 | |
-- B27 start (no frame) -- | |
-- B1 start (deferred) -- | |
-- <not inlined:14> -- | |
0x1654793c393b 15b 48bba036040e01000000 REX.W movq rbx,0x10e0436a0 | |
0x1654793c3945 165 33c0 xorl rax,rax | |
0x1654793c3947 167 488b75f8 REX.W movq rsi,[rbp-0x8] | |
0x1654793c394b 16b e87009f4ff call 0x1654793042c0 ;; code: STUB, CEntryStub, minor: 8 | |
0x1654793c3950 170 e9b0feffff jmp 0x1654793c3805 <+0x25> | |
-- B4 start (deferred) -- | |
0x1654793c3955 175 488b42ff REX.W movq rax,[rdx-0x1] | |
0x1654793c3959 179 49394550 REX.W cmpq [r13+0x50],rax | |
0x1654793c395d 17d 0f856d000000 jnz 0x1654793c39d0 <+0x1f0> | |
0x1654793c3963 183 c5fb104207 vmovsd xmm0,[rdx+0x7] | |
0x1654793c3968 188 c5fb2cc8 vcvttsd2si rcx,xmm0 | |
0x1654793c396c 18c c5f157c9 vxorpd xmm1,xmm1,xmm1 | |
0x1654793c3970 190 c5f32ac9 vcvtlsi2sd xmm1,xmm1,rcx | |
0x1654793c3974 194 c5f92ec8 vucomisd xmm1,xmm0 | |
0x1654793c3978 198 0f8a57000000 jpe 0x1654793c39d5 <+0x1f5> | |
0x1654793c397e 19e 0f8551000000 jnz 0x1654793c39d5 <+0x1f5> | |
0x1654793c3984 1a4 48895de8 REX.W movq [rbp-0x18],rbx | |
0x1654793c3988 1a8 488b4518 REX.W movq rax,[rbp+0x18] | |
0x1654793c398c 1ac e9bffeffff jmp 0x1654793c3850 <+0x70> | |
-- B14 start (deferred) -- | |
-- B19 start (deferred) -- | |
-- B24 start (deferred) -- | |
-- B25 start (deferred) -- | |
0x1654793c3991 1b1 48c1e620 REX.W shlq rsi, 32 | |
0x1654793c3995 1b5 50 push rax | |
0x1654793c3996 1b6 56 push rsi | |
0x1654793c3997 1b7 48bbc0ca090e01000000 REX.W movq rbx,0x10e09cac0 | |
0x1654793c39a1 1c1 b802000000 movl rax,0x2 | |
0x1654793c39a6 1c6 33f6 xorl rsi,rsi | |
0x1654793c39a8 1c8 e81309f4ff call 0x1654793042c0 ;; code: STUB, CEntryStub, minor: 8 | |
0x1654793c39ad 1cd 48c1e820 REX.W shrq rax, 32 | |
0x1654793c39b1 1d1 e97affffff jmp 0x1654793c3930 <+0x150> | |
0x1654793c39b6 1d6 90 nop | |
0x1654793c39b7 1d7 e8a4060400 call 0x165479404060 ;; deoptimization bailout 0 | |
0x1654793c39bc 1dc e8a4060400 call 0x165479404065 ;; deoptimization bailout 1 | |
0x1654793c39c1 1e1 e8a4060400 call 0x16547940406a ;; deoptimization bailout 2 | |
0x1654793c39c6 1e6 e8a4060400 call 0x16547940406f ;; deoptimization bailout 3 | |
0x1654793c39cb 1eb e8a4060c00 call 0x165479484074 ;; lazy deoptimization bailout 4 | |
0x1654793c39d0 1f0 e8a4060400 call 0x165479404079 ;; deoptimization bailout 5 | |
0x1654793c39d5 1f5 e8a4060400 call 0x16547940407e ;; deoptimization bailout 6 | |
0x1654793c39da 1fa 6690 nop | |
;;; Safepoint table. | |
Source positions: | |
pc offset position | |
15b 14 | |
Inlined functions (count = 0) | |
Deoptimization Input Data (deopt points = 7) | |
index bytecode-offset pc | |
0 0 NA | |
1 0 NA | |
2 0 NA | |
3 0 NA | |
4 0 170 | |
5 0 NA | |
6 0 NA | |
Safepoints (size = 38) | |
0x1654793c3950 170 1eb 00000 (sp -> fp) 4 | |
0x1654793c39ad 1cd NA 00000 (sp -> fp) <none> | |
RelocInfo (size = 319) | |
0x1654793c37ea code target (BUILTIN) (0x165479315220) | |
0x1654793c37ee comment (-- B0 start (construct frame) --) | |
0x1654793c3805 comment (-- B2 start --) | |
0x1654793c3805 comment (-- B3 start --) | |
0x1654793c3849 comment (-- B5 start --) | |
0x1654793c3850 comment (-- B6 start --) | |
0x1654793c3870 comment (-- B7 start (loop up to 14) --) | |
0x1654793c38a2 comment (-- B8 start (in loop 7) --) | |
0x1654793c38ab comment (-- B9 start (in loop 7) --) | |
0x1654793c38be comment (-- B10 start (in loop 7) --) | |
0x1654793c38cc comment (-- B11 start (in loop 7) --) | |
0x1654793c38d2 comment (-- B12 start (in loop 7) --) | |
0x1654793c38d8 comment (-- B13 start (in loop 7) --) | |
0x1654793c38d8 comment (-- B15 start --) | |
0x1654793c38e3 comment (-- B16 start --) | |
0x1654793c38f4 comment (-- B17 start --) | |
0x1654793c3901 comment (-- B18 start --) | |
0x1654793c3901 comment (-- B20 start --) | |
0x1654793c3910 comment (-- B21 start --) | |
0x1654793c3920 comment (-- B22 start --) | |
0x1654793c3929 comment (-- B23 start --) | |
0x1654793c3930 comment (-- B26 start (deconstruct frame) --) | |
0x1654793c393b comment (-- B27 start (no frame) --) | |
0x1654793c393b comment (-- B1 start (deferred) --) | |
0x1654793c393b comment (-- <not inlined:14> --) | |
0x1654793c394c code target (STUB) (0x1654793042c0) | |
0x1654793c3955 comment (-- B4 start (deferred) --) | |
0x1654793c3991 comment (-- B14 start (deferred) --) | |
0x1654793c3991 comment (-- B19 start (deferred) --) | |
0x1654793c3991 comment (-- B24 start (deferred) --) | |
0x1654793c3991 comment (-- B25 start (deferred) --) | |
0x1654793c39a9 code target (STUB) (0x1654793042c0) | |
0x1654793c39b8 runtime entry (deoptimization bailout 0) | |
0x1654793c39bd runtime entry (deoptimization bailout 1) | |
0x1654793c39c2 runtime entry (deoptimization bailout 2) | |
0x1654793c39c7 runtime entry (deoptimization bailout 3) | |
0x1654793c39cc runtime entry | |
0x1654793c39d1 runtime entry (deoptimization bailout 5) | |
0x1654793c39d6 runtime entry (deoptimization bailout 6) | |
0x1654793c39dc comment (;;; Safepoint table.) | |
--- End code --- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment