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

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

Issue 16984002: MIPS: Implement IC support for Constant Function transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 miss_restore_name); 496 miss_restore_name);
497 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { 497 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) {
498 GenerateDictionaryNegativeLookup( 498 GenerateDictionaryNegativeLookup(
499 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); 499 masm, miss_restore_name, holder_reg, name, scratch1, scratch2);
500 } 500 }
501 } 501 }
502 } 502 }
503 503
504 Register storage_reg = name_reg; 504 Register storage_reg = name_reg;
505 505
506 if (FLAG_track_fields && representation.IsSmi()) { 506 if (details.type() == CONSTANT_FUNCTION) {
507 Handle<HeapObject> constant(
508 HeapObject::cast(descriptors->GetValue(descriptor)));
509 __ LoadHeapObject(scratch1, constant);
510 __ Branch(miss_restore_name, ne, value_reg, Operand(scratch1));
511 } else if (FLAG_track_fields && representation.IsSmi()) {
507 __ JumpIfNotSmi(value_reg, miss_restore_name); 512 __ JumpIfNotSmi(value_reg, miss_restore_name);
508 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { 513 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
509 __ JumpIfSmi(value_reg, miss_restore_name); 514 __ JumpIfSmi(value_reg, miss_restore_name);
510 } else if (FLAG_track_double_fields && representation.IsDouble()) { 515 } else if (FLAG_track_double_fields && representation.IsDouble()) {
511 Label do_store, heap_number; 516 Label do_store, heap_number;
512 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); 517 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
513 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); 518 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow);
514 519
515 __ JumpIfNotSmi(value_reg, &heap_number); 520 __ JumpIfNotSmi(value_reg, &heap_number);
516 __ SmiUntag(scratch1, value_reg); 521 __ SmiUntag(scratch1, value_reg);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 // name_reg as scratch register. 558 // name_reg as scratch register.
554 __ RecordWriteField(receiver_reg, 559 __ RecordWriteField(receiver_reg,
555 HeapObject::kMapOffset, 560 HeapObject::kMapOffset,
556 scratch1, 561 scratch1,
557 scratch2, 562 scratch2,
558 kRAHasNotBeenSaved, 563 kRAHasNotBeenSaved,
559 kDontSaveFPRegs, 564 kDontSaveFPRegs,
560 OMIT_REMEMBERED_SET, 565 OMIT_REMEMBERED_SET,
561 OMIT_SMI_CHECK); 566 OMIT_SMI_CHECK);
562 567
568 if (details.type() == CONSTANT_FUNCTION) return;
569
563 int index = transition->instance_descriptors()->GetFieldIndex( 570 int index = transition->instance_descriptors()->GetFieldIndex(
564 transition->LastAdded()); 571 transition->LastAdded());
565 572
566 // Adjust for the number of properties stored in the object. Even in the 573 // Adjust for the number of properties stored in the object. Even in the
567 // face of a transition we can use the old map here because the size of the 574 // face of a transition we can use the old map here because the size of the
568 // object and the number of in-object properties is not going to change. 575 // object and the number of in-object properties is not going to change.
569 index -= object->map()->inobject_properties(); 576 index -= object->map()->inobject_properties();
570 577
571 // TODO(verwaest): Share this code as a code stub. 578 // TODO(verwaest): Share this code as a code stub.
572 SmiCheck smi_check = representation.IsTagged() 579 SmiCheck smi_check = representation.IsTagged()
(...skipping 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after
3734 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3741 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3735 } 3742 }
3736 } 3743 }
3737 3744
3738 3745
3739 #undef __ 3746 #undef __
3740 3747
3741 } } // namespace v8::internal 3748 } } // namespace v8::internal
3742 3749
3743 #endif // V8_TARGET_ARCH_MIPS 3750 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698