Index: src/codegen.cc |
diff --git a/src/codegen.cc b/src/codegen.cc |
index 1c3ecc40591488dae0f04f2f72f24cb0c7d3068f..01ee6d07204528e730192fffbfff149bd16f5cc2 100644 |
--- a/src/codegen.cc |
+++ b/src/codegen.cc |
@@ -31,6 +31,7 @@ |
#include "codegen-inl.h" |
#include "compiler.h" |
#include "debug.h" |
+#include "liveedit.h" |
#include "oprofile-agent.h" |
#include "prettyprinter.h" |
#include "register-allocator-inl.h" |
@@ -234,6 +235,7 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm, |
// all the pieces into a Code object. This function is only to be called by |
// the compiler.cc code. |
Handle<Code> CodeGenerator::MakeCode(CompilationInfo* info) { |
+ LiveEditFunctionTracker live_edit_tracker(info->function()); |
Handle<Script> script = info->script(); |
if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
int len = String::cast(script->source())->length(); |
@@ -245,6 +247,7 @@ Handle<Code> CodeGenerator::MakeCode(CompilationInfo* info) { |
MacroAssembler masm(NULL, kInitialBufferSize); |
CodeGenerator cgen(&masm); |
CodeGeneratorScope scope(&cgen); |
+ live_edit_tracker.RecordFunctionScope(info->function()->scope()); |
cgen.Generate(info, PRIMARY); |
if (cgen.HasStackOverflow()) { |
ASSERT(!Top::has_pending_exception()); |
@@ -253,7 +256,9 @@ Handle<Code> CodeGenerator::MakeCode(CompilationInfo* info) { |
InLoopFlag in_loop = (cgen.loop_nesting() != 0) ? IN_LOOP : NOT_IN_LOOP; |
Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop); |
- return MakeCodeEpilogue(cgen.masm(), flags, info); |
+ Handle<Code> result = MakeCodeEpilogue(cgen.masm(), flags, info); |
+ live_edit_tracker.RecordFunctionCode(result); |
+ return result; |
} |