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

Side by Side Diff: src/arm64/codegen-arm64.cc

Issue 228643002: Make new space iterable when transitioning double array to objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Replace Smi(0) with one-map-filler 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
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/ia32/codegen-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 __ Add(dst_end, dst_elements, Operand(length, LSL, kPointerSizeLog2)); 317 __ Add(dst_end, dst_elements, Operand(length, LSL, kPointerSizeLog2));
318 318
319 Register the_hole = x14; 319 Register the_hole = x14;
320 Register heap_num_map = x15; 320 Register heap_num_map = x15;
321 __ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex); 321 __ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex);
322 __ LoadRoot(heap_num_map, Heap::kHeapNumberMapRootIndex); 322 __ LoadRoot(heap_num_map, Heap::kHeapNumberMapRootIndex);
323 323
324 Label entry; 324 Label entry;
325 __ B(&entry); 325 __ B(&entry);
326 326
327 Label gc_cleanup;
328 __ Bind(&gc_cleanup);
329 #ifdef VERIFY_HEAP
330 // Make sure new space is iterable if we are verifying the heap.
331 __ Mov(x5, Operand(masm->isolate()->factory()->one_pointer_filler_map()));
332 __ Str(x5, MemOperand(dst_elements, kPointerSize, PostIndex));
333 __ Cmp(dst_elements, dst_end);
334 __ B(lt, &gc_cleanup);
335 #endif
336
327 // Call into runtime if GC is required. 337 // Call into runtime if GC is required.
328 __ Bind(&gc_required); 338 __ Bind(&gc_required);
329 __ Pop(value, key, receiver, target_map); 339 __ Pop(value, key, receiver, target_map);
330 __ Pop(lr); 340 __ Pop(lr);
331 __ B(fail); 341 __ B(fail);
332 342
333 { 343 {
334 Label loop, convert_hole; 344 Label loop, convert_hole;
335 __ Bind(&loop); 345 __ Bind(&loop);
336 __ Ldr(x13, MemOperand(src_elements, kPointerSize, PostIndex)); 346 __ Ldr(x13, MemOperand(src_elements, kPointerSize, PostIndex));
337 __ Cmp(x13, kHoleNanInt64); 347 __ Cmp(x13, kHoleNanInt64);
338 __ B(eq, &convert_hole); 348 __ B(eq, &convert_hole);
339 349
340 // Non-hole double, copy value into a heap number. 350 // Non-hole double, copy value into a heap number.
341 Register heap_num = x5; 351 Register heap_num = x5;
342 __ AllocateHeapNumber(heap_num, &gc_required, x6, x4, 352 __ AllocateHeapNumber(heap_num, &gc_cleanup, x6, x4,
343 x13, heap_num_map); 353 x13, heap_num_map);
344 __ Mov(x13, dst_elements); 354 __ Mov(x13, dst_elements);
345 __ Str(heap_num, MemOperand(dst_elements, kPointerSize, PostIndex)); 355 __ Str(heap_num, MemOperand(dst_elements, kPointerSize, PostIndex));
346 __ RecordWrite(array, x13, heap_num, kLRHasBeenSaved, kDontSaveFPRegs, 356 __ RecordWrite(array, x13, heap_num, kLRHasBeenSaved, kDontSaveFPRegs,
347 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 357 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
348 358
349 __ B(&entry); 359 __ B(&entry);
350 360
351 // Replace the-hole NaN with the-hole pointer. 361 // Replace the-hole NaN with the-hole pointer.
352 __ Bind(&convert_hole); 362 __ Bind(&convert_hole);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 __ Fmul(result, double_temp3, double_temp1); 616 __ Fmul(result, double_temp3, double_temp1);
607 617
608 __ Bind(&done); 618 __ Bind(&done);
609 } 619 }
610 620
611 #undef __ 621 #undef __
612 622
613 } } // namespace v8::internal 623 } } // namespace v8::internal
614 624
615 #endif // V8_TARGET_ARCH_ARM64 625 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698