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

Unified Diff: src/runtime.cc

Issue 5699002: RFC: Switch to ast ids (instead of positions) for type feedback. (Closed)
Patch Set: Cleanup Created 10 years 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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 58cde3b10a215a230565f776f36fc1a9eab0b784..62f54a06cb3de856daa61db3bd4bc6f551e576ef 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6718,7 +6718,7 @@ static MaybeObject* Runtime_LazyRecompile(Arguments args) {
function->ReplaceCode(function->shared()->code());
return function->code();
}
- if (CompileOptimized(function, AstNode::kNoNumber)) {
+ if (CompileOptimized(function, kNoAstId)) {
return function->code();
}
function->ReplaceCode(function->shared()->code());
@@ -6846,7 +6846,7 @@ static MaybeObject* Runtime_CompileForOnStackReplacement(Arguments args) {
}
}
- int ast_id = AstNode::kNoNumber;
+ AstId ast_id = kNoAstId;
if (succeeded) {
// The top JS function is this one, the PC is somewhere in the
// unoptimized code.
@@ -6867,12 +6867,12 @@ static MaybeObject* Runtime_CompileForOnStackReplacement(Arguments args) {
// Table entries are (AST id, pc offset) pairs.
uint32_t pc_offset = Memory::uint32_at(table_cursor + kIntSize);
if (pc_offset == target_pc_offset) {
- ast_id = static_cast<int>(Memory::uint32_at(table_cursor));
+ ast_id = static_cast<AstId>(Memory::uint32_at(table_cursor));
break;
}
table_cursor += 2 * kIntSize;
}
- ASSERT(ast_id != AstNode::kNoNumber);
+ ASSERT(ast_id != kNoAstId);
if (FLAG_trace_osr) {
PrintF("[replacing on-stack at AST id %d in ", ast_id);
function->PrintName();
@@ -6889,7 +6889,7 @@ static MaybeObject* Runtime_CompileForOnStackReplacement(Arguments args) {
PrintF("[on-stack replacement offset %d in optimized code]\n",
data->OsrPcOffset()->value());
}
- ASSERT(data->OsrAstId()->value() == ast_id);
+ ASSERT(static_cast<AstId>(data->OsrAstId()->value()) == ast_id);
ASSERT(data->OsrPcOffset()->value() >= 0);
} else {
succeeded = false;

Powered by Google App Engine
This is Rietveld 408576698