Closed
Bug 944946
Opened 10 years ago
Closed 10 years ago
Use accessor methods for script->code and script->length
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
146.87 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
To mark script->code and script->length accesses as threadsafe when used during Ion compilation, these members need to be accessed only via methods. The attached patch makes this change, and also adds some helper methods to capture the great majority of uses of these members: script->codeEnd(), script->containsPC(pc), script->pcToOffset(pc) and script->offsetToPC(offset).
Attachment #8340707 -
Flags: review?(jdemooij)
Comment 1•10 years ago
|
||
Comment on attachment 8340707 [details] [diff] [review] patch Review of attachment 8340707 [details] [diff] [review]: ----------------------------------------------------------------- Nice! ::: js/src/jit/CompileInfo.h @@ +100,3 @@ > } > jsbytecode *limitPC() const { > + return script_->code() + script_->length(); Nit: script_->codeEnd()
Attachment #8340707 -
Flags: review?(jdemooij) → review+
Comment 2•10 years ago
|
||
Comment on attachment 8340707 [details] [diff] [review] patch Review of attachment 8340707 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsopcode.cpp @@ +288,2 @@ > JSOp op = JSOp(*pc); > + jsbytecode *next = GetNextPc(pc); I just ran into a problem with GetNextPc and it made me think of this line. Unlike GetBytecodeLength, GetNextPc doesn't handle variable-length ops. So change it from return pc + js_CodeSpec[JSOp(*pc)].length; to return pc + GetBytecodeLength(pc); So that it doesn't iloop when there's a TABLESWITCH or something (CodeSpec length == -1).
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d0bdb5b5dbd6
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d0bdb5b5dbd6
Assignee: nobody → bhackett1024
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•10 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•