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

Unified Diff: src/scopeinfo.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 side-by-side diff with in-line comments
Download patch
« src/api.cc ('K') | « src/scanner.h ('k') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index 78cc71e3d907d684072856a2ccf4f838a00b566b..8b989d7a357589266de3e1c55d9aaf41b774024a 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -418,7 +418,7 @@ int ScopeInfo<Allocator>::StackSlotIndex(Code* code, String* name) {
Object** p0 = StackSlotEntriesAddr(code) + 1;
Object** p = p0;
while (*p != NULL) {
- if (*p == name) return p - p0;
+ if (*p == name) return static_cast<int>(p - p0);
p++;
}
}
@@ -449,7 +449,7 @@ int ScopeInfo<Allocator>::ContextSlotIndex(Code* code,
ReadInt(p + 1, &v);
Variable::Mode mode_value = static_cast<Variable::Mode>(v);
if (mode != NULL) *mode = mode_value;
- result = ((p - p0) >> 1) + Context::MIN_CONTEXT_SLOTS;
+ result = static_cast<int>((p - p0) >> 1) + Context::MIN_CONTEXT_SLOTS;
ContextSlotCache::Update(code, name, mode_value, result);
return result;
}
@@ -481,7 +481,7 @@ int ScopeInfo<Allocator>::ParameterIndex(Code* code, String* name) {
p = p0 + n;
while (p > p0) {
p--;
- if (*p == name) return p - p0;
+ if (*p == name) return static_cast<int>(p - p0);
}
}
return -1;
« src/api.cc ('K') | « src/scanner.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698