WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99258
Array length array profiling is broken in the baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=99258
Summary
Array length array profiling is broken in the baseline JIT
Filip Pizlo
Reported
2012-10-13 20:14:38 PDT
It seems that a well-intentioned no-DFG-JIT build fix borked it.
Attachments
the patch
(1.77 KB, patch)
2012-10-13 20:21 PDT
,
Filip Pizlo
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2012-10-13 20:21:09 PDT
Created
attachment 168573
[details]
the patch
Filip Pizlo
Comment 2
2012-10-14 12:43:36 PDT
Landed in
http://trac.webkit.org/changeset/131268
Geoffrey Garen
Comment 3
2012-10-14 19:24:57 PDT
Comment on
attachment 168573
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168573&action=review
> Source/JavaScriptCore/ChangeLog:11 > + canBeOptimized() returns true. But m_canBeOptimized is only initialized during > + full method compiles, so in a stub compile it may (or may not) be false, meaning
Please also fix the JIT constructor, so that it default-initializes m_canBeOptimized to false. Why is this initialization code in privateCompile(), and not in the the constructor, to begin with?
Filip Pizlo
Comment 4
2012-10-14 19:31:16 PDT
(In reply to
comment #3
)
> (From update of
attachment 168573
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=168573&action=review
> > > Source/JavaScriptCore/ChangeLog:11 > > + canBeOptimized() returns true. But m_canBeOptimized is only initialized during > > + full method compiles, so in a stub compile it may (or may not) be false, meaning > > Please also fix the JIT constructor, so that it default-initializes m_canBeOptimized to false.
https://bugs.webkit.org/show_bug.cgi?id=99283
> > Why is this initialization code in privateCompile(), and not in the the constructor, to begin with?
I think that it makes sense for the decision logic to be in privateCompile(). In particular, this statement: DFG::CapabilityLevel level = m_codeBlock->canCompileWithDFG(); does an O(n) walk over the code block's bytecode. We don't want that to happen every time we construct a JIT, since we do that for every stub compile.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug