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

Unified Diff: src/compiler/osr.cc

Issue 2171083004: [interpreter] Implement OSR graph construction from bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-osr-2
Patch Set: Fix build on Windows. Created 4 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/compiler/linkage.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/osr.cc
diff --git a/src/compiler/osr.cc b/src/compiler/osr.cc
index 55431c201c69250984daf1f7c051950d359da6f5..86a71430f1aa406c670205da3ac5fdb9a5794671 100644
--- a/src/compiler/osr.cc
+++ b/src/compiler/osr.cc
@@ -24,10 +24,16 @@ namespace internal {
namespace compiler {
OsrHelper::OsrHelper(CompilationInfo* info)
- : parameter_count_(info->scope()->num_parameters()),
- stack_slot_count_(info->scope()->num_stack_slots() +
- info->osr_expr_stack_height()) {}
-
+ : parameter_count_(
+ info->is_optimizing_from_bytecode()
+ ? info->shared_info()->bytecode_array()->parameter_count()
+ : info->scope()->num_parameters()),
+ stack_slot_count_(
+ info->is_optimizing_from_bytecode()
+ ? info->shared_info()->bytecode_array()->register_count() +
+ InterpreterFrameConstants::kExtraSlotCount
+ : info->scope()->num_stack_slots() +
+ info->osr_expr_stack_height()) {}
#ifdef DEBUG
#define TRACE_COND (FLAG_trace_turbo_graph && FLAG_trace_osr)
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698