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

Side by Side Diff: src/x64/cfg-x64.cc

Issue 171107: X64: Implement debugger hooks. (Closed)
Patch Set: Created 11 years, 4 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (FLAG_trace) { 107 if (FLAG_trace) {
108 __ push(rax); 108 __ push(rax);
109 __ CallRuntime(Runtime::kTraceExit, 1); 109 __ CallRuntime(Runtime::kTraceExit, 1);
110 } 110 }
111 __ RecordJSReturn(); 111 __ RecordJSReturn();
112 __ movq(rsp, rbp); 112 __ movq(rsp, rbp);
113 __ pop(rbp); 113 __ pop(rbp);
114 int count = CfgGlobals::current()->fun()->scope()->num_parameters(); 114 int count = CfgGlobals::current()->fun()->scope()->num_parameters();
115 __ ret((count + 1) * kPointerSize); 115 __ ret((count + 1) * kPointerSize);
116 // Add padding that will be overwritten by a debugger breakpoint. 116 // Add padding that will be overwritten by a debugger breakpoint.
117 // "movq rsp, rbp; pop rbp" has length 5. "ret k" has length 2. 117 // "movq rsp, rbp; pop rbp" has length 4. "ret k" has length 3.
118 const int kPadding = Debug::kX64JSReturnSequenceLength - 5 - 2; 118 const int kPadding = Debug::kX64JSReturnSequenceLength - 4 - 3;
119 for (int i = 0; i < kPadding; ++i) { 119 for (int i = 0; i < kPadding; ++i) {
120 __ int3(); 120 __ int3();
121 } 121 }
122 } 122 }
123 123
124 124
125 void PropLoadInstr::Compile(MacroAssembler* masm) { 125 void PropLoadInstr::Compile(MacroAssembler* masm) {
126 // The key should not be on the stack---if it is a compiler-generated 126 // The key should not be on the stack---if it is a compiler-generated
127 // temporary it is in the accumulator. 127 // temporary it is in the accumulator.
128 ASSERT(!key()->is_on_stack()); 128 ASSERT(!key()->is_on_stack());
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 break; 314 break;
315 case NOT_ALLOCATED: 315 case NOT_ALLOCATED:
316 UNREACHABLE(); 316 UNREACHABLE();
317 } 317 }
318 } 318 }
319 319
320 320
321 #undef __ 321 #undef __
322 322
323 } } // namespace v8::internal 323 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698