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

Side by Side Diff: src/debug.cc

Issue 390004: Fix warnings on Win64. (Closed)
Patch Set: Created 11 years, 1 month 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
« src/api.cc ('K') | « src/debug.h ('k') | src/debug-agent.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool first = break_point_ == -1; 101 bool first = break_point_ == -1;
102 while (!RinfoDone()) { 102 while (!RinfoDone()) {
103 if (!first) RinfoNext(); 103 if (!first) RinfoNext();
104 first = false; 104 first = false;
105 if (RinfoDone()) return; 105 if (RinfoDone()) return;
106 106
107 // Whenever a statement position or (plain) position is passed update the 107 // Whenever a statement position or (plain) position is passed update the
108 // current value of these. 108 // current value of these.
109 if (RelocInfo::IsPosition(rmode())) { 109 if (RelocInfo::IsPosition(rmode())) {
110 if (RelocInfo::IsStatementPosition(rmode())) { 110 if (RelocInfo::IsStatementPosition(rmode())) {
111 statement_position_ = 111 statement_position_ = static_cast<int>(
112 rinfo()->data() - debug_info_->shared()->start_position(); 112 rinfo()->data() - debug_info_->shared()->start_position());
113 } 113 }
114 // Always update the position as we don't want that to be before the 114 // Always update the position as we don't want that to be before the
115 // statement position. 115 // statement position.
116 position_ = rinfo()->data() - debug_info_->shared()->start_position(); 116 position_ = static_cast<int>(
117 rinfo()->data() - debug_info_->shared()->start_position());
117 ASSERT(position_ >= 0); 118 ASSERT(position_ >= 0);
118 ASSERT(statement_position_ >= 0); 119 ASSERT(statement_position_ >= 0);
119 } 120 }
120 121
121 // Check for breakable code target. Look in the original code as setting 122 // Check for breakable code target. Look in the original code as setting
122 // break points can cause the code targets in the running (debugged) code to 123 // break points can cause the code targets in the running (debugged) code to
123 // be of a different kind than in the original code. 124 // be of a different kind than in the original code.
124 if (RelocInfo::IsCodeTarget(rmode())) { 125 if (RelocInfo::IsCodeTarget(rmode())) {
125 Address target = original_rinfo()->target_address(); 126 Address target = original_rinfo()->target_address();
126 Code* code = Code::GetCodeFromTargetAddress(target); 127 Code* code = Code::GetCodeFromTargetAddress(target);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 176
176 // Find the break point closest to the supplied address. 177 // Find the break point closest to the supplied address.
177 void BreakLocationIterator::FindBreakLocationFromAddress(Address pc) { 178 void BreakLocationIterator::FindBreakLocationFromAddress(Address pc) {
178 // Run through all break points to locate the one closest to the address. 179 // Run through all break points to locate the one closest to the address.
179 int closest_break_point = 0; 180 int closest_break_point = 0;
180 int distance = kMaxInt; 181 int distance = kMaxInt;
181 while (!Done()) { 182 while (!Done()) {
182 // Check if this break point is closer that what was previously found. 183 // Check if this break point is closer that what was previously found.
183 if (this->pc() < pc && pc - this->pc() < distance) { 184 if (this->pc() < pc && pc - this->pc() < distance) {
184 closest_break_point = break_point(); 185 closest_break_point = break_point();
185 distance = pc - this->pc(); 186 distance = static_cast<int>(pc - this->pc());
186 // Check whether we can't get any closer. 187 // Check whether we can't get any closer.
187 if (distance == 0) break; 188 if (distance == 0) break;
188 } 189 }
189 Next(); 190 Next();
190 } 191 }
191 192
192 // Move to the break point found. 193 // Move to the break point found.
193 Reset(); 194 Reset();
194 Next(closest_break_point); 195 Next(closest_break_point);
195 } 196 }
(...skipping 2516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 2713
2713 2714
2714 void LockingCommandMessageQueue::Clear() { 2715 void LockingCommandMessageQueue::Clear() {
2715 ScopedLock sl(lock_); 2716 ScopedLock sl(lock_);
2716 queue_.Clear(); 2717 queue_.Clear();
2717 } 2718 }
2718 2719
2719 #endif // ENABLE_DEBUGGER_SUPPORT 2720 #endif // ENABLE_DEBUGGER_SUPPORT
2720 2721
2721 } } // namespace v8::internal 2722 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/debug.h ('k') | src/debug-agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698