Revision: 10101
Author: [email protected]
Date: Wed Nov 30 10:04:12 2011
Log: 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 [email protected]
Review URL: http://codereview.chromium.org/8724003
Patch from Tobias Burnus <[email protected]>.
http://code.google.com/p/v8/source/detail?r=10101
Modified:
/branches/bleeding_edge/src/full-codegen.cc
/branches/bleeding_edge/src/full-codegen.h
=======================================
--- /branches/bleeding_edge/src/full-codegen.cc Thu Nov 24 07:17:04 2011
+++ /branches/bleeding_edge/src/full-codegen.cc Wed Nov 30 10:04:12 2011
@@ -362,7 +362,7 @@
}
-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::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);
}
=======================================
--- /branches/bleeding_edge/src/full-codegen.h Thu Nov 24 07:17:04 2011
+++ /branches/bleeding_edge/src/full-codegen.h Wed Nov 30 10:04:12 2011
@@ -390,7 +390,7 @@
// 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 @@
// 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();
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev