Last Comment Bug 771896 - rm LOAD_ATOM, LOAD_NAME, and 'atoms' from js::Interpret
: rm LOAD_ATOM, LOAD_NAME, and 'atoms' from js::Interpret
Status: RESOLVED FIXED
[js:t]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Luke Wagner [:luke]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-08 04:35 PDT by Luke Wagner [:luke]
Modified: 2012-07-09 18:05 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (19.48 KB, patch)
2012-07-08 04:35 PDT, Luke Wagner [:luke]
jwalden+bmo: review+
Details | Diff | Review

Description Luke Wagner [:luke] 2012-07-08 04:35:30 PDT
Created attachment 640053 [details] [diff] [review]
patch

Less macros and less local Interpret static to get wrong.
Comment 1 Jeff Walden [:Waldo] (remove +bmo to email) 2012-07-08 08:37:20 PDT
Comment on attachment 640053 [details] [diff] [review]
patch

Review of attachment 640053 [details] [diff] [review]:
-----------------------------------------------------------------

"Bookends", eh?  ;-)

::: js/src/jsinterp.cpp
@@ +1786,5 @@
>  END_CASE(JSOP_PICK)
>  
>  BEGIN_CASE(JSOP_SETCONST)
>  {
> +    PropertyName *name = script->getName(regs.pc);

Perhaps this should use rootName0 instead?

::: js/src/jsscript.h
@@ +784,5 @@
>          return atoms[index];
>      }
>  
> +    js::HeapPtrAtom &getAtom(jsbytecode *pc) const {
> +        JS_ASSERT(pc >= code && pc < code + length);

pc + sizeof(uint32_t) < code + length seems better.

@@ +793,5 @@
>          return getAtom(index)->asPropertyName();
>      }
>  
> +    js::PropertyName *getName(jsbytecode *pc) const {
> +        JS_ASSERT(pc >= code && pc < code + length);

Id.

@@ +804,5 @@
>          return arr->vector[index];
>      }
>  
> +    JSObject *getObject(jsbytecode *pc) {
> +        JS_ASSERT(pc >= code && pc < code + length);

Id.
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-07-09 18:05:26 PDT
https://hg.mozilla.org/mozilla-central/rev/5645ad3abc2c

Note You need to log in before you can comment on or make changes to this bug.