WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126543
FTL should ascribe range meta-data when loading array.length
https://bugs.webkit.org/show_bug.cgi?id=126543
Summary
FTL should ascribe range meta-data when loading array.length
Filip Pizlo
Reported
2014-01-06 15:41:01 PST
This will allow some interesting optimizations on the LLVM side.
Attachments
the patch
(19.42 KB, patch)
2014-01-19 17:20 PST
,
Filip Pizlo
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2014-01-19 17:20:46 PST
Created
attachment 221604
[details]
the patch
Filip Pizlo
Comment 2
2014-01-19 17:22:34 PST
Landed in branch in
http://trac.webkit.org/changeset/162299
Geoffrey Garen
Comment 3
2014-01-19 17:59:37 PST
Comment on
attachment 221604
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=221604&action=review
r=me
> Source/JavaScriptCore/ftl/FTLCommonValues.cpp:65 > + , nonNegativeInt32(constInt(int32, 0, SignExtend), constInt(int32, 1ll << 31, SignExtend))
Why the "ll" after the "1"?
Filip Pizlo
Comment 4
2014-01-19 18:12:23 PST
(In reply to
comment #3
)
> (From update of
attachment 221604
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=221604&action=review
> > r=me > > > Source/JavaScriptCore/ftl/FTLCommonValues.cpp:65 > > + , nonNegativeInt32(constInt(int32, 0, SignExtend), constInt(int32, 1ll << 31, SignExtend)) > > Why the "ll" after the "1"?
constInt() takes a long long, so I figured that I'd avoid all ambiguity in the implicit integer casting by just starting out with 1 being a long long. Also, "1" is a 32-bit int and 2^31 isn't a valid 32-bit int value. So, 1 << 31 is subject to some overflow rules, and I don't feel like figuring out what exactly they are. It's one of those things that feels like it might fall under undefined behavior and I don't like having to think about that.
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