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

Side by Side Diff: src/objects.cc

Issue 12451003: Make IC patching resilient to flushing of the original target() ic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 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/objects.h ('k') | src/objects-inl.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 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 8786 matching lines...) Expand 10 before | Expand all | Expand 10 after
8797 8797
8798 void Code::FindAllCode(CodeHandleList* code_list, int length) { 8798 void Code::FindAllCode(CodeHandleList* code_list, int length) {
8799 ASSERT(is_inline_cache_stub()); 8799 ASSERT(is_inline_cache_stub());
8800 AssertNoAllocation no_allocation; 8800 AssertNoAllocation no_allocation;
8801 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET); 8801 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET);
8802 int i = 0; 8802 int i = 0;
8803 for (RelocIterator it(this, mask); !it.done(); it.next()) { 8803 for (RelocIterator it(this, mask); !it.done(); it.next()) {
8804 if (i++ == length) return; 8804 if (i++ == length) return;
8805 RelocInfo* info = it.rinfo(); 8805 RelocInfo* info = it.rinfo();
8806 Code* code = Code::GetCodeFromTargetAddress(info->target_address()); 8806 Code* code = Code::GetCodeFromTargetAddress(info->target_address());
8807 ASSERT(code->is_load_stub()); 8807 ASSERT(code->kind() == Code::STUB);
8808 code_list->Add(Handle<Code>(code)); 8808 code_list->Add(Handle<Code>(code));
8809 } 8809 }
8810 UNREACHABLE(); 8810 UNREACHABLE();
8811 } 8811 }
8812 8812
8813 8813
8814 void Code::ClearInlineCaches() { 8814 void Code::ClearInlineCaches() {
8815 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) | 8815 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) |
8816 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) | 8816 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) |
8817 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID) | 8817 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID) |
(...skipping 5278 matching lines...) Expand 10 before | Expand all | Expand 10 after
14096 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 14096 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
14097 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 14097 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
14098 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 14098 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
14099 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 14099 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
14100 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 14100 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
14101 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 14101 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
14102 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 14102 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
14103 } 14103 }
14104 14104
14105 } } // namespace v8::internal 14105 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698