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

Unified Diff: src/runtime/runtime-test.cc

Issue 1004993004: [turbofan] Fix bug in OSR deconstruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/runtime/runtime.h ('k') | test/cctest/compiler/test-osr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 7bf74cca57a8eaf983c8d079d97a9610e2e1a04e..c5e3f15f32174a4789f46b3287ef03d1285ca3c9 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -111,10 +111,10 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) {
RUNTIME_FUNCTION(Runtime_OptimizeOsr) {
HandleScope scope(isolate);
- RUNTIME_ASSERT(args.length() == 0);
+ RUNTIME_ASSERT(args.length() == 0 || args.length() == 1);
Handle<JSFunction> function = Handle<JSFunction>::null();
- {
+ if (args.length() == 0) {
// Find the JavaScript function on the top of the stack.
JavaScriptFrameIterator it(isolate);
while (!it.done()) {
@@ -124,6 +124,10 @@ RUNTIME_FUNCTION(Runtime_OptimizeOsr) {
}
}
if (function.is_null()) return isolate->heap()->undefined_value();
+ } else {
+ // Function was passed as an argument.
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, arg, 0);
+ function = arg;
}
// The following assertion was lifted from the DCHECK inside
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698