| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // Called by Code::CodePrint. | 333 // Called by Code::CodePrint. |
| 334 void Disassembler::Decode(FILE* f, Code* code) { | 334 void Disassembler::Decode(FILE* f, Code* code) { |
| 335 Isolate* isolate = code->GetIsolate(); | 335 Isolate* isolate = code->GetIsolate(); |
| 336 int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION || | 336 int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION || |
| 337 code->kind() == Code::COMPILED_STUB) | 337 code->kind() == Code::COMPILED_STUB) |
| 338 ? static_cast<int>(code->safepoint_table_offset()) | 338 ? static_cast<int>(code->safepoint_table_offset()) |
| 339 : code->instruction_size(); | 339 : code->instruction_size(); |
| 340 // If there might be a stack check table, stop before reaching it. | 340 // If there might be a stack check table, stop before reaching it. |
| 341 if (code->kind() == Code::FUNCTION) { | 341 if (code->kind() == Code::FUNCTION) { |
| 342 decode_size = | 342 decode_size = |
| 343 Min(decode_size, static_cast<int>(code->stack_check_table_offset())); | 343 Min(decode_size, static_cast<int>(code->back_edge_table_offset())); |
| 344 } | 344 } |
| 345 | 345 |
| 346 byte* begin = code->instruction_start(); | 346 byte* begin = code->instruction_start(); |
| 347 byte* end = begin + decode_size; | 347 byte* end = begin + decode_size; |
| 348 V8NameConverter v8NameConverter(code); | 348 V8NameConverter v8NameConverter(code); |
| 349 DecodeIt(isolate, f, v8NameConverter, begin, end); | 349 DecodeIt(isolate, f, v8NameConverter, begin, end); |
| 350 } | 350 } |
| 351 | 351 |
| 352 #else // ENABLE_DISASSEMBLER | 352 #else // ENABLE_DISASSEMBLER |
| 353 | 353 |
| 354 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} | 354 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} |
| 355 int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) { | 355 int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) { |
| 356 return 0; | 356 return 0; |
| 357 } | 357 } |
| 358 void Disassembler::Decode(FILE* f, Code* code) {} | 358 void Disassembler::Decode(FILE* f, Code* code) {} |
| 359 | 359 |
| 360 #endif // ENABLE_DISASSEMBLER | 360 #endif // ENABLE_DISASSEMBLER |
| 361 | 361 |
| 362 } } // namespace v8::internal | 362 } } // namespace v8::internal |
| OLD | NEW |