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

Unified Diff: src/compiler/pipeline.cc

Issue 1291693004: [Interpreter] Bytecode graph builder (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More fixes for bots (tests w/ ASAN and tests w/ slow asserts enabled). Created 5 years, 3 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/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index bd03020965aafd5f6d0c4c96e66c4ef0610a0672..fd79a865e2403b423ab819043bdceb7443dfda8c 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -12,6 +12,7 @@
#include "src/compiler/ast-graph-builder.h"
#include "src/compiler/ast-loop-assignment-analyzer.h"
#include "src/compiler/basic-block-instrumentor.h"
+#include "src/compiler/bytecode-graph-builder.h"
#include "src/compiler/change-lowering.h"
#include "src/compiler/code-generator.h"
#include "src/compiler/common-operator-reducer.h"
@@ -472,11 +473,21 @@ struct GraphBuilderPhase {
static const char* phase_name() { return "graph builder"; }
void Run(PipelineData* data, Zone* temp_zone) {
- AstGraphBuilderWithPositions graph_builder(
- temp_zone, data->info(), data->jsgraph(), data->loop_assignment(),
- data->js_type_feedback(), data->source_positions());
bool stack_check = !data->info()->IsStub();
- if (!graph_builder.CreateGraph(stack_check)) {
+ bool succeeded = false;
+
+ if (data->info()->shared_info()->HasBytecodeArray()) {
+ BytecodeGraphBuilder graph_builder(temp_zone, data->info(),
+ data->jsgraph());
+ succeeded = graph_builder.CreateGraph(stack_check);
+ } else {
+ AstGraphBuilderWithPositions graph_builder(
+ temp_zone, data->info(), data->jsgraph(), data->loop_assignment(),
+ data->js_type_feedback(), data->source_positions());
+ succeeded = graph_builder.CreateGraph(stack_check);
+ }
+
+ if (!succeeded) {
data->set_compilation_failed();
}
}

Powered by Google App Engine
This is Rietveld 408576698