Reviewers: Erik Corry,
Message:
I was getting warnings on GCC 3.4.3 Solaris.
Description:
Fix a couple cast errors
Please review this at http://codereview.chromium.org/5976006/
Affected files:
M src/ast.h
M src/deoptimizer.h
M src/deoptimizer.cc
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index
ed447e343af26c4e5a91dcc5cf91237d9a70c6fb..0e821de87665fc2026bcdcc5fb0ca3499793b3a5
100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1391,7 +1391,7 @@ class BinaryOperation: public Expression {
: op_(op), left_(left), right_(right), pos_(pos),
is_smi_only_(false) {
ASSERT(Token::IsBinaryOp(op));
right_id_ = (op == Token::AND || op == Token::OR)
- ? GetNextId()
+ ? static_cast<int>(GetNextId())
: AstNode::kNoNumber;
}
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index
dd70baaa16575e9c595af2bd511e2cb0a2871096..185ff92242b384ed3432fc8ef7a0dfbb4d331ed7
100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -309,9 +309,9 @@ void Deoptimizer::TearDown() {
}
-unsigned Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
- unsigned id,
- SharedFunctionInfo* shared) {
+int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
+ unsigned id,
+ SharedFunctionInfo* shared) {
// TODO(kasperl): For now, we do a simple linear search for the PC
// offset associated with the given node id. This should probably be
// changed to a binary search.
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index
2d7dfc895c3982be00278f149d1488435e3ca6c9..f9bf280ea82ffd9ae45559d058d5693e80202236
100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -145,9 +145,9 @@ class Deoptimizer : public Malloced {
static Address GetDeoptimizationEntry(int id, BailoutType type);
static int GetDeoptimizationId(Address addr, BailoutType type);
- static unsigned GetOutputInfo(DeoptimizationOutputData* data,
- unsigned node_id,
- SharedFunctionInfo* shared);
+ static int GetOutputInfo(DeoptimizationOutputData* data,
+ unsigned node_id,
+ SharedFunctionInfo* shared);
static void Setup();
static void TearDown();
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev