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

Side by Side Diff: src/ia32/debug-ia32.cc

Issue 8086021: Clean up the x86 assembler API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 __ SmiUntag(reg); 150 __ SmiUntag(reg);
151 } 151 }
152 } 152 }
153 153
154 // Get rid of the internal frame. 154 // Get rid of the internal frame.
155 } 155 }
156 156
157 // If this call did not replace a call but patched other code then there will 157 // If this call did not replace a call but patched other code then there will
158 // be an unwanted return address left on the stack. Here we get rid of that. 158 // be an unwanted return address left on the stack. Here we get rid of that.
159 if (convert_call_to_jmp) { 159 if (convert_call_to_jmp) {
160 __ add(Operand(esp), Immediate(kPointerSize)); 160 __ add(esp, Immediate(kPointerSize));
161 } 161 }
162 162
163 // Now that the break point has been handled, resume normal execution by 163 // Now that the break point has been handled, resume normal execution by
164 // jumping to the target address intended by the caller and that was 164 // jumping to the target address intended by the caller and that was
165 // overwritten by the address of DebugBreakXXX. 165 // overwritten by the address of DebugBreakXXX.
166 ExternalReference after_break_target = 166 ExternalReference after_break_target =
167 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); 167 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate());
168 __ jmp(Operand::StaticVariable(after_break_target)); 168 __ jmp(Operand::StaticVariable(after_break_target));
169 } 169 }
170 170
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 // Load context from the function. 293 // Load context from the function.
294 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 294 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
295 295
296 // Get function code. 296 // Get function code.
297 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 297 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
298 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); 298 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset));
299 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); 299 __ lea(edx, FieldOperand(edx, Code::kHeaderSize));
300 300
301 // Re-run JSFunction, edi is function, esi is context. 301 // Re-run JSFunction, edi is function, esi is context.
302 __ jmp(Operand(edx)); 302 __ jmp(edx);
303 } 303 }
304 304
305 const bool Debug::kFrameDropperSupported = true; 305 const bool Debug::kFrameDropperSupported = true;
306 306
307 #undef __ 307 #undef __
308 308
309 #endif // ENABLE_DEBUGGER_SUPPORT 309 #endif // ENABLE_DEBUGGER_SUPPORT
310 310
311 } } // namespace v8::internal 311 } } // namespace v8::internal
312 312
313 #endif // V8_TARGET_ARCH_IA32 313 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698