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

Side by Side Diff: src/safepoint-table.cc

Issue 24791002: Thumb2 Backend: Thumb2 changes for Deoptimization and Code Aging Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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.cc ('k') | src/serialize.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 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 pc_and_deoptimization_indexes_ = header + kHeaderSize; 67 pc_and_deoptimization_indexes_ = header + kHeaderSize;
68 entries_ = pc_and_deoptimization_indexes_ + 68 entries_ = pc_and_deoptimization_indexes_ +
69 (length_ * kPcAndDeoptimizationIndexSize); 69 (length_ * kPcAndDeoptimizationIndexSize);
70 ASSERT(entry_size_ > 0); 70 ASSERT(entry_size_ > 0);
71 STATIC_ASSERT(SafepointEntry::DeoptimizationIndexField::kMax == 71 STATIC_ASSERT(SafepointEntry::DeoptimizationIndexField::kMax ==
72 Safepoint::kNoDeoptimizationIndex); 72 Safepoint::kNoDeoptimizationIndex);
73 } 73 }
74 74
75 75
76 SafepointEntry SafepointTable::FindEntry(Address pc) const { 76 SafepointEntry SafepointTable::FindEntry(Address pc) const {
77 unsigned pc_offset = static_cast<unsigned>(pc - code_->instruction_start()); 77 unsigned pc_offset = static_cast<unsigned>(pc - code_->entry());
78 for (unsigned i = 0; i < length(); i++) { 78 for (unsigned i = 0; i < length(); i++) {
79 // TODO(kasperl): Replace the linear search with binary search. 79 // TODO(kasperl): Replace the linear search with binary search.
80 if (GetPcOffset(i) == pc_offset) return GetEntry(i); 80 if (GetPcOffset(i) == pc_offset) return GetEntry(i);
81 } 81 }
82 return SafepointEntry(); 82 return SafepointEntry();
83 } 83 }
84 84
85 85
86 void SafepointTable::PrintEntry(unsigned index) const { 86 void SafepointTable::PrintEntry(unsigned index) const {
87 disasm::NameConverter converter; 87 disasm::NameConverter converter;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 unsigned index) { 228 unsigned index) {
229 uint32_t encoding = SafepointEntry::DeoptimizationIndexField::encode(index); 229 uint32_t encoding = SafepointEntry::DeoptimizationIndexField::encode(index);
230 encoding |= SafepointEntry::ArgumentsField::encode(info.arguments); 230 encoding |= SafepointEntry::ArgumentsField::encode(info.arguments);
231 encoding |= SafepointEntry::SaveDoublesField::encode(info.has_doubles); 231 encoding |= SafepointEntry::SaveDoublesField::encode(info.has_doubles);
232 return encoding; 232 return encoding;
233 } 233 }
234 234
235 235
236 236
237 } } // namespace v8::internal 237 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698