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

Issue 2399463008: Create multiple compilation jobs for ignition if compiling multiple literals (Closed)

Created:
4 years, 2 months ago by jochen (gone - plz use gerrit)
Modified:
4 years ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Create multiple compilation jobs for ignition if compiling multiple literals BUG=v8:5394 R=mstarzinger@chromium.org,rmcilroy@chromium.org

Patch Set 1 #

Total comments: 4

Patch Set 2 : updates #

Total comments: 1

Patch Set 3 : rebase #

Patch Set 4 : updates #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+306 lines, -91 lines) Patch
M BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A src/ast/collect-eager-literals.h View 1 2 3 1 chunk +44 lines, -0 lines 1 comment Download
A src/ast/collect-eager-literals.cc View 1 2 3 1 chunk +43 lines, -0 lines 6 comments Download
M src/compiler.h View 1 2 3 8 chunks +27 lines, -11 lines 0 comments Download
M src/compiler.cc View 1 2 3 10 chunks +129 lines, -46 lines 1 comment Download
M src/compiler-dispatcher/compiler-dispatcher-job.h View 3 chunks +3 lines, -2 lines 0 comments Download
M src/compiler-dispatcher/compiler-dispatcher-job.cc View 1 2 3 4 chunks +17 lines, -14 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.h View 1 2 3 chunks +4 lines, -2 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 4 chunks +12 lines, -9 lines 0 comments Download
M src/interpreter/interpreter.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 5 chunks +14 lines, -6 lines 0 comments Download
M src/v8.gyp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
jochen (gone - plz use gerrit)
fyi, still doesn't pass tests, but this is what I plan to do roughly
4 years, 2 months ago (2016-10-07 09:30:41 UTC) #1
rmcilroy
https://codereview.chromium.org/2399463008/diff/1/src/compiler.h File src/compiler.h (right): https://codereview.chromium.org/2399463008/diff/1/src/compiler.h#newcode60 src/compiler.h:60: PrepareUnoptimizedCompilationJob(CompilationInfo* info); nit - Job->Jobs https://codereview.chromium.org/2399463008/diff/1/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): ...
4 years, 2 months ago (2016-10-07 14:26:35 UTC) #2
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2399463008/diff/1/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/2399463008/diff/1/src/interpreter/interpreter.cc#newcode238 src/interpreter/interpreter.cc:238: : public AstTraversalVisitor<CollectEagerFunctionLiterals> { On 2016/10/07 at 14:26:34, rmcilroy ...
4 years, 2 months ago (2016-10-07 14:55:25 UTC) #3
jochen (gone - plz use gerrit)
4 years, 2 months ago (2016-10-07 14:55:32 UTC) #4
rmcilroy
On 2016/10/07 14:55:25, jochen wrote: > https://codereview.chromium.org/2399463008/diff/1/src/interpreter/interpreter.cc > File src/interpreter/interpreter.cc (right): > > https://codereview.chromium.org/2399463008/diff/1/src/interpreter/interpreter.cc#newcode238 > ...
4 years, 2 months ago (2016-10-07 15:20:34 UTC) #5
jochen (gone - plz use gerrit)
... new patch set. Still doesn't work. https://codereview.chromium.org/2399463008/diff/20001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/2399463008/diff/20001/src/interpreter/interpreter.cc#newcode307 src/interpreter/interpreter.cc:307: Compiler::Renumber(parse_info.get()); ^^^ ...
4 years, 2 months ago (2016-10-07 15:40:49 UTC) #6
jochen (gone - plz use gerrit)
now it works!
4 years, 2 months ago (2016-10-11 16:50:41 UTC) #9
jochen (gone - plz use gerrit)
+bmeurer while everybody else is out :-/
4 years, 2 months ago (2016-10-11 16:51:12 UTC) #11
Benedikt Meurer
You really need appropriate reviewers for this. I'm not familiar with any of this.
4 years, 2 months ago (2016-10-12 03:25:23 UTC) #14
Michael Starzinger
I have to admit that I haven't fully grasped the lifetime management of CompilationInfo and ...
4 years, 2 months ago (2016-10-17 13:16:04 UTC) #15
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2399463008/diff/60001/src/ast/collect-eager-literals.cc File src/ast/collect-eager-literals.cc (right): https://codereview.chromium.org/2399463008/diff/60001/src/ast/collect-eager-literals.cc#newcode23 src/ast/collect-eager-literals.cc:23: if (variable->location() == VariableLocation::UNALLOCATED) { On 2016/10/17 at 13:16:03, ...
4 years, 2 months ago (2016-10-17 13:19:10 UTC) #16
Michael Starzinger
4 years, 2 months ago (2016-10-17 13:37:49 UTC) #17
https://codereview.chromium.org/2399463008/diff/60001/src/ast/collect-eager-l...
File src/ast/collect-eager-literals.cc (right):

https://codereview.chromium.org/2399463008/diff/60001/src/ast/collect-eager-l...
src/ast/collect-eager-literals.cc:23: if (variable->location() ==
VariableLocation::UNALLOCATED) {
On 2016/10/17 13:19:10, jochen wrote:
> On 2016/10/17 at 13:16:03, Michael Starzinger wrote:
> > Why have this special handling here? Any FunctionDeclaration will evaluate
the
> function literal one way or the other. Wouldn't it be sufficient to just have
> the default visitation function for function declarations and let everything
> just go through VisitFunctionLiteral below?
> 
> VisitFunctionLiteral doesn't visit the declarations of the function, so it's
> possible that it won't see a function that is only declared in that scope, and
> only used in a lazily parsed scope

Not sure I fully understand your response,
AstTraversalVisitor::VisitFunctionLiteral _does_ visit scope->declarations()
AFAICT. Can you elaborate?

https://codereview.chromium.org/2399463008/diff/60001/src/ast/collect-eager-l...
src/ast/collect-eager-literals.cc:27: return;
On 2016/10/17 13:19:10, jochen wrote:
> On 2016/10/17 at 13:16:03, Michael Starzinger wrote:
> > nit: Why return here? Shouldn't we always fall through to
> AstTraversalVisitor::VisitFunctionDeclaration just to play it safe? If we ever
> add sub-expressions of any kind to a FunctionLiteral it would stop working
> otherwise.
> 
> if a function doesn't eager compiler, it might not have a body(), however, the
> AstTraversalVisitor blindly visits the body...

Then this should go into VisitFunctionLiteral below and basically read "if
(fun->body() == nullptr) return" there IMHO. One could even argue that this is a
"bug" in AstTraversalVisitor in the first place and the handling should go
there. WDYT?

Powered by Google App Engine
This is Rietveld 408576698