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

Unified Diff: src/compiler.cc

Issue 21340002: Generate a custom OSR entrypoint for OSR compiles on all platforms, and transition to optimized cod… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months 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/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 3c51baa30e9881d3a8ac739166ba01c2673d1c1f..174b6e93cdb3a5fef7c90a617f8a8b564a3626c0 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -908,7 +908,7 @@ static bool InstallCodeFromOptimizedCodeMap(CompilationInfo* info) {
}
-bool Compiler::CompileLazy(CompilationInfo* info) {
+bool Compiler::CompileLazy(CompilationInfo* info, bool install) {
Isolate* isolate = info->isolate();
// The VM is in the COMPILER state until exiting this function.
@@ -920,7 +920,7 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
int compiled_size = shared->end_position() - shared->start_position();
isolate->counters()->total_compile_size()->Increment(compiled_size);
- if (InstallCodeFromOptimizedCodeMap(info)) return true;
+ if (install && InstallCodeFromOptimizedCodeMap(info)) return true;
Michael Starzinger 2013/07/31 14:55:50 Both InsertCodeIntoOptimizedCodeMap() and InstallC
// Generate the AST for the lazily compiled function.
if (Parser::Parse(info)) {
@@ -940,15 +940,17 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
isolate->StackOverflow();
}
} else {
- InstallCodeCommon(info);
+ if (install) InstallCodeCommon(info);
if (info->IsOptimizing()) {
Handle<Code> code = info->code();
ASSERT(shared->scope_info() != ScopeInfo::Empty(isolate));
- info->closure()->ReplaceCode(*code);
- InsertCodeIntoOptimizedCodeMap(info);
+ if (install) {
Michael Starzinger 2013/07/31 14:55:50 Instead of passing the "install" boolean flag we c
+ info->closure()->ReplaceCode(*code);
+ InsertCodeIntoOptimizedCodeMap(info);
+ }
return true;
- } else {
+ } else if (install) {
return InstallFullCode(info);
}
}

Powered by Google App Engine
This is Rietveld 408576698