OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 #ifdef ENABLE_DEBUGGER_SUPPORT | 343 #ifdef ENABLE_DEBUGGER_SUPPORT |
344 code->set_has_debug_break_slots( | 344 code->set_has_debug_break_slots( |
345 info->isolate()->debugger()->IsDebuggerActive()); | 345 info->isolate()->debugger()->IsDebuggerActive()); |
346 code->set_compiled_optimizable(info->IsOptimizable()); | 346 code->set_compiled_optimizable(info->IsOptimizable()); |
347 #endif // ENABLE_DEBUGGER_SUPPORT | 347 #endif // ENABLE_DEBUGGER_SUPPORT |
348 code->set_allow_osr_at_loop_nesting_level(0); | 348 code->set_allow_osr_at_loop_nesting_level(0); |
349 code->set_profiler_ticks(0); | 349 code->set_profiler_ticks(0); |
350 code->set_back_edge_table_offset(table_offset); | 350 code->set_back_edge_table_offset(table_offset); |
351 code->set_back_edges_patched_for_osr(false); | 351 code->set_back_edges_patched_for_osr(false); |
352 CodeGenerator::PrintCode(code, info); | 352 CodeGenerator::PrintCode(code, info); |
353 info->SetCode(code); // May be an empty handle. | 353 info->SetCode(code); |
354 #ifdef ENABLE_GDB_JIT_INTERFACE | 354 #ifdef ENABLE_GDB_JIT_INTERFACE |
355 if (FLAG_gdbjit && !code.is_null()) { | 355 if (FLAG_gdbjit) { |
356 GDBJITLineInfo* lineinfo = | 356 GDBJITLineInfo* lineinfo = |
357 masm.positions_recorder()->DetachGDBJITLineInfo(); | 357 masm.positions_recorder()->DetachGDBJITLineInfo(); |
358 | |
359 GDBJIT(RegisterDetailedLineInfo(*code, lineinfo)); | 358 GDBJIT(RegisterDetailedLineInfo(*code, lineinfo)); |
360 } | 359 } |
361 #endif | 360 #endif |
362 if (!code.is_null()) { | 361 void* line_info = masm.positions_recorder()->DetachJITHandlerData(); |
363 void* line_info = | 362 LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info)); |
364 masm.positions_recorder()->DetachJITHandlerData(); | 363 return true; |
365 LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info)); | |
366 } | |
367 return !code.is_null(); | |
368 } | 364 } |
369 | 365 |
370 | 366 |
371 unsigned FullCodeGenerator::EmitBackEdgeTable() { | 367 unsigned FullCodeGenerator::EmitBackEdgeTable() { |
372 // The back edge table consists of a length (in number of entries) | 368 // The back edge table consists of a length (in number of entries) |
373 // field, and then a sequence of entries. Each entry is a pair of AST id | 369 // field, and then a sequence of entries. Each entry is a pair of AST id |
374 // and code-relative pc offset. | 370 // and code-relative pc offset. |
375 masm()->Align(kIntSize); | 371 masm()->Align(kIntSize); |
376 unsigned offset = masm()->pc_offset(); | 372 unsigned offset = masm()->pc_offset(); |
377 unsigned length = back_edges_.length(); | 373 unsigned length = back_edges_.length(); |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 } | 1612 } |
1617 | 1613 |
1618 return false; | 1614 return false; |
1619 } | 1615 } |
1620 | 1616 |
1621 | 1617 |
1622 #undef __ | 1618 #undef __ |
1623 | 1619 |
1624 | 1620 |
1625 } } // namespace v8::internal | 1621 } } // namespace v8::internal |
OLD | NEW |