Commit f5d9c1be authored by keuchel@chromium.org's avatar keuchel@chromium.org

Fix build with GCC 4.7, which fails with "narrowing conversion of 'id' from...

Fix build with GCC 4.7, which fails with "narrowing conversion of 'id' from 'int' to 'unsigned int' inside { } is ill-formed in C++11"

Contributed by burnus@net-b.de

Review URL: http://codereview.chromium.org/8724003
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4d0f2839
......@@ -362,7 +362,7 @@ void FullCodeGenerator::RecordJSReturnSite(Call* call) {
}
void FullCodeGenerator::PrepareForBailoutForId(int id, State state) {
void FullCodeGenerator::PrepareForBailoutForId(unsigned id, State state) {
// There's no need to prepare this code for bailouts from already optimized
// code or code that can't be optimized.
if (!FLAG_deopt || !info_->HasDeoptimizationSupport()) return;
......@@ -383,10 +383,11 @@ void FullCodeGenerator::PrepareForBailoutForId(int id, State state) {
}
void FullCodeGenerator::RecordStackCheck(int ast_id) {
void FullCodeGenerator::RecordStackCheck(unsigned ast_id) {
// The pc offset does not need to be encoded and packed together with a
// state.
BailoutEntry entry = { ast_id, masm_->pc_offset() };
ASSERT(masm_->pc_offset() > 0);
BailoutEntry entry = { ast_id, static_cast<unsigned>(masm_->pc_offset()) };
stack_checks_.Add(entry);
}
......
......@@ -390,7 +390,7 @@ class FullCodeGenerator: public AstVisitor {
// Bailout support.
void PrepareForBailout(Expression* node, State state);
void PrepareForBailoutForId(int id, State state);
void PrepareForBailoutForId(unsigned id, State state);
// Record a call's return site offset, used to rebuild the frame if the
// called function was inlined at the site.
......@@ -417,7 +417,7 @@ class FullCodeGenerator: public AstVisitor {
// a loop.
void EmitStackCheck(IterationStatement* stmt);
// Record the OSR AST id corresponding to a stack check in the code.
void RecordStackCheck(int osr_ast_id);
void RecordStackCheck(unsigned osr_ast_id);
// Emit a table of stack check ids and pcs into the code stream. Return
// the offset of the start of the table.
unsigned EmitStackCheckTable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment