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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 } | 243 } |
244 if (FLAG_trace_codegen) { | 244 if (FLAG_trace_codegen) { |
245 PrintF("Classic Compiler - "); | 245 PrintF("Classic Compiler - "); |
246 } | 246 } |
247 MakeCodePrologue(info); | 247 MakeCodePrologue(info); |
248 // Generate code. | 248 // Generate code. |
249 const int kInitialBufferSize = 4 * KB; | 249 const int kInitialBufferSize = 4 * KB; |
250 MacroAssembler masm(NULL, kInitialBufferSize); | 250 MacroAssembler masm(NULL, kInitialBufferSize); |
251 #ifdef ENABLE_GDB_JIT_INTERFACE | 251 #ifdef ENABLE_GDB_JIT_INTERFACE |
252 masm.positions_recorder()->StartGDBJITLineInfoRecording(); | 252 masm.positions_recorder()->StartGDBJITLineInfoRecording(); |
253 #ifdef V8_TARGET_ARCH_X64 | |
Vyacheslav Egorov (Chromium)
2011/01/25 12:50:11
Revert this change.
I am considering disabling GD
| |
254 UnwindInfoInterface dummy; | |
255 #endif | |
253 #endif | 256 #endif |
254 CodeGenerator cgen(&masm); | 257 CodeGenerator cgen(&masm); |
255 CodeGeneratorScope scope(&cgen); | 258 CodeGeneratorScope scope(&cgen); |
256 cgen.Generate(info); | 259 cgen.Generate(info); |
257 if (cgen.HasStackOverflow()) { | 260 if (cgen.HasStackOverflow()) { |
258 ASSERT(!Top::has_pending_exception()); | 261 ASSERT(!Top::has_pending_exception()); |
259 return false; | 262 return false; |
260 } | 263 } |
261 | 264 |
262 InLoopFlag in_loop = info->is_in_loop() ? IN_LOOP : NOT_IN_LOOP; | 265 InLoopFlag in_loop = info->is_in_loop() ? IN_LOOP : NOT_IN_LOOP; |
263 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop); | 266 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop); |
264 Handle<Code> code = MakeCodeEpilogue(cgen.masm(), flags, info); | 267 Handle<Code> code = MakeCodeEpilogue(cgen.masm(), flags, info); |
268 | |
269 SET_UNWIND_INFO_START_ADDRESS(reinterpret_cast<uintptr_t> | |
270 (code->instruction_start())); | |
271 | |
265 // There is no stack check table in code generated by the classic backend. | 272 // There is no stack check table in code generated by the classic backend. |
266 code->SetNoStackCheckTable(); | 273 code->SetNoStackCheckTable(); |
267 CodeGenerator::PrintCode(code, info); | 274 CodeGenerator::PrintCode(code, info); |
268 info->SetCode(code); // May be an empty handle. | 275 info->SetCode(code); // May be an empty handle. |
269 #ifdef ENABLE_GDB_JIT_INTERFACE | 276 #ifdef ENABLE_GDB_JIT_INTERFACE |
270 if (FLAG_gdbjit && !code.is_null()) { | 277 if (FLAG_gdbjit && !code.is_null()) { |
271 GDBJITLineInfo* lineinfo = | 278 GDBJITLineInfo* lineinfo = |
272 masm.positions_recorder()->DetachGDBJITLineInfo(); | 279 masm.positions_recorder()->DetachGDBJITLineInfo(); |
273 | 280 |
274 GDBJIT(RegisterDetailedLineInfo(*code, lineinfo)); | 281 GDBJIT(RegisterDetailedLineInfo(*code, lineinfo)); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
487 int result = save_doubles_ ? 1 : 0; | 494 int result = save_doubles_ ? 1 : 0; |
488 #ifdef _WIN64 | 495 #ifdef _WIN64 |
489 return result | ((result_size_ == 1) ? 0 : 2); | 496 return result | ((result_size_ == 1) ? 0 : 2); |
490 #else | 497 #else |
491 return result; | 498 return result; |
492 #endif | 499 #endif |
493 } | 500 } |
494 | 501 |
495 | 502 |
496 } } // namespace v8::internal | 503 } } // namespace v8::internal |
OLD | NEW |