Note: There are a few cases of duplicates in user autocompletion which are being worked on.

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

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Shu-yu Guo (backlogged), Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ion:t])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 641518 [details] [diff] [review]
refactor

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.
(Reporter)

Comment 1

5 years ago
The idea is, for instance, be able to write something like a |CanEnterParallelArrayKernel| that then calls |Compile<ParallelArrayKernelCompiler>|.
(Reporter)

Comment 2

5 years ago
Comment on attachment 641518 [details] [diff] [review]
refactor

Based on patch from bug 773123 already applied.
Attachment #641518 - Flags: review?(dvander)
(Reporter)

Updated

5 years ago
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+
Whiteboard: [ion:t]
(Reporter)

Comment 4

5 years ago
http://hg.mozilla.org/projects/ionmonkey/rev/7a13838698ed
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.