BaselineCompiler: Implement Argument Check ICs

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: djvj, Assigned: bhackett)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
When entering a script, its argument typesets need to be updated with the incoming arguments.  Add an IC to do this.
(Assignee)

Updated

5 years ago
Assignee: general → bhackett1024
(Assignee)

Comment 1

5 years ago
Created attachment 710733 [details] [diff] [review]
patch

Reuse TypeMonitor stubs for monitoring this/arguments, allowing them to be directly jumped to rather than requiring an existing fallback.
Attachment #710733 - Flags: review?(kvijayan)
(Reporter)

Comment 2

5 years ago
Comment on attachment 710733 [details] [diff] [review]
patch

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

::: js/src/ion/BaselineCompiler.cpp
@@ +426,5 @@
> +
> +    ICTypeMonitor_Fallback::Compiler compiler(cx, (uint32_t) 0);
> +    if (!emitIC(compiler.getStub(&stubSpace_)))
> +        return false;
> + 

Nit: Trailing whitespace on blank line above.

::: js/src/ion/BaselineIC.cpp
@@ +45,5 @@
>      }
>  }
> +
> +void
> +TypeFallbackICSpew(JSContext *cx, ICTypeMonitor_Fallback *stub, const char *fmt, ...)

This definition is inside an #ifdef DEBUG section.  Opt builds will fail because name will not be defined.

Add #define TypeFallbackICSpew(...) in the #else section below.

::: js/src/ion/BaselineJIT.cpp
@@ +388,5 @@
>          // a pointer to the (now available) realEntry.
>          if (realEntry.firstStub()->isFallback())
>              realEntry.firstStub()->toFallbackStub()->fixupICEntry(&realEntry);
> +
> +        if (realEntry.firstStub()->kind() == ICStub::TypeMonitor_Fallback) {

Nit: can be realEntry.firstStub()->isTypeMonitor_Fallback()
Attachment #710733 - Flags: review?(kvijayan) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/projects/ionmonkey/rev/51d0b544cfc6
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.