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

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

Issue 14307006: Make it possible to Crankshaft all kinds of stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 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/runtime.cc ('k') | src/spaces.cc » ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool SafepointEntry::HasRegisterAt(int reg_index) const { 52 bool SafepointEntry::HasRegisterAt(int reg_index) const {
53 ASSERT(is_valid()); 53 ASSERT(is_valid());
54 ASSERT(reg_index >= 0 && reg_index < kNumSafepointRegisters); 54 ASSERT(reg_index >= 0 && reg_index < kNumSafepointRegisters);
55 int byte_index = reg_index >> kBitsPerByteLog2; 55 int byte_index = reg_index >> kBitsPerByteLog2;
56 int bit_index = reg_index & (kBitsPerByte - 1); 56 int bit_index = reg_index & (kBitsPerByte - 1);
57 return (bits_[byte_index] & (1 << bit_index)) != 0; 57 return (bits_[byte_index] & (1 << bit_index)) != 0;
58 } 58 }
59 59
60 60
61 SafepointTable::SafepointTable(Code* code) { 61 SafepointTable::SafepointTable(Code* code) {
62 ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION || 62 ASSERT(code->is_crankshafted());
63 code->kind() == Code::COMPILED_STUB);
64 code_ = code; 63 code_ = code;
65 Address header = code->instruction_start() + code->safepoint_table_offset(); 64 Address header = code->instruction_start() + code->safepoint_table_offset();
66 length_ = Memory::uint32_at(header + kLengthOffset); 65 length_ = Memory::uint32_at(header + kLengthOffset);
67 entry_size_ = Memory::uint32_at(header + kEntrySizeOffset); 66 entry_size_ = Memory::uint32_at(header + kEntrySizeOffset);
68 pc_and_deoptimization_indexes_ = header + kHeaderSize; 67 pc_and_deoptimization_indexes_ = header + kHeaderSize;
69 entries_ = pc_and_deoptimization_indexes_ + 68 entries_ = pc_and_deoptimization_indexes_ +
70 (length_ * kPcAndDeoptimizationIndexSize); 69 (length_ * kPcAndDeoptimizationIndexSize);
71 ASSERT(entry_size_ > 0); 70 ASSERT(entry_size_ > 0);
72 STATIC_ASSERT(SafepointEntry::DeoptimizationIndexField::kMax == 71 STATIC_ASSERT(SafepointEntry::DeoptimizationIndexField::kMax ==
73 Safepoint::kNoDeoptimizationIndex); 72 Safepoint::kNoDeoptimizationIndex);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 unsigned index) { 228 unsigned index) {
230 uint32_t encoding = SafepointEntry::DeoptimizationIndexField::encode(index); 229 uint32_t encoding = SafepointEntry::DeoptimizationIndexField::encode(index);
231 encoding |= SafepointEntry::ArgumentsField::encode(info.arguments); 230 encoding |= SafepointEntry::ArgumentsField::encode(info.arguments);
232 encoding |= SafepointEntry::SaveDoublesField::encode(info.has_doubles); 231 encoding |= SafepointEntry::SaveDoublesField::encode(info.has_doubles);
233 return encoding; 232 return encoding;
234 } 233 }
235 234
236 235
237 236
238 } } // namespace v8::internal 237 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698