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

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

Issue 4164002: Port some GC fixes from the bleeding edge to the 2.2 branch. These are:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.2/
Patch Set: Created 10 years, 1 month 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/arm/ic-arm.cc ('k') | src/handles.h » ('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 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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 bind(&same_contexts); 949 bind(&same_contexts);
950 } 950 }
951 951
952 952
953 void MacroAssembler::AllocateInNewSpace(int object_size, 953 void MacroAssembler::AllocateInNewSpace(int object_size,
954 Register result, 954 Register result,
955 Register scratch1, 955 Register scratch1,
956 Register scratch2, 956 Register scratch2,
957 Label* gc_required, 957 Label* gc_required,
958 AllocationFlags flags) { 958 AllocationFlags flags) {
959 if (!FLAG_inline_new) {
960 if (FLAG_debug_code) {
961 // Trash the registers to simulate an allocation failure.
962 mov(result, Operand(0x7091));
963 mov(scratch1, Operand(0x7191));
964 mov(scratch2, Operand(0x7291));
965 }
966 jmp(gc_required);
967 return;
968 }
969
959 ASSERT(!result.is(scratch1)); 970 ASSERT(!result.is(scratch1));
960 ASSERT(!scratch1.is(scratch2)); 971 ASSERT(!scratch1.is(scratch2));
961 972
962 // Make object size into bytes. 973 // Make object size into bytes.
963 if ((flags & SIZE_IN_WORDS) != 0) { 974 if ((flags & SIZE_IN_WORDS) != 0) {
964 object_size *= kPointerSize; 975 object_size *= kPointerSize;
965 } 976 }
966 ASSERT_EQ(0, object_size & kObjectAlignmentMask); 977 ASSERT_EQ(0, object_size & kObjectAlignmentMask);
967 978
968 // Load address of new object into result and allocation top address into 979 // Load address of new object into result and allocation top address into
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 } 1011 }
1001 } 1012 }
1002 1013
1003 1014
1004 void MacroAssembler::AllocateInNewSpace(Register object_size, 1015 void MacroAssembler::AllocateInNewSpace(Register object_size,
1005 Register result, 1016 Register result,
1006 Register scratch1, 1017 Register scratch1,
1007 Register scratch2, 1018 Register scratch2,
1008 Label* gc_required, 1019 Label* gc_required,
1009 AllocationFlags flags) { 1020 AllocationFlags flags) {
1021 if (!FLAG_inline_new) {
1022 if (FLAG_debug_code) {
1023 // Trash the registers to simulate an allocation failure.
1024 mov(result, Operand(0x7091));
1025 mov(scratch1, Operand(0x7191));
1026 mov(scratch2, Operand(0x7291));
1027 }
1028 jmp(gc_required);
1029 return;
1030 }
1031
1010 ASSERT(!result.is(scratch1)); 1032 ASSERT(!result.is(scratch1));
1011 ASSERT(!scratch1.is(scratch2)); 1033 ASSERT(!scratch1.is(scratch2));
1012 1034
1013 // Load address of new object into result and allocation top address into 1035 // Load address of new object into result and allocation top address into
1014 // scratch1. 1036 // scratch1.
1015 ExternalReference new_space_allocation_top = 1037 ExternalReference new_space_allocation_top =
1016 ExternalReference::new_space_allocation_top_address(); 1038 ExternalReference::new_space_allocation_top_address();
1017 mov(scratch1, Operand(new_space_allocation_top)); 1039 mov(scratch1, Operand(new_space_allocation_top));
1018 if ((flags & RESULT_CONTAINS_TOP) == 0) { 1040 if ((flags & RESULT_CONTAINS_TOP) == 0) {
1019 ldr(result, MemOperand(scratch1)); 1041 ldr(result, MemOperand(scratch1));
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1852 1874
1853 void CodePatcher::Emit(Address addr) { 1875 void CodePatcher::Emit(Address addr) {
1854 masm()->emit(reinterpret_cast<Instr>(addr)); 1876 masm()->emit(reinterpret_cast<Instr>(addr));
1855 } 1877 }
1856 #endif // ENABLE_DEBUGGER_SUPPORT 1878 #endif // ENABLE_DEBUGGER_SUPPORT
1857 1879
1858 1880
1859 } } // namespace v8::internal 1881 } } // namespace v8::internal
1860 1882
1861 #endif // V8_TARGET_ARCH_ARM 1883 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698