Skip to content

Instantly share code, notes, and snippets.

@mraleph
Created August 15, 2013 08:10
Show Gist options
  • Save mraleph/6239144 to your computer and use it in GitHub Desktop.
Save mraleph/6239144 to your computer and use it in GitHub Desktop.
;;; <@80,#66> -------------------- B5 (loop header) --------------------
;;; <@83,#68> compare-numeric-and-branch
0x598365b8 408 3bc3 cmp eax,ebx
0x598365ba 410 0f8d6f000000 jnl 527 (0x5983662f)
;;; <@88,#75> -------------------- B7 --------------------
;;; <@90,#77> stack-check
0x598365c0 416 3b251c691e09 cmp esp,[0x91e691c]
0x598365c6 422 0f8282000000 jc 558 (0x5983664e)
;;; <@92,#79> check-non-smi
0x598365cc 428 f6c101 test_b cl,0x1
0x598365cf 431 0f84a8000000 jz 605 (0x5983667d)
;;; <@94,#80> check-maps
0x598365d5 437 8179ffc905e13b cmp [ecx+0xff],0x3be105c9 ;; object: 0x3be105c9 <Map(elements=3)>
0x598365dc 444 0f85a0000000 jnz 610 (0x59836682)
;;; <@96,#81> check-prototype-maps
;;; <@98,#82> constant-t
0x598365e2 450 bf8180f040 mov edi,0x40f08081 ;; object: 0x40f08081 <FixedArray[86]>
;;; <@102,#91> -------------------- B8 --------------------
;;; <@104,#93> constant-t
0x598365e7 455 bfb5da602a mov edi,0x2a60dab5 ;; object: 0x2a60dab5 <String[1]: b>
;;; <@106,#101> check-maps
0x598365ec 460 8179ffd904e13b cmp [ecx+0xff],0x3be104d9 ;; object: 0x3be104d9 <Map(elements=3)>
0x598365f3 467 0f840d000000 jz 486 (0x59836606)
0x598365f9 473 8179ffc905e13b cmp [ecx+0xff],0x3be105c9 ;; object: 0x3be105c9 <Map(elements=3)>
0x59836600 480 0f8581000000 jnz 615 (0x59836687)
;;; <@108,#102> store-named-field
0x59836606 486 89790b mov [ecx+0xb],edi
0x59836609 489 8d510b lea edx,[ecx+0xb]
0x5983660c 492 81e70000f0ff and edi,0xfff00000
0x59836612 498 f6470c04 test_b [edi+0xc],0x4
0x59836616 502 7412 jz 522 (0x5983662a)
0x59836618 504 bf0000f0ff mov edi,0xfff00000
0x5983661d 509 23f9 and edi,ecx
0x5983661f 511 f6470c08 test_b [edi+0xc],0x8
0x59836623 515 7405 jz 522 (0x5983662a)
0x59836625 517 e8d6f6ffff call 0x59835d00 ;; code: STUB, RecordWriteStub, minor: 1209
function test(N) {
function A(x) {
this.x = x;
}
A.prototype.get = function () { return this.x; };
A.prototype.set = function (x) { this.x = x; };
var o = new A('a');
for (var i = 0; i < N; i++) {
o.get();
o.set('b');
}
}
test(1);
test(100000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment