« Bugzilla Issues Index
#4534 — Is SetFunctionName() a static or a dynamic feature?
- bug_id:
4534
- creation_ts:
2015-09-17 15:30:00 -0700
- short_desc:
Is SetFunctionName() a static or a dynamic feature?
- delta_ts:
2015-09-18 07:53:11 -0700
- product:
ECMA-262 Edition 6
- component:
technical issues
- version:
unspecified
- rep_platform:
All
- op_sys:
All
- bug_status:
CONFIRMED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
Axel Rauschmayer
- assigned_to:
Allen Wirfs-Brock
- cc:
andrebargull
- commentid:
14696
- comment_count:
0
- who:
Axel Rauschmayer
- bug_when:
2015-09-17 15:30:36 -0700
http://www.ecma-international.org/ecma-262/6.0/#sec-assignment-operators-runtime-semantics-evaluation
Is SetFunctionName() a static or a dynamic feature?
* If it is a static feature: why the dynamic check `HasOwnProperty(rval, "name")`?
* If it is a dynamic feature: why a static check that only allows anonymous function expressions (vs. allowing arbitrary expressions and checking dynamically whether they evaluate to a function without a name)?
- commentid:
14703
- comment_count:
1
- who:
André Bargull
- bug_when:
2015-09-18 07:53:11 -0700
It is a mostly static feature, the dynamic HasOwnProperty check is only needed for classes with static methods whose property name is computed. In all other cases the HasOwnProperty call can be omitted.