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

Unified Diff: src/interpreter/interpreter.cc

Issue 2399463008: Create multiple compilation jobs for ignition if compiling multiple literals (Closed)
Patch Set: updates Created 4 years, 2 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/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index f513f0045ea5cee81d7e9fce807eaa30ea8cf4d5..25d678f118c4784f27d04c260c99dff6263c23a5 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -33,7 +33,8 @@ typedef InterpreterAssembler::Arg Arg;
class InterpreterCompilationJob final : public CompilationJob {
public:
- explicit InterpreterCompilationJob(CompilationInfo* info);
+ InterpreterCompilationJob(CompilationInfo* info,
+ ShouldCompile should_compile);
protected:
Status PrepareJobImpl() final;
@@ -45,6 +46,8 @@ class InterpreterCompilationJob final : public CompilationJob {
BytecodeGenerator generator_;
+ ShouldCompile should_compile_;
+
DISALLOW_COPY_AND_ASSIGN(InterpreterCompilationJob);
};
@@ -150,8 +153,11 @@ int Interpreter::InterruptBudget() {
return FLAG_interrupt_budget * kCodeSizeMultiplier;
}
-InterpreterCompilationJob::InterpreterCompilationJob(CompilationInfo* info)
- : CompilationJob(info->isolate(), info, "Ignition"), generator_(info) {}
+InterpreterCompilationJob::InterpreterCompilationJob(
+ CompilationInfo* info, ShouldCompile should_compile)
+ : CompilationJob(info->isolate(), info, "Ignition"),
+ generator_(info),
+ should_compile_(should_compile) {}
InterpreterCompilationJob::Status InterpreterCompilationJob::PrepareJobImpl() {
if (FLAG_print_bytecode || FLAG_print_ast) {
@@ -192,7 +198,8 @@ InterpreterCompilationJob::Status InterpreterCompilationJob::ExecuteJobImpl() {
}
InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() {
- Handle<BytecodeArray> bytecodes = generator()->FinalizeBytecode(isolate());
+ Handle<BytecodeArray> bytecodes =
+ generator()->FinalizeBytecode(isolate(), should_compile_);
if (generator()->HasStackOverflow()) {
return FAILED;
}
@@ -208,8 +215,9 @@ InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() {
return SUCCEEDED;
}
-CompilationJob* Interpreter::NewCompilationJob(CompilationInfo* info) {
- return new InterpreterCompilationJob(info);
+CompilationJob* Interpreter::NewCompilationJob(CompilationInfo* info,
+ ShouldCompile should_compile) {
+ return new InterpreterCompilationJob(info, should_compile);
}
bool Interpreter::IsDispatchTableInitialized() {
« src/compiler.cc ('K') | « src/interpreter/interpreter.h ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698