archives

« Bugzilla Issues Index

#2470 — 7.1.1 ToPrimitive, 7.3.17 CreateFromConstructor: Use GetMethod() instead of Get()?


7.1.1 ToPrimitive and 7.3.17 CreateFromConstructor could use GetMethod() instead of Get() to remove the extra `IsCallable()` step.

For example in 7.3.17, steps 1-4:
1. Let creator be Get(F, @@create).
2. ReturnIfAbrupt(creator).
3. If creator is undefined, then return undefined.
4. If IsCallable(creator) is false, then throw a TypeError exception.
5. Let obj be the result ...

can be replaced with:
1. Let creator be GetMethod(F, @@create).
2. ReturnIfAbrupt(creator).
3. If creator is undefined, then return undefined.
4. Let obj be the result ...


fixed in rev23 editor's draft


fixed in rev23 draft