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

Side by Side Diff: src/objects.cc

Issue 7273066: Simplify EmitCallIC. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 6799 matching lines...) Expand 10 before | Expand all | Expand 10 after
6810 rinfo->IsPatchedReturnSequence()) || 6810 rinfo->IsPatchedReturnSequence()) ||
6811 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && 6811 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) &&
6812 rinfo->IsPatchedDebugBreakSlotSequence())); 6812 rinfo->IsPatchedDebugBreakSlotSequence()));
6813 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address()); 6813 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
6814 Object* old_target = target; 6814 Object* old_target = target;
6815 VisitPointer(&target); 6815 VisitPointer(&target);
6816 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target. 6816 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target.
6817 } 6817 }
6818 6818
6819 6819
6820 StatsCounter* Code::Counter(Isolate* isolate) {
6821 switch (kind()) {
6822 case LOAD_IC: return isolate->counters()->named_load_full();
6823 case KEYED_LOAD_IC: return isolate->counters()->keyed_load_full();
6824 case STORE_IC: return isolate->counters()->named_store_full();
6825 case KEYED_STORE_IC: return isolate->counters()->keyed_store_full();
6826 default: return NULL;
6827 }
6828 }
6829
6830
6820 void Code::InvalidateRelocation() { 6831 void Code::InvalidateRelocation() {
6821 set_relocation_info(heap()->empty_byte_array()); 6832 set_relocation_info(heap()->empty_byte_array());
6822 } 6833 }
6823 6834
6824 6835
6825 void Code::Relocate(intptr_t delta) { 6836 void Code::Relocate(intptr_t delta) {
6826 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { 6837 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) {
6827 it.rinfo()->apply(delta); 6838 it.rinfo()->apply(delta);
6828 } 6839 }
6829 CPU::FlushICache(instruction_start(), instruction_size()); 6840 CPU::FlushICache(instruction_start(), instruction_size());
(...skipping 4820 matching lines...) Expand 10 before | Expand all | Expand 10 after
11650 if (break_point_objects()->IsUndefined()) return 0; 11661 if (break_point_objects()->IsUndefined()) return 0;
11651 // Single beak point. 11662 // Single beak point.
11652 if (!break_point_objects()->IsFixedArray()) return 1; 11663 if (!break_point_objects()->IsFixedArray()) return 1;
11653 // Multiple break points. 11664 // Multiple break points.
11654 return FixedArray::cast(break_point_objects())->length(); 11665 return FixedArray::cast(break_point_objects())->length();
11655 } 11666 }
11656 #endif 11667 #endif
11657 11668
11658 11669
11659 } } // namespace v8::internal 11670 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698