WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105232
Constant fold !{number} in the parser
https://bugs.webkit.org/show_bug.cgi?id=105232
Summary
Constant fold !{number} in the parser
Geoffrey Garen
Reported
2012-12-17 17:11:01 PST
Constant fold !{number} in the parser
Attachments
Patch
(2.16 KB, patch)
2012-12-17 17:18 PST
,
Geoffrey Garen
fpizlo
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2012-12-17 17:18:10 PST
Created
attachment 179839
[details]
Patch
Filip Pizlo
Comment 2
2012-12-17 17:21:49 PST
Comment on
attachment 179839
[details]
Patch R=me We should have the parser do more extensive constant folding. It will reduce (a) reduce amount of bytecode, (b) reduce amount of baseline JIT machine code, and (c) reduce the amount of work that the DFG has to do.
Geoffrey Garen
Comment 3
2012-12-17 22:55:50 PST
Committed
r137988
: <
http://trac.webkit.org/changeset/137988
>
Darin Adler
Comment 4
2012-12-18 09:23:55 PST
The comment makes it sound like you’d want to do this for other constant nodes such as NullNode, BooleanNode, StringNode, RegExpNode, ThisNode, and ArrayNode. I’m assuming we don’t do that because the only cases that are actually common are !0 and !1, not, say !null or !true or !false. Since we’re already calling a virtual function just to find out it’s a number node it seems like we could do a version with more coverage. The only cost of this seems to be more code in Nodes.h/cpp.
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