| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 557a91e4db434d2af30ee2170eded3f707f5caf5..52752fa0683f4f209583ee283965e5b6d3ccf310 100755
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -31,6 +31,7 @@
|
| #include "codegen-inl.h"
|
| #include "compilation-cache.h"
|
| #include "compiler.h"
|
| +#include "data-flow.h"
|
| #include "debug.h"
|
| #include "fast-codegen.h"
|
| #include "full-codegen.h"
|
| @@ -79,6 +80,17 @@ static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) {
|
| return Handle<Code>::null();
|
| }
|
|
|
| + if (FLAG_use_flow_graph) {
|
| + FlowGraphBuilder builder;
|
| + builder.Build(function);
|
| +
|
| +#ifdef DEBUG
|
| + if (FLAG_print_graph_text) {
|
| + builder.graph()->PrintText(builder.postorder());
|
| + }
|
| +#endif
|
| + }
|
| +
|
| // Generate code and return it. Code generator selection is governed by
|
| // which backends are enabled and whether the function is considered
|
| // run-once code or not:
|
| @@ -444,6 +456,17 @@ Handle<JSFunction> Compiler::BuildBoilerplate(FunctionLiteral* literal,
|
| return Handle<JSFunction>::null();
|
| }
|
|
|
| + if (FLAG_use_flow_graph) {
|
| + FlowGraphBuilder builder;
|
| + builder.Build(literal);
|
| +
|
| +#ifdef DEBUG
|
| + if (FLAG_print_graph_text) {
|
| + builder.graph()->PrintText(builder.postorder());
|
| + }
|
| +#endif
|
| + }
|
| +
|
| // Generate code and return it. The way that the compilation mode
|
| // is controlled by the command-line flags is described in
|
| // the static helper function MakeCode.
|
|
|