OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 Counters::total_full_codegen_source_size.Increment(len); | 281 Counters::total_full_codegen_source_size.Increment(len); |
282 } | 282 } |
283 if (FLAG_trace_codegen) { | 283 if (FLAG_trace_codegen) { |
284 PrintF("Full Compiler - "); | 284 PrintF("Full Compiler - "); |
285 } | 285 } |
286 CodeGenerator::MakeCodePrologue(info); | 286 CodeGenerator::MakeCodePrologue(info); |
287 const int kInitialBufferSize = 4 * KB; | 287 const int kInitialBufferSize = 4 * KB; |
288 MacroAssembler masm(NULL, kInitialBufferSize); | 288 MacroAssembler masm(NULL, kInitialBufferSize); |
289 #ifdef ENABLE_GDB_JIT_INTERFACE | 289 #ifdef ENABLE_GDB_JIT_INTERFACE |
290 masm.positions_recorder()->StartGDBJITLineInfoRecording(); | 290 masm.positions_recorder()->StartGDBJITLineInfoRecording(); |
| 291 #ifdef V8_TARGET_ARCH_X64 |
| 292 UnwindInfoInterface dummy; |
| 293 #endif |
291 #endif | 294 #endif |
292 | 295 |
293 FullCodeGenerator cgen(&masm); | 296 FullCodeGenerator cgen(&masm); |
294 cgen.Generate(info); | 297 cgen.Generate(info); |
295 if (cgen.HasStackOverflow()) { | 298 if (cgen.HasStackOverflow()) { |
296 ASSERT(!Top::has_pending_exception()); | 299 ASSERT(!Top::has_pending_exception()); |
297 return false; | 300 return false; |
298 } | 301 } |
299 unsigned table_offset = cgen.EmitStackCheckTable(); | 302 unsigned table_offset = cgen.EmitStackCheckTable(); |
300 | 303 |
301 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); | 304 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); |
302 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); | 305 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); |
| 306 |
| 307 SET_UNWIND_INFO_START_ADDRESS(reinterpret_cast<uintptr_t> |
| 308 (code->instruction_start())); |
| 309 |
303 code->set_optimizable(info->IsOptimizable()); | 310 code->set_optimizable(info->IsOptimizable()); |
304 cgen.PopulateDeoptimizationData(code); | 311 cgen.PopulateDeoptimizationData(code); |
305 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); | 312 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); |
306 code->set_allow_osr_at_loop_nesting_level(0); | 313 code->set_allow_osr_at_loop_nesting_level(0); |
307 code->set_stack_check_table_start(table_offset); | 314 code->set_stack_check_table_start(table_offset); |
308 CodeGenerator::PrintCode(code, info); | 315 CodeGenerator::PrintCode(code, info); |
309 info->SetCode(code); // may be an empty handle. | 316 info->SetCode(code); // may be an empty handle. |
310 #ifdef ENABLE_GDB_JIT_INTERFACE | 317 #ifdef ENABLE_GDB_JIT_INTERFACE |
311 if (FLAG_gdbjit && !code.is_null()) { | 318 if (FLAG_gdbjit && !code.is_null()) { |
312 GDBJITLineInfo* lineinfo = | 319 GDBJITLineInfo* lineinfo = |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 __ Drop(stack_depth); | 1392 __ Drop(stack_depth); |
1386 __ PopTryHandler(); | 1393 __ PopTryHandler(); |
1387 return 0; | 1394 return 0; |
1388 } | 1395 } |
1389 | 1396 |
1390 | 1397 |
1391 #undef __ | 1398 #undef __ |
1392 | 1399 |
1393 | 1400 |
1394 } } // namespace v8::internal | 1401 } } // namespace v8::internal |
OLD | NEW |