| OLD | NEW |
| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 int deoptimization_index); | 218 int deoptimization_index); |
| 219 | 219 |
| 220 // Update the last safepoint with the size of the code generated until the | 220 // Update the last safepoint with the size of the code generated until the |
| 221 // end of the gap following it. | 221 // end of the gap following it. |
| 222 void SetPcAfterGap(int pc) { | 222 void SetPcAfterGap(int pc) { |
| 223 ASSERT(!deoptimization_info_.is_empty()); | 223 ASSERT(!deoptimization_info_.is_empty()); |
| 224 int index = deoptimization_info_.length() - 1; | 224 int index = deoptimization_info_.length() - 1; |
| 225 deoptimization_info_[index].pc_after_gap = pc; | 225 deoptimization_info_[index].pc_after_gap = pc; |
| 226 } | 226 } |
| 227 | 227 |
| 228 // Get the end pc offset of the last safepoint, including the code generated |
| 229 // until the end of the gap following it. |
| 230 unsigned GetPcAfterGap() { |
| 231 int index = deoptimization_info_.length(); |
| 232 if (index == 0) return 0; |
| 233 return deoptimization_info_[index - 1].pc_after_gap; |
| 234 } |
| 235 |
| 228 // Emit the safepoint table after the body. The number of bits per | 236 // Emit the safepoint table after the body. The number of bits per |
| 229 // entry must be enough to hold all the pointer indexes. | 237 // entry must be enough to hold all the pointer indexes. |
| 230 void Emit(Assembler* assembler, int bits_per_entry); | 238 void Emit(Assembler* assembler, int bits_per_entry); |
| 231 | 239 |
| 232 // Count the number of deoptimization points where the next | 240 // Count the number of deoptimization points where the next |
| 233 // following deoptimization point comes less than limit bytes | 241 // following deoptimization point comes less than limit bytes |
| 234 // after the end of this point's gap. | 242 // after the end of this point's gap. |
| 235 int CountShortDeoptimizationIntervals(unsigned limit); | 243 int CountShortDeoptimizationIntervals(unsigned limit); |
| 236 | 244 |
| 237 private: | 245 private: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 251 | 259 |
| 252 unsigned offset_; | 260 unsigned offset_; |
| 253 bool emitted_; | 261 bool emitted_; |
| 254 | 262 |
| 255 DISALLOW_COPY_AND_ASSIGN(SafepointTableBuilder); | 263 DISALLOW_COPY_AND_ASSIGN(SafepointTableBuilder); |
| 256 }; | 264 }; |
| 257 | 265 |
| 258 } } // namespace v8::internal | 266 } } // namespace v8::internal |
| 259 | 267 |
| 260 #endif // V8_SAFEPOINT_TABLE_H_ | 268 #endif // V8_SAFEPOINT_TABLE_H_ |
| OLD | NEW |