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

Unified Diff: src/objects.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: Use FixedArray::OffsetAt and add comment to codegen. 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
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 1fdd478b7f9f55f9a237afbb2d605b706464eead..f9002d73eb8f5ee1967ca09bcc1627e2e8be52d1 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9464,11 +9464,24 @@ bool JSFunction::CompileLazy(Handle<JSFunction> function,
}
-bool JSFunction::CompileOptimized(Handle<JSFunction> function,
+Handle<Code> JSFunction::CompileOsr(Handle<JSFunction> function,
BailoutId osr_ast_id,
ClearExceptionFlag flag) {
CompilationInfoWithZone info(function);
info.SetOptimizing(osr_ast_id);
+ if (CompileLazyHelper(&info, flag)) {
+ ASSERT(function->code() != *info.code());
+ return info.code();
+ } else {
+ return Handle<Code>::null();
+ }
+}
+
+
+bool JSFunction::CompileOptimized(Handle<JSFunction> function,
+ ClearExceptionFlag flag) {
+ CompilationInfoWithZone info(function);
+ info.SetOptimizing(BailoutId::None());
return CompileLazyHelper(&info, flag);
}
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698