Annex C (informative) ECMAScript의 Strict Mode
strict mode restriction과 exceptions
-
implements, interface, let, package, private, protected, public, static, 및 yield는 strict mode code 내에서 reserved words입니다. (12.7.2).
-
conforming implementation은 strict mode code를 processing할 때 productions
NumericLiteral :: LegacyOctalIntegerLiteral
및
DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral
의 instances를 disallow해야 합니다.
-
conforming implementation은 strict mode code를 processing할 때 productions
EscapeSequence :: LegacyOctalEscapeSequence
및
EscapeSequence :: NonOctalDecimalEscapeSequence
의 instances를 disallow해야 합니다.
-
선언되지 않은 identifier 또는 그 밖의 unresolvable reference에 대한 할당은 global object에 property를 생성하지 않는다. strict mode 코드 안에서 simple assignment가 발생하는 경우, 그 LeftHandSideExpression은 unresolvable Reference로 평가되어서는 안 된다. 그렇게 평가되면 ReferenceError 예외가 던져진다(6.2.5.6). 또한 LeftHandSideExpression은 속성 값 { [[Writable]]: false }를 가진 data property에 대한 reference이거나, 속성 값 { [[Setter]]: undefined }를 가진 accessor property에 대한 reference이거나, [[Extensible]] internal slot이 false인 객체의 존재하지 않는 property에 대한 reference여서도 안 된다. 이러한 경우
TypeError 예외가 던져진다(13.15).
-
StringValue "eval" 또는 "arguments"를 가진 IdentifierReference는 Assignment operator (13.15)의 LeftHandSideExpression이나 UpdateExpression (13.4)으로, 또는 Prefix Increment (13.4.4)나 Prefix Decrement (13.4.5) operator가 operated upon하는 UnaryExpression으로 나타날 수 없습니다.
-
strict functions에 대한 Arguments objects는 access 시 TypeError exception을 throw하는 non-configurable accessor property "callee"를 define합니다(10.4.4.6).
-
strict functions에 대한 Arguments objects는 자신의 array-indexed property values를 their functions의 corresponding formal parameter bindings와 dynamically share하지 않습니다. (10.4.4).
-
strict functions의 경우, arguments object가 created되면 local identifier
arguments의 arguments object에 대한 binding은 immutable이므로 assignment expression의 target이 될 수 없습니다. (10.2.11).
-
strict mode code 내에서 BindingIdentifier의 StringValue가 "eval" 또는 "arguments"이면 SyntaxError입니다(13.1.1).
-
Strict mode eval code는 caller to eval의 variable environment에서 variables나 functions를 instantiate할 수 없습니다. 대신 새로운 variable environment가 created되고 그 environment가 eval code의 declaration binding instantiation에 사용됩니다(19.2.1).
-
strict mode code 내에서 this가 evaluated되면, this value는 object로 coerced되지 않습니다. undefined 또는 null인 this value는 global object로 converted되지 않으며 primitive values는 wrapper objects로 converted되지 않습니다. function call을 통해 passed된 this value(
Function.prototype.apply 및 Function.prototype.call을 사용해 이루어진 calls 포함)는 passed this value를 object로 coerce하지 않습니다(10.2.1.2, 20.2.3.1, 20.2.3.3).
-
delete operator가 strict mode code 내에서 occurs할 때, 그 UnaryExpression이 variable, function argument, 또는 function name에 대한 direct reference이면 SyntaxError가 thrown됩니다(13.5.1.1).
-
delete operator가 strict mode code 내에서 occurs할 때, deleted될 property가 attribute { [[Configurable]]: false }를 가지거나 otherwise deleted될 수 없으면 TypeError가 thrown됩니다(13.5.1.2).
-
Strict mode code는 WithStatement를 포함할 수 없습니다. 그러한 context에서 WithStatement의 occurrence는 SyntaxError입니다(14.11.1).
-
CatchParameter가 strict mode code 내에서 occurs하고 CatchParameter의 BoundNames가
eval 또는 arguments를 포함하면 SyntaxError입니다(14.15.1).
-
동일한 BindingIdentifier가 strict function의 FormalParameters에 둘 이상 appears하면 SyntaxError입니다. Function, Generator, 또는 AsyncFunction constructor를 사용해 그러한 function을 create하려는 attempt는 SyntaxError입니다(15.2.1, 20.2.1.1.1).
-
implementation은 function instances의 "caller" 또는 "arguments"라는 이름의 properties에 대해 strict functions 내의 meanings를 이 specification에서 defined된 것 이상으로 extend해서는 안 됩니다.