Closed
Bug 832373
Opened 11 years ago
Closed 11 years ago
Refactor eval-in-frame to use AbstractFramePtr
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(3 files)
46.89 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
9.62 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
6.91 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
For eval(-in-frame) the caller StackFrame is passed down to the frontend and various other parts. This should be an AbstractFramePtr so that it works with the baseline compiler.
Attachment #703948 -
Flags: review?(luke)
Comment 2•11 years ago
|
||
Comment on attachment 703948 [details] [diff] [review] Part 1: Use AbstractFramePtr Review of attachment 703948 [details] [diff] [review]: ----------------------------------------------------------------- Nice! ::: js/src/builtin/Eval.cpp @@ +317,5 @@ > if (!WarnOnTooManyArgs(cx, args)) > return false; > > Rooted<GlobalObject*> global(cx, &args.callee().global()); > + return EvalKernel(cx, args, INDIRECT_EVAL, AbstractFramePtr(), global); I think it'd be slightly more readable to have a NullFramePtr() where, perhaps NullFramePtr was a derived class and the AbstractFramePtr() default constructor was protected. ::: js/src/vm/Stack.h @@ +227,5 @@ > + > + AbstractFramePtr(StackFrame *fp) > + : ptr_(fp ? uintptr_t(fp) | 0x1 : 0) > + { > + } Could you JS_ASSERT((uintptr_t(fp) & 1) == 0) here and below?
Attachment #703948 -
Flags: review?(luke) → review+
Assignee | ||
Comment 3•11 years ago
|
||
If eval-in-frame is used with a baseline JIT frame, set the frame's prev_ link to its entry frame.
Attachment #704500 -
Flags: review?(luke)
Assignee | ||
Comment 4•11 years ago
|
||
Patch for the baseline JIT branch. With these patches the frame.eval() tests pass.
Attachment #704519 -
Flags: review?(luke)
Assignee | ||
Comment 5•11 years ago
|
||
Part 1 with nits addressed: https://hg.mozilla.org/integration/mozilla-inbound/rev/1392d241c137 (In reply to Luke Wagner [:luke] from comment #2) > I think it'd be slightly more readable to have a NullFramePtr() where, > perhaps NullFramePtr was a derived class and the AbstractFramePtr() default > constructor was protected. Great suggestion, I agree NullFramePtr() looks much nicer.
Whiteboard: [leave open]
Comment 6•11 years ago
|
||
Comment on attachment 704500 [details] [diff] [review] Part 2: initExecuteFrame, m-c part Review of attachment 704500 [details] [diff] [review]: ----------------------------------------------------------------- Very nice ::: js/src/vm/Stack.cpp @@ +1080,4 @@ > */ > CallArgsList *evalInFrameCalls = NULL; /* quell overwarning */ > MaybeExtend extend; > + StackFrame *prevLink = NULL; I tend to leave off initialization when GCC warnings don't force it since it indicates "I'm declaring this to initialize it on the branches below". ::: js/src/vm/Stack.h @@ +301,5 @@ > inline bool prevUpToDate() const; > inline void setPrevUpToDate() const; > inline AbstractFramePtr evalPrev() const; > > + inline void *annotation() const; die!
Attachment #704500 -
Flags: review?(luke) → review+
Updated•11 years ago
|
Attachment #704519 -
Flags: review?(luke) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Part 2, with nit addressed: https://hg.mozilla.org/integration/mozilla-inbound/rev/cec0e9df1d2c
Assignee | ||
Comment 8•11 years ago
|
||
Part 3: https://hg.mozilla.org/projects/ionmonkey/rev/7e34528bc2b7
Status: NEW → ASSIGNED
Whiteboard: [leave open]
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1392d241c137
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•