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

Side by Side Diff: src/disassembler.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/deoptimizer.cc ('k') | src/factory.h » ('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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) { 326 int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) {
327 V8NameConverter defaultConverter(NULL); 327 V8NameConverter defaultConverter(NULL);
328 return DecodeIt(isolate, f, defaultConverter, begin, end); 328 return DecodeIt(isolate, f, defaultConverter, begin, end);
329 } 329 }
330 330
331 331
332 // Called by Code::CodePrint. 332 // Called by Code::CodePrint.
333 void Disassembler::Decode(FILE* f, Code* code) { 333 void Disassembler::Decode(FILE* f, Code* code) {
334 Isolate* isolate = code->GetIsolate(); 334 Isolate* isolate = code->GetIsolate();
335 int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION || 335 int decode_size = code->is_crankshafted()
336 code->kind() == Code::COMPILED_STUB)
337 ? static_cast<int>(code->safepoint_table_offset()) 336 ? static_cast<int>(code->safepoint_table_offset())
338 : code->instruction_size(); 337 : code->instruction_size();
339 // If there might be a back edge table, stop before reaching it. 338 // If there might be a back edge table, stop before reaching it.
340 if (code->kind() == Code::FUNCTION) { 339 if (code->kind() == Code::FUNCTION) {
341 decode_size = 340 decode_size =
342 Min(decode_size, static_cast<int>(code->back_edge_table_offset())); 341 Min(decode_size, static_cast<int>(code->back_edge_table_offset()));
343 } 342 }
344 343
345 byte* begin = code->instruction_start(); 344 byte* begin = code->instruction_start();
346 byte* end = begin + decode_size; 345 byte* end = begin + decode_size;
347 V8NameConverter v8NameConverter(code); 346 V8NameConverter v8NameConverter(code);
348 DecodeIt(isolate, f, v8NameConverter, begin, end); 347 DecodeIt(isolate, f, v8NameConverter, begin, end);
349 } 348 }
350 349
351 #else // ENABLE_DISASSEMBLER 350 #else // ENABLE_DISASSEMBLER
352 351
353 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} 352 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {}
354 int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) { 353 int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) {
355 return 0; 354 return 0;
356 } 355 }
357 void Disassembler::Decode(FILE* f, Code* code) {} 356 void Disassembler::Decode(FILE* f, Code* code) {}
358 357
359 #endif // ENABLE_DISASSEMBLER 358 #endif // ENABLE_DISASSEMBLER
360 359
361 } } // namespace v8::internal 360 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698