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

Side by Side Diff: src/disassembler.cc

Issue 13811014: Fix OSR for nested loops. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments 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/full-codegen.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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 331
332 332
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 back edge 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
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698