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

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

Issue 211333002: Replace HeapNumber as doublebox with an explicit MutableHeapNumber. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 cmp(object, Operand::StaticVariable(new_space_allocation_top)); 1814 cmp(object, Operand::StaticVariable(new_space_allocation_top));
1815 Check(below, kUndoAllocationOfNonAllocatedMemory); 1815 Check(below, kUndoAllocationOfNonAllocatedMemory);
1816 #endif 1816 #endif
1817 mov(Operand::StaticVariable(new_space_allocation_top), object); 1817 mov(Operand::StaticVariable(new_space_allocation_top), object);
1818 } 1818 }
1819 1819
1820 1820
1821 void MacroAssembler::AllocateHeapNumber(Register result, 1821 void MacroAssembler::AllocateHeapNumber(Register result,
1822 Register scratch1, 1822 Register scratch1,
1823 Register scratch2, 1823 Register scratch2,
1824 Label* gc_required) { 1824 Label* gc_required,
1825 MutableMode mode) {
1825 // Allocate heap number in new space. 1826 // Allocate heap number in new space.
1826 Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required, 1827 Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required,
1827 TAG_OBJECT); 1828 TAG_OBJECT);
1828 1829
1830 Handle<Map> map = mode == MUTABLE
1831 ? isolate()->factory()->mutable_heap_number_map()
1832 : isolate()->factory()->heap_number_map();
1833
1829 // Set the map. 1834 // Set the map.
1830 mov(FieldOperand(result, HeapObject::kMapOffset), 1835 mov(FieldOperand(result, HeapObject::kMapOffset), Immediate(map));
1831 Immediate(isolate()->factory()->heap_number_map()));
1832 } 1836 }
1833 1837
1834 1838
1835 void MacroAssembler::AllocateTwoByteString(Register result, 1839 void MacroAssembler::AllocateTwoByteString(Register result,
1836 Register length, 1840 Register length,
1837 Register scratch1, 1841 Register scratch1,
1838 Register scratch2, 1842 Register scratch2,
1839 Register scratch3, 1843 Register scratch3,
1840 Label* gc_required) { 1844 Label* gc_required) {
1841 // Calculate the number of bytes needed for the characters in the string while 1845 // Calculate the number of bytes needed for the characters in the string while
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 if (ms.shift() > 0) sar(edx, ms.shift()); 3650 if (ms.shift() > 0) sar(edx, ms.shift());
3647 mov(eax, dividend); 3651 mov(eax, dividend);
3648 shr(eax, 31); 3652 shr(eax, 31);
3649 add(edx, eax); 3653 add(edx, eax);
3650 } 3654 }
3651 3655
3652 3656
3653 } } // namespace v8::internal 3657 } } // namespace v8::internal
3654 3658
3655 #endif // V8_TARGET_ARCH_IA32 3659 #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') | src/json-parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698