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

Side by Side Diff: src/disassembler.cc

Issue 6606006: [Isolates] Merge 6500:6700 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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/deoptimizer.cc ('k') | src/extensions/experimental/i18n-extension.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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { 308 int Disassembler::Decode(FILE* f, byte* begin, byte* end) {
309 V8NameConverter defaultConverter(NULL); 309 V8NameConverter defaultConverter(NULL);
310 return DecodeIt(f, defaultConverter, begin, end); 310 return DecodeIt(f, defaultConverter, begin, end);
311 } 311 }
312 312
313 313
314 // Called by Code::CodePrint. 314 // Called by Code::CodePrint.
315 void Disassembler::Decode(FILE* f, Code* code) { 315 void Disassembler::Decode(FILE* f, Code* code) {
316 int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION) 316 int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION)
317 ? static_cast<int>(code->safepoint_table_start()) 317 ? static_cast<int>(code->safepoint_table_offset())
318 : code->instruction_size(); 318 : code->instruction_size();
319 // If there might be a stack check table, stop before reaching it. 319 // If there might be a stack check table, stop before reaching it.
320 if (code->kind() == Code::FUNCTION) { 320 if (code->kind() == Code::FUNCTION) {
321 decode_size = 321 decode_size =
322 Min(decode_size, static_cast<int>(code->stack_check_table_start())); 322 Min(decode_size, static_cast<int>(code->stack_check_table_offset()));
323 } 323 }
324 324
325 byte* begin = code->instruction_start(); 325 byte* begin = code->instruction_start();
326 byte* end = begin + decode_size; 326 byte* end = begin + decode_size;
327 V8NameConverter v8NameConverter(code); 327 V8NameConverter v8NameConverter(code);
328 DecodeIt(f, v8NameConverter, begin, end); 328 DecodeIt(f, v8NameConverter, begin, end);
329 } 329 }
330 330
331 #else // ENABLE_DISASSEMBLER 331 #else // ENABLE_DISASSEMBLER
332 332
333 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} 333 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {}
334 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; } 334 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; }
335 void Disassembler::Decode(FILE* f, Code* code) {} 335 void Disassembler::Decode(FILE* f, Code* code) {}
336 336
337 #endif // ENABLE_DISASSEMBLER 337 #endif // ENABLE_DISASSEMBLER
338 338
339 } } // namespace v8::internal 339 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/extensions/experimental/i18n-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698