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

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

Issue 456001: Move CPU-specific constants from debug.h into the platform-specific directori... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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/ia32/codegen-ia32.cc ('k') | src/ia32/fast-codegen-ia32.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 27 matching lines...) Expand all
38 38
39 bool BreakLocationIterator::IsDebugBreakAtReturn() { 39 bool BreakLocationIterator::IsDebugBreakAtReturn() {
40 return Debug::IsDebugBreakAtReturn(rinfo()); 40 return Debug::IsDebugBreakAtReturn(rinfo());
41 } 41 }
42 42
43 43
44 // Patch the JS frame exit code with a debug break call. See 44 // Patch the JS frame exit code with a debug break call. See
45 // CodeGenerator::VisitReturnStatement and VirtualFrame::Exit in codegen-ia32.cc 45 // CodeGenerator::VisitReturnStatement and VirtualFrame::Exit in codegen-ia32.cc
46 // for the precise return instructions sequence. 46 // for the precise return instructions sequence.
47 void BreakLocationIterator::SetDebugBreakAtReturn() { 47 void BreakLocationIterator::SetDebugBreakAtReturn() {
48 ASSERT(Debug::kIa32JSReturnSequenceLength >= 48 ASSERT(Assembler::kJSReturnSequenceLength >=
49 Debug::kIa32CallInstructionLength); 49 Assembler::kCallInstructionLength);
50 rinfo()->PatchCodeWithCall(Debug::debug_break_return()->entry(), 50 rinfo()->PatchCodeWithCall(Debug::debug_break_return()->entry(),
51 Debug::kIa32JSReturnSequenceLength - Debug::kIa32CallInstructionLength); 51 Assembler::kJSReturnSequenceLength - Assembler::kCallInstructionLength);
52 } 52 }
53 53
54 54
55 // Restore the JS frame exit code. 55 // Restore the JS frame exit code.
56 void BreakLocationIterator::ClearDebugBreakAtReturn() { 56 void BreakLocationIterator::ClearDebugBreakAtReturn() {
57 rinfo()->PatchCode(original_rinfo()->pc(), 57 rinfo()->PatchCode(original_rinfo()->pc(),
58 Debug::kIa32JSReturnSequenceLength); 58 Assembler::kJSReturnSequenceLength);
59 } 59 }
60 60
61 61
62 // A debug break in the frame exit code is identified by the JS frame exit code 62 // A debug break in the frame exit code is identified by the JS frame exit code
63 // having been patched with a call instruction. 63 // having been patched with a call instruction.
64 bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) { 64 bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) {
65 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode())); 65 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()));
66 return rinfo->IsPatchedReturnSequence(); 66 return rinfo->IsPatchedReturnSequence();
67 } 67 }
68 68
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // ----------------------------------- 199 // -----------------------------------
200 Generate_DebugBreakCallHelper(masm, 0, false); 200 Generate_DebugBreakCallHelper(masm, 0, false);
201 } 201 }
202 202
203 203
204 #undef __ 204 #undef __
205 205
206 #endif // ENABLE_DEBUGGER_SUPPORT 206 #endif // ENABLE_DEBUGGER_SUPPORT
207 207
208 } } // namespace v8::internal 208 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/fast-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698