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

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

Issue 19934006: Simplified large object allocation strategy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/heap.cc ('k') | src/mips/macro-assembler-mips.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 // 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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 } 1241 }
1242 1242
1243 1243
1244 void MacroAssembler::Allocate(int object_size, 1244 void MacroAssembler::Allocate(int object_size,
1245 Register result, 1245 Register result,
1246 Register result_end, 1246 Register result_end,
1247 Register scratch, 1247 Register scratch,
1248 Label* gc_required, 1248 Label* gc_required,
1249 AllocationFlags flags) { 1249 AllocationFlags flags) {
1250 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); 1250 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
1251 ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
1251 if (!FLAG_inline_new) { 1252 if (!FLAG_inline_new) {
1252 if (emit_debug_code()) { 1253 if (emit_debug_code()) {
1253 // Trash the registers to simulate an allocation failure. 1254 // Trash the registers to simulate an allocation failure.
1254 mov(result, Immediate(0x7091)); 1255 mov(result, Immediate(0x7091));
1255 if (result_end.is_valid()) { 1256 if (result_end.is_valid()) {
1256 mov(result_end, Immediate(0x7191)); 1257 mov(result_end, Immediate(0x7191));
1257 } 1258 }
1258 if (scratch.is_valid()) { 1259 if (scratch.is_valid()) {
1259 mov(scratch, Immediate(0x7291)); 1260 mov(scratch, Immediate(0x7291));
1260 } 1261 }
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
3185 j(greater, &no_memento_available); 3186 j(greater, &no_memento_available);
3186 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), 3187 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize),
3187 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map()))); 3188 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map())));
3188 bind(&no_memento_available); 3189 bind(&no_memento_available);
3189 } 3190 }
3190 3191
3191 3192
3192 } } // namespace v8::internal 3193 } } // namespace v8::internal
3193 3194
3194 #endif // V8_TARGET_ARCH_IA32 3195 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698