Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Assembly listings for the 3 javascript functions when optimized by V8:
- function undef(a) {
- return a === undefined;
- }
- function void0(a) {
- return a === void 0;
- }
- var b;
- function minified(a) {
- return a === b;
- }
- --- Raw source ---
- (a) {
- return a === undefined;
- }
- --- Optimized code ---
- kind = OPTIMIZED_FUNCTION
- name = undef
- stack_slots = 1
- Instructions (size = 82)
- 0ED33320 0 55 push ebp
- 0ED33321 1 89e5 mov ebp,esp
- 0ED33323 3 56 push esi
- 0ED33324 4 57 push edi
- 0ED33325 5 6a00 push 0x0
- ;;; <@0,#0> -------------------- B0 --------------------
- ;;; <@2,#1> context
- 0ED33327 7 8b75fc mov esi,[ebp-4]
- ;;; <@10,#8> -------------------- B1 --------------------
- ;;; <@12,#10> stack-check
- 0ED3332A 10 3b2518497300 cmp esp,[0x00734918]
- 0ED33330 16 7305 jnc 23 (0ED33337)
- 0ED33332 18 e82985feff call StackCheck (0ED1B860) ;; code: BUILTIN
- ;;; <@14,#12> gap
- 0ED33337 23 8b4508 mov eax,[ebp+8]
- ;;; <@15,#12> cmp-object-eq-and-branch
- 0ED3333A 26 3d9180e004 cmp eax, 0x04e08091 ;; object: 04E08091 <undefined>
- 0ED3333F 31 0f840a000000 jz 47 (0ED3334F)
- ;;; <@16,#18> -------------------- B2 --------------------
- ;;; <@18,#20> gap
- 0ED33345 37 b8c180e004 mov eax,0x04e080c1 ;; object: 04E080C1 <false>
- ;;; <@19,#20> goto
- 0ED3334A 42 e905000000 jmp 52 (0ED33354)
- ;;; <@20,#15> -------------------- B3 --------------------
- ;;; <@22,#17> gap
- 0ED3334F 47 b8b180e004 mov eax,0x04e080b1 ;; object: 04E080B1 <true>
- ;;; <@24,#22> -------------------- B4 --------------------
- ;;; <@26,#24> return
- 0ED33354 52 89ec mov esp,ebp
- 0ED33356 54 5d pop ebp
- 0ED33357 55 c20800 ret 0x8
- 0ED3335A 58 90 nop
- 0ED3335B 59 90 nop
- 0ED3335C 60 90 nop
- 0ED3335D 61 90 nop
- 0ED3335E 62 90 nop
- 0ED3335F 63 90 nop
- --- Raw source ---
- (a) {
- return a === b;
- }
- --- Optimized code ---
- kind = OPTIMIZED_FUNCTION
- name = minified
- stack_slots = 2
- Instructions (size = 108)
- 0ED33260 0 55 push ebp
- 0ED33261 1 89e5 mov ebp,esp
- 0ED33263 3 56 push esi
- 0ED33264 4 57 push edi
- 0ED33265 5 83ec08 sub esp,0x8
- ;;; Store dynamic frame alignment tag for spilled doubles
- 0ED33268 8 c745f400000000 mov [ebp-12],0x0
- ;;; <@0,#0> -------------------- B0 --------------------
- ;;; <@2,#1> context
- 0ED3326F 15 8b45fc mov eax,[ebp-4]
- ;;; <@3,#1> gap
- 0ED33272 18 8945f0 mov [ebp-16],eax
- ;;; <@10,#8> -------------------- B1 --------------------
- ;;; <@11,#8> gap
- 0ED33275 21 89c6 mov esi,eax
- ;;; <@12,#10> stack-check
- 0ED33277 23 3b2518497300 cmp esp,[0x00734918]
- 0ED3327D 29 7305 jnc 36 (0ED33284)
- 0ED3327F 31 e8dc85feff call StackCheck (0ED1B860) ;; code: BUILTIN
- ;;; <@13,#10> gap
- 0ED33284 36 8b75f0 mov esi,[ebp-16]
- ;;; <@14,#12> load-context-slot
- 0ED33287 39 8b4617 mov eax,[esi+23]
- ;;; <@15,#12> gap
- 0ED3328A 42 8b5508 mov edx,[ebp+8]
- ;;; <@16,#13> cmp-t
- 0ED3328D 45 e80edefdff call 0x0ed110a0 ;; debug: position 202
- ;; code: COMPARE_IC, UNINITIALIZED
- 0ED33292 50 90 nop
- 0ED33293 51 85c0 test eax,eax
- 0ED33295 53 7407 jz 62 (0ED3329E)
- 0ED33297 55 b8c180e004 mov eax,0x04e080c1 ;; object: 04E080C1 <false>
- 0ED3329C 60 eb05 jmp 67 (0ED332A3)
- 0ED3329E 62 b8b180e004 mov eax,0x04e080b1 ;; object: 04E080B1 <true>
- ;;; <@18,#14> lazy-bailout
- ;;; <@20,#16> return
- 0ED332A3 67 89ec mov esp,ebp
- 0ED332A5 69 5d pop ebp
- 0ED332A6 70 c20800 ret 0x8
- 0ED332A9 73 90 nop
- 0ED332AA 74 90 nop
- 0ED332AB 75 90 nop
- 0ED332AC 76 90 nop
- 0ED332AD 77 90 nop
- 0ED332AE 78 66 nop
- 0ED332AF 79 90 nop
- --- Raw source ---
- (a) {
- return a === void 0;
- }
- --- Optimized code ---
- kind = OPTIMIZED_FUNCTION
- name = void0
- stack_slots = 1
- Instructions (size = 82)
- 0ED331C0 0 55 push ebp
- 0ED331C1 1 89e5 mov ebp,esp
- 0ED331C3 3 56 push esi
- 0ED331C4 4 57 push edi
- 0ED331C5 5 6a00 push 0x0
- ;;; <@0,#0> -------------------- B0 --------------------
- ;;; <@2,#1> context
- 0ED331C7 7 8b75fc mov esi,[ebp-4]
- ;;; <@10,#8> -------------------- B1 --------------------
- ;;; <@12,#10> stack-check
- 0ED331CA 10 3b2518497300 cmp esp,[0x00734918]
- 0ED331D0 16 7305 jnc 23 (0ED331D7)
- 0ED331D2 18 e88986feff call StackCheck (0ED1B860) ;; code: BUILTIN
- ;;; <@14,#12> gap
- 0ED331D7 23 8b4508 mov eax,[ebp+8]
- ;;; <@15,#12> cmp-object-eq-and-branch
- 0ED331DA 26 3d9180e004 cmp eax, 0x04e08091 ;; object: 04E08091 <undefined>
- 0ED331DF 31 0f840a000000 jz 47 (0ED331EF)
- ;;; <@16,#18> -------------------- B2 --------------------
- ;;; <@18,#20> gap
- 0ED331E5 37 b8c180e004 mov eax,0x04e080c1 ;; object: 04E080C1 <false>
- ;;; <@19,#20> goto
- 0ED331EA 42 e905000000 jmp 52 (0ED331F4)
- ;;; <@20,#15> -------------------- B3 --------------------
- ;;; <@22,#17> gap
- 0ED331EF 47 b8b180e004 mov eax,0x04e080b1 ;; object: 04E080B1 <true>
- ;;; <@24,#22> -------------------- B4 --------------------
- ;;; <@26,#24> return
- 0ED331F4 52 89ec mov esp,ebp
- 0ED331F6 54 5d pop ebp
- 0ED331F7 55 c20800 ret 0x8
- 0ED331FA 58 90 nop
- 0ED331FB 59 90 nop
- 0ED331FC 60 90 nop
- 0ED331FD 61 90 nop
- 0ED331FE 62 90 nop
- 0ED331FF 63 90 nop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement