On 2013/01/14 15:16:03, Michael Starzinger wrote:
LGTM, with a suggestion.

https://codereview.chromium.org/11661008/diff/1/src/compiler.cc
File src/compiler.cc (right):

https://codereview.chromium.org/11661008/diff/1/src/compiler.cc#newcode516
src/compiler.cc:516: !isolate->DebuggerHasBreakPoints()) {
To make this completely consistent with the predicate for the compiler call in
BuildFunctionInfo we would also need to check whether the
LiveEditFunctionTracker is active.

How about we move this whole predicate into a static helper to avoid
duplication? I was thinking of something like ...

static bool DebuggerWantsEagerCompilation(bool allow_lazy_without_ctx) {
   return LiveEditFunctionTracker::IsActive(info.isolate()) ||
          (info.isolate()->DebuggerHasBreakPoints() &&
!allow_lazy_without_ctx);
}

Of course here we don't know whether lazy compilation without context is
allowed, so that would be set to false here. But we would be able share this
predicate with BuildFunctionInfo.


https://codereview.chromium.org/11661008/diff/1/test/mjsunit/regress/regress-147497.js
File test/mjsunit/regress/regress-147497.js (right):


https://codereview.chromium.org/11661008/diff/1/test/mjsunit/regress/regress-147497.js#newcode1
test/mjsunit/regress/regress-147497.js:1: // Copyright 2012 the V8 project
authors. All rights reserved.
2013, since it's a new file. Unless I misunderstood the current copyright
header
policy, which might very well be possible.

Addressed comment. Landing.

https://codereview.chromium.org/11661008/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to