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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 14996004: Track heap objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/lithium-codegen-arm.cc ('k') | src/flag-definitions.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 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 GenerateDictionaryNegativeLookup( 509 GenerateDictionaryNegativeLookup(
510 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); 510 masm, miss_restore_name, holder_reg, name, scratch1, scratch2);
511 } 511 }
512 } 512 }
513 } 513 }
514 514
515 Register storage_reg = name_reg; 515 Register storage_reg = name_reg;
516 516
517 if (FLAG_track_fields && representation.IsSmi()) { 517 if (FLAG_track_fields && representation.IsSmi()) {
518 __ JumpIfNotSmi(value_reg, miss_restore_name); 518 __ JumpIfNotSmi(value_reg, miss_restore_name);
519 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
520 __ JumpIfSmi(value_reg, miss_restore_name);
519 } else if (FLAG_track_double_fields && representation.IsDouble()) { 521 } else if (FLAG_track_double_fields && representation.IsDouble()) {
520 Label do_store, heap_number; 522 Label do_store, heap_number;
521 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); 523 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
522 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); 524 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow);
523 525
524 __ JumpIfNotSmi(value_reg, &heap_number); 526 __ JumpIfNotSmi(value_reg, &heap_number);
525 __ SmiUntag(scratch1, value_reg); 527 __ SmiUntag(scratch1, value_reg);
526 __ vmov(s0, scratch1); 528 __ vmov(s0, scratch1);
527 __ vcvt_f64_s32(d0, s0); 529 __ vcvt_f64_s32(d0, s0);
528 __ jmp(&do_store); 530 __ jmp(&do_store);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 680
679 // Adjust for the number of properties stored in the object. Even in the 681 // Adjust for the number of properties stored in the object. Even in the
680 // face of a transition we can use the old map here because the size of the 682 // face of a transition we can use the old map here because the size of the
681 // object and the number of in-object properties is not going to change. 683 // object and the number of in-object properties is not going to change.
682 index -= object->map()->inobject_properties(); 684 index -= object->map()->inobject_properties();
683 685
684 Representation representation = lookup->representation(); 686 Representation representation = lookup->representation();
685 ASSERT(!representation.IsNone()); 687 ASSERT(!representation.IsNone());
686 if (FLAG_track_fields && representation.IsSmi()) { 688 if (FLAG_track_fields && representation.IsSmi()) {
687 __ JumpIfNotSmi(value_reg, miss_label); 689 __ JumpIfNotSmi(value_reg, miss_label);
690 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
691 __ JumpIfSmi(value_reg, miss_label);
688 } else if (FLAG_track_double_fields && representation.IsDouble()) { 692 } else if (FLAG_track_double_fields && representation.IsDouble()) {
689 // Load the double storage. 693 // Load the double storage.
690 if (index < 0) { 694 if (index < 0) {
691 int offset = object->map()->instance_size() + (index * kPointerSize); 695 int offset = object->map()->instance_size() + (index * kPointerSize);
692 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset)); 696 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset));
693 } else { 697 } else {
694 __ ldr(scratch1, 698 __ ldr(scratch1,
695 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); 699 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset));
696 int offset = index * kPointerSize + FixedArray::kHeaderSize; 700 int offset = index * kPointerSize + FixedArray::kHeaderSize;
697 __ ldr(scratch1, FieldMemOperand(scratch1, offset)); 701 __ ldr(scratch1, FieldMemOperand(scratch1, offset));
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after
3773 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3777 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3774 } 3778 }
3775 } 3779 }
3776 3780
3777 3781
3778 #undef __ 3782 #undef __
3779 3783
3780 } } // namespace v8::internal 3784 } } // namespace v8::internal
3781 3785
3782 #endif // V8_TARGET_ARCH_ARM 3786 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698