| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 void Assembler::GetCode(CodeDesc* desc) { | 267 void Assembler::GetCode(CodeDesc* desc) { |
| 268 // finalize code | 268 // finalize code |
| 269 // (at this point overflow() may be true, but the gap ensures that | 269 // (at this point overflow() may be true, but the gap ensures that |
| 270 // we are still not overlapping instructions and relocation info) | 270 // we are still not overlapping instructions and relocation info) |
| 271 ASSERT(pc_ <= reloc_info_writer.pos()); // no overlap | 271 ASSERT(pc_ <= reloc_info_writer.pos()); // no overlap |
| 272 // setup desc | 272 // setup desc |
| 273 desc->buffer = buffer_; | 273 desc->buffer = buffer_; |
| 274 desc->buffer_size = buffer_size_; | 274 desc->buffer_size = buffer_size_; |
| 275 desc->instr_size = pc_offset(); | 275 desc->instr_size = pc_offset(); |
| 276 ASSERT(desc->instr_size > 0); // Zero-size code objects upset the system. |
| 276 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); | 277 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); |
| 277 desc->origin = this; | 278 desc->origin = this; |
| 278 | 279 |
| 279 Counters::reloc_info_size.Increment(desc->reloc_size); | 280 Counters::reloc_info_size.Increment(desc->reloc_size); |
| 280 } | 281 } |
| 281 | 282 |
| 282 | 283 |
| 283 void Assembler::Align(int m) { | 284 void Assembler::Align(int m) { |
| 284 ASSERT(IsPowerOf2(m)); | 285 ASSERT(IsPowerOf2(m)); |
| 285 while ((pc_offset() & (m - 1)) != 0) { | 286 while ((pc_offset() & (m - 1)) != 0) { |
| (...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2123 bool BreakLocationIterator::IsDebugBreakAtReturn() { | 2124 bool BreakLocationIterator::IsDebugBreakAtReturn() { |
| 2124 UNIMPLEMENTED(); | 2125 UNIMPLEMENTED(); |
| 2125 return false; | 2126 return false; |
| 2126 } | 2127 } |
| 2127 | 2128 |
| 2128 void BreakLocationIterator::SetDebugBreakAtReturn() { | 2129 void BreakLocationIterator::SetDebugBreakAtReturn() { |
| 2129 UNIMPLEMENTED(); | 2130 UNIMPLEMENTED(); |
| 2130 } | 2131 } |
| 2131 | 2132 |
| 2132 } } // namespace v8::internal | 2133 } } // namespace v8::internal |
| OLD | NEW |