Closed Bug 773339 Opened 10 years ago Closed 10 years ago

IonMonkey: Refactor Compile in Ion.cpp to be templated and not use fp

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: shu, Unassigned)

References

Details

(Whiteboard: [ion:t])

Attachments

(1 file)

Attached patch refactorSplinter Review
For RiverTrail implementation we'd like the ability to try to compile a script without invoking it. I would like to reuse the Compile logic for this.
The idea is, for instance, be able to write something like a |CanEnterParallelArrayKernel| that then calls |Compile<ParallelArrayKernelCompiler>|.
Comment on attachment 641518 [details] [diff] [review]
refactor

Based on patch from bug 773123 already applied.
Attachment #641518 - Flags: review?(dvander)
Depends on: 773123
Comment on attachment 641518 [details] [diff] [review]
refactor

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

r=me with these changes:

::: js/src/ion/Ion.cpp
@@ +931,5 @@
>      // This check is to not overrun the stack. Eventually, we will want to
>      // handle this when we support JSOP_ARGUMENTS or function calls.
> +    if (fp->isFunctionFrame() &&
> +        (fp->numActualArgs() >= SNAPSHOT_MAX_NARGS ||
> +         fp->numActualArgs() > js_IonOptions.maxStackArgs)) {

nit: { on newline, for multi-line conditionals.

@@ +1090,5 @@
>          fp->functionThis().setObject(*obj);
>      }
>  
> +    // Skip if frame can't be handled.
> +    if (!CheckFrame(fp))

If this fails, we'll no longer call ForbidCompilation, so each place this is called, we should explicitly call it.
Attachment #641518 - Flags: review?(dvander) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/7a13838698ed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.