Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 6597104: Move IncrementalRecordWrite to a stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1491
1492 // Check if value is a smi. 1492 // Check if value is a smi.
1493 __ test(ecx, Immediate(kSmiTagMask)); 1493 __ test(ecx, Immediate(kSmiTagMask));
1494 __ j(not_zero, &with_write_barrier); 1494 __ j(not_zero, &with_write_barrier);
1495 1495
1496 __ bind(&exit); 1496 __ bind(&exit);
1497 __ ret((argc + 1) * kPointerSize); 1497 __ ret((argc + 1) * kPointerSize);
1498 1498
1499 __ bind(&with_write_barrier); 1499 __ bind(&with_write_barrier);
1500 1500
1501 __ IncrementalMarkingRecordWrite(ebx, ecx, edx); 1501 __ IncrementalMarkingRecordWrite(
1502 ebx, ecx, edx, OMIT_SMI_CHECK, PRESERVE_OBJECT, DESTROY_VALUE, PRESERV E_SCRATCH);
1502 1503
1503 __ InNewSpace(ebx, ecx, equal, &exit); 1504 __ InNewSpace(ebx, ecx, equal, &exit);
1504 1505
1505 __ RecordWriteHelper(ebx, edx, ecx, kDontSaveFPRegs); 1506 __ RecordWriteHelper(ebx, edx, ecx, kDontSaveFPRegs);
1506 __ ret((argc + 1) * kPointerSize); 1507 __ ret((argc + 1) * kPointerSize);
1507 1508
1508 __ bind(&attempt_to_grow_elements); 1509 __ bind(&attempt_to_grow_elements);
1509 if (!FLAG_inline_new) { 1510 if (!FLAG_inline_new) {
1510 __ jmp(&call_builtin); 1511 __ jmp(&call_builtin);
1511 } 1512 }
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 __ cmp(cell_operand, Factory::the_hole_value()); 2597 __ cmp(cell_operand, Factory::the_hole_value());
2597 __ j(equal, &miss); 2598 __ j(equal, &miss);
2598 2599
2599 // Store the value in the cell. 2600 // Store the value in the cell.
2600 __ mov(cell_operand, eax); 2601 __ mov(cell_operand, eax);
2601 Label done; 2602 Label done;
2602 __ test(eax, Immediate(kSmiTagMask)); 2603 __ test(eax, Immediate(kSmiTagMask));
2603 __ j(zero, &done); 2604 __ j(zero, &done);
2604 2605
2605 __ mov(ecx, eax); 2606 __ mov(ecx, eax);
2606 __ IncrementalMarkingRecordWrite(ebx, ecx, edx); 2607 __ IncrementalMarkingRecordWrite(ebx, ecx, edx, INLINE_SMI_CHECK, DESTROY_OBJE CT, DESTROY_VALUE, DESTROY_SCRATCH);
2607 2608
2608 // Return the value (register eax). 2609 // Return the value (register eax).
2609 __ bind(&done); 2610 __ bind(&done);
2610 2611
2611 // Return the value (register eax). 2612 // Return the value (register eax).
2612 __ IncrementCounter(&Counters::named_store_global_inline, 1); 2613 __ IncrementCounter(&Counters::named_store_global_inline, 1);
2613 __ ret(0); 2614 __ ret(0);
2614 2615
2615 // Handle store cache miss. 2616 // Handle store cache miss.
2616 __ bind(&miss); 2617 __ bind(&miss);
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3724 3725
3725 return GetCode(flags); 3726 return GetCode(flags);
3726 } 3727 }
3727 3728
3728 3729
3729 #undef __ 3730 #undef __
3730 3731
3731 } } // namespace v8::internal 3732 } } // namespace v8::internal
3732 3733
3733 #endif // V8_TARGET_ARCH_IA32 3734 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698