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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 355793003: Replace HeapNumber as doublebox with an explicit MutableHeapNumber. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 cmp(object, Operand::StaticVariable(new_space_allocation_top)); 1676 cmp(object, Operand::StaticVariable(new_space_allocation_top));
1677 Check(below, kUndoAllocationOfNonAllocatedMemory); 1677 Check(below, kUndoAllocationOfNonAllocatedMemory);
1678 #endif 1678 #endif
1679 mov(Operand::StaticVariable(new_space_allocation_top), object); 1679 mov(Operand::StaticVariable(new_space_allocation_top), object);
1680 } 1680 }
1681 1681
1682 1682
1683 void MacroAssembler::AllocateHeapNumber(Register result, 1683 void MacroAssembler::AllocateHeapNumber(Register result,
1684 Register scratch1, 1684 Register scratch1,
1685 Register scratch2, 1685 Register scratch2,
1686 Label* gc_required) { 1686 Label* gc_required,
1687 MutableMode mode) {
1687 // Allocate heap number in new space. 1688 // Allocate heap number in new space.
1688 Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required, 1689 Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required,
1689 TAG_OBJECT); 1690 TAG_OBJECT);
1690 1691
1692 Handle<Map> map = mode == MUTABLE
1693 ? isolate()->factory()->mutable_heap_number_map()
1694 : isolate()->factory()->heap_number_map();
1695
1691 // Set the map. 1696 // Set the map.
1692 mov(FieldOperand(result, HeapObject::kMapOffset), 1697 mov(FieldOperand(result, HeapObject::kMapOffset), Immediate(map));
1693 Immediate(isolate()->factory()->heap_number_map()));
1694 } 1698 }
1695 1699
1696 1700
1697 void MacroAssembler::AllocateTwoByteString(Register result, 1701 void MacroAssembler::AllocateTwoByteString(Register result,
1698 Register length, 1702 Register length,
1699 Register scratch1, 1703 Register scratch1,
1700 Register scratch2, 1704 Register scratch2,
1701 Register scratch3, 1705 Register scratch3,
1702 Label* gc_required) { 1706 Label* gc_required) {
1703 // Calculate the number of bytes needed for the characters in the string while 1707 // Calculate the number of bytes needed for the characters in the string while
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
3405 if (ms.shift() > 0) sar(edx, ms.shift()); 3409 if (ms.shift() > 0) sar(edx, ms.shift());
3406 mov(eax, dividend); 3410 mov(eax, dividend);
3407 shr(eax, 31); 3411 shr(eax, 31);
3408 add(edx, eax); 3412 add(edx, eax);
3409 } 3413 }
3410 3414
3411 3415
3412 } } // namespace v8::internal 3416 } } // namespace v8::internal
3413 3417
3414 #endif // V8_TARGET_ARCH_IA32 3418 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698