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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 256653004: Always include debugger support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Makefile Created 6 years, 7 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/x64/debug-x64.cc ('k') | src/x64/macro-assembler-x64.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 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 __ RecordJSReturn(); 437 __ RecordJSReturn();
438 // Do not use the leave instruction here because it is too short to 438 // Do not use the leave instruction here because it is too short to
439 // patch with the code required by the debugger. 439 // patch with the code required by the debugger.
440 __ movp(rsp, rbp); 440 __ movp(rsp, rbp);
441 __ popq(rbp); 441 __ popq(rbp);
442 int no_frame_start = masm_->pc_offset(); 442 int no_frame_start = masm_->pc_offset();
443 443
444 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize; 444 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize;
445 __ Ret(arguments_bytes, rcx); 445 __ Ret(arguments_bytes, rcx);
446 446
447 #ifdef ENABLE_DEBUGGER_SUPPORT
448 // Add padding that will be overwritten by a debugger breakpoint. We 447 // Add padding that will be overwritten by a debugger breakpoint. We
449 // have just generated at least 7 bytes: "movp rsp, rbp; pop rbp; ret k" 448 // have just generated at least 7 bytes: "movp rsp, rbp; pop rbp; ret k"
450 // (3 + 1 + 3) for x64 and at least 6 (2 + 1 + 3) bytes for x32. 449 // (3 + 1 + 3) for x64 and at least 6 (2 + 1 + 3) bytes for x32.
451 const int kPadding = Assembler::kJSReturnSequenceLength - 450 const int kPadding = Assembler::kJSReturnSequenceLength -
452 kPointerSize == kInt64Size ? 7 : 6; 451 kPointerSize == kInt64Size ? 7 : 6;
453 for (int i = 0; i < kPadding; ++i) { 452 for (int i = 0; i < kPadding; ++i) {
454 masm_->int3(); 453 masm_->int3();
455 } 454 }
456 // Check that the size of the code used for returning is large enough 455 // Check that the size of the code used for returning is large enough
457 // for the debugger's requirements. 456 // for the debugger's requirements.
458 ASSERT(Assembler::kJSReturnSequenceLength <= 457 ASSERT(Assembler::kJSReturnSequenceLength <=
459 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); 458 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize));
460 #endif 459
461 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 460 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
462 } 461 }
463 } 462 }
464 463
465 464
466 void FullCodeGenerator::EffectContext::Plug(Variable* var) const { 465 void FullCodeGenerator::EffectContext::Plug(Variable* var) const {
467 ASSERT(var->IsStackAllocated() || var->IsContextSlot()); 466 ASSERT(var->IsStackAllocated() || var->IsContextSlot());
468 } 467 }
469 468
470 469
(...skipping 4458 matching lines...) Expand 10 before | Expand all | Expand 10 after
4929 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4928 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4930 Assembler::target_address_at(call_target_address, 4929 Assembler::target_address_at(call_target_address,
4931 unoptimized_code)); 4930 unoptimized_code));
4932 return OSR_AFTER_STACK_CHECK; 4931 return OSR_AFTER_STACK_CHECK;
4933 } 4932 }
4934 4933
4935 4934
4936 } } // namespace v8::internal 4935 } } // namespace v8::internal
4937 4936
4938 #endif // V8_TARGET_ARCH_X64 4937 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/debug-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698