WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
183857
Use CodeBlock::instructions()[] and CodeBlock::bytecodeOffset() instead of doing own pointer math.
https://bugs.webkit.org/show_bug.cgi?id=183857
Summary
Use CodeBlock::instructions()[] and CodeBlock::bytecodeOffset() instead of do...
Mark Lam
Reported
2018-03-21 10:05:43 PDT
We should avoid doing pointer math with CodeBlock::instructions().begin(). Instead, we should use the operator[] that comes with CodeBlock::instructions() for computing an Instruction*, and use CodeBlock::bytecodeOffset() for computing the bytecode offset of a given Instruction*. These methods will do assertions which helps catch bugs sooner, plus they are more descriptive of the operation we're trying to do.
Attachments
proposed patch.
(24.16 KB, patch)
2018-03-21 10:12 PDT
,
Mark Lam
mark.lam
: review-
Details
Formatted Diff
Diff
proposed patch.
(24.15 KB, patch)
2018-03-21 10:18 PDT
,
Mark Lam
mark.lam
: review-
Details
Formatted Diff
Diff
proposed patch.
(24.15 KB, patch)
2018-03-21 10:23 PDT
,
Mark Lam
jfbastien
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-03-21 10:06:12 PDT
<
rdar://problem/38712184
>
Mark Lam
Comment 2
2018-03-21 10:12:00 PDT
Created
attachment 336203
[details]
proposed patch.
EWS Watchlist
Comment 3
2018-03-21 10:14:30 PDT
Attachment 336203
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:199: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] Total errors found: 1 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
JF Bastien
Comment 4
2018-03-21 10:16:10 PDT
Comment on
attachment 336203
[details]
proposed patch. r=me
Mark Lam
Comment 5
2018-03-21 10:16:22 PDT
Comment on
attachment 336203
[details]
proposed patch. Will fix issues.
Mark Lam
Comment 6
2018-03-21 10:18:28 PDT
Created
attachment 336206
[details]
proposed patch.
Mark Lam
Comment 7
2018-03-21 10:23:04 PDT
Created
attachment 336208
[details]
proposed patch.
EWS Watchlist
Comment 8
2018-03-21 10:26:17 PDT
Attachment 336208
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:199: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] Total errors found: 1 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
JF Bastien
Comment 9
2018-03-21 10:33:44 PDT
Comment on
attachment 336208
[details]
proposed patch. r=me
Mark Lam
Comment 10
2018-03-21 11:24:03 PDT
Thanks for the review. Landed in
r229815
: <
http://trac.webkit.org/r229815
>.
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