archives

« Bugzilla Issues Index

#3693 — 26.1.2 Reflect.construct: Add PrepareForTailCall ?


26.1.2 Reflect.construct ( target, argumentsList [, newTarget] )

Add PrepareForTailCall before invoking Construct in step 6 ?


I;m not sure whether the bug is that I'm not doing a PrepareForTailCall in Reflect.construct or that the real problem is that I am doing that in Reflect.apply.

In general I haven't been making an effort to prepare for tail calls in built-ins. They might be (probably are) implemented in a language that doesn't support property tail calls.

Function.prototype.call/apply are the only other built-ins that use PrepareForTailCall and they are arguably a very special case. Perhaps Reflect.apply/construct also fall into that special category.


[[Construct]] can't be tailed call because the ECMAScript function implementations of it have post body return dependencies upon the current execution context.

Added 'new' and 'super()' to productions that cannot be property tail calls.

fixed in rev33 editor's draft


fixed in rev33