| Index: src/compiler.cc
|
| ===================================================================
|
| --- src/compiler.cc (revision 3964)
|
| +++ src/compiler.cc (working copy)
|
| @@ -31,14 +31,14 @@
|
| #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"
|
| +#include "liveedit.h"
|
| #include "oprofile-agent.h"
|
| #include "rewriter.h"
|
| #include "scopes.h"
|
| -#include "usage-analyzer.h"
|
| -#include "liveedit.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -48,7 +48,7 @@
|
| FunctionLiteral* function = info->function();
|
| ASSERT(function != NULL);
|
| // Rewrite the AST by introducing .result assignments where needed.
|
| - if (!Rewriter::Process(function) || !AnalyzeVariableUsage(function)) {
|
| + if (!Rewriter::Process(function)) {
|
| // Signal a stack overflow by returning a null handle. The stack
|
| // overflow exception will be thrown by the caller.
|
| return Handle<Code>::null();
|
| @@ -79,6 +79,17 @@
|
| 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:
|
| @@ -117,6 +128,14 @@
|
| }
|
|
|
|
|
| +#ifdef ENABLE_DEBUGGER_SUPPORT
|
| +Handle<Code> MakeCodeForLiveEdit(CompilationInfo* info) {
|
| + Handle<Context> context = Handle<Context>::null();
|
| + return MakeCode(context, info);
|
| +}
|
| +#endif
|
| +
|
| +
|
| static Handle<JSFunction> MakeFunction(bool is_global,
|
| bool is_eval,
|
| Compiler::ValidationState validate,
|
| @@ -224,7 +243,7 @@
|
|
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| // Notify debugger
|
| - Debugger::OnAfterCompile(script, fun);
|
| + Debugger::OnAfterCompile(script, Debugger::NO_AFTER_COMPILE_FLAGS);
|
| #endif
|
|
|
| return fun;
|
| @@ -448,6 +467,17 @@
|
| 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.
|
|
|