Closed Bug 1524494 Opened 3 years ago Closed 3 years ago

Split JSOP_GETARG/JSOP_SETARG in arguments/no-arguments ops

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jandem, Unassigned)

References

Details

JSOP_GETARG and JSOP_SETARG currently have to check script->argumentsAliasesFormals() and this involves checking two script flags.

Given that the no-arguments-object case is by far the most common, I think it makes sense to add separate JSOP_GETARG_ARGUMENTS and JSOP_SETARG_ARGUMENTS for the slower ArgumentsObject path.

This way JSOP_GETARG and JSOP_SETARG can do the dumb and fast thing without worrying about ArgumentsObject aliasing.

Priority: -- → P3

I forgot about this bug. We no longer need this for the interpreter work: generated interpreter code now checks the frame's HAS_ARGS_OBJ flag first and that's probably a fast-enough path for now.

One issue with the proposal in comment 0 is that |script->argsObjAliasesFormals()| depends on the mutable NeedsArgsObj flag, so JSOP_{G,S}ETARG_ARGUMENTS would need code to handle the unaliased/no-arguments-object JSOP_GETARG/JSOP_SETARG code anyway. I'm not sure if this is worth doing right now.

Well, this can just be closed, then.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.