My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[import-defer] adding new test cases to validate evaluation trigger (#4621)

authored by

Caio Lima and committed by
GitHub
f03f8905 fa7ec20f

+634
+18
vendor/git/test262/src/import-defer/get-in-prototype.case
··· 1 + // Copyright (C) 2025 Igalia, S.L. All rights reserved. 2 + // This code is governed by the BSD license found in the LICENSE file. 3 + 4 + /*--- 5 + esid: sec-module-namespace-exotic-objects-get-p-receiver 6 + desc: _ [[Get]] when namespace object is in the prototype chain 7 + info: | 8 + [[Get]] ( _P_, _Receiver_ ) 9 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 10 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 11 + 1. ... 12 + 13 + template: trigger-on-possible-export 14 + ---*/ 15 + 16 + //- body 17 + const obj = Object.create(ns); 18 + obj[key];
+18
vendor/git/test262/src/import-defer/hasProperty-in-prototype.case
··· 1 + // Copyright (C) 2025 Igalia, S.L. All rights reserved. 2 + // This code is governed by the BSD license found in the LICENSE file. 3 + 4 + /*--- 5 + esid: sec-module-namespace-exotic-objects-hasproperty-p 6 + desc: _ [[HasProperty]] when namespace object is in the prototype chain 7 + info: | 8 + [[HasProperty]] ( _P_, _Receiver_ ) 9 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 10 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 11 + 1. ... 12 + 13 + template: trigger-on-possible-export 14 + ---*/ 15 + 16 + //- body 17 + const obj = Object.create(ns); 18 + key in obj;
+43
vendor/git/test262/src/import-defer/private-name-access.case
··· 1 + // Copyright (C) 2025 Igalia, S.L. All rights reserved. 2 + // This code is governed by the BSD license found in the LICENSE file. 3 + 4 + /*--- 5 + esid: sec-privateget 6 + desc: PrivateGet and PrivateSet in a namespace object 7 + info: | 8 + PrivateGet ( O, P ) 9 + 1. Let entry be PrivateElementFind(O, P). 10 + 1. If entry is EMPTY, throw a TypeError exception. 11 + 1. If entry.[[Kind]] is either FIELD or METHOD, then 12 + a. Return entry.[[Value]]. 13 + ... 14 + 15 + PrivateSet ( O, P, value ) 16 + 1. Let entry be PrivateElementFind(O, P). 17 + 1. If entry is EMPTY, throw a TypeError exception. 18 + 1. If entry.[[Kind]] is FIELD, then 19 + a. Set entry.[[Value]] to value. 20 + ... 21 + 22 + template: ignore 23 + features: [import-defer, nonextensible-applies-to-private] 24 + ---*/ 25 + 26 + //- body 27 + class Marker extends function (x) { return x } { 28 + #mark = "bar"; 29 + 30 + static mark(obj) { 31 + new Marker(obj); 32 + } 33 + 34 + static access(obj) { 35 + return #mark in obj; 36 + } 37 + } 38 + 39 + assert.throws(TypeError, function () { 40 + Marker.mark(ns); 41 + }); 42 + 43 + assert.sameValue(false, Marker.access(ns));
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-exported-then-get-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/get-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/then-exported.template 4 + /*--- 5 + description: _ [[Get]] when namespace object is in the prototype chain (of 'then' when it is an exported name, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[Get]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep-then_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "then"; 38 + 39 + const obj = Object.create(ns); 40 + obj[key]; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-exported-then-hasProperty-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/hasProperty-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/then-exported.template 4 + /*--- 5 + description: _ [[HasProperty]] when namespace object is in the prototype chain (of 'then' when it is an exported name, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[HasProperty]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep-then_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "then"; 38 + 39 + const obj = Object.create(ns); 40 + key in obj; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-not-exported-then-get-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/get-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/then-not-exported.template 4 + /*--- 5 + description: _ [[Get]] when namespace object is in the prototype chain (of 'then' when it is not an exported name, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[Get]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "then"; 38 + 39 + const obj = Object.create(ns); 40 + obj[key]; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-not-exported-then-hasProperty-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/hasProperty-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/then-not-exported.template 4 + /*--- 5 + description: _ [[HasProperty]] when namespace object is in the prototype chain (of 'then' when it is not an exported name, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[HasProperty]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "then"; 38 + 39 + const obj = Object.create(ns); 40 + key in obj; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+51
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-private-name-access.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/private-name-access.case 3 + // - src/import-defer/ignore/ignore.template 4 + /*--- 5 + description: PrivateGet and PrivateSet in a namespace object (does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer, nonextensible-applies-to-private] 8 + flags: [generated, module] 9 + info: | 10 + PrivateGet ( O, P ) 11 + 1. Let entry be PrivateElementFind(O, P). 12 + 1. If entry is EMPTY, throw a TypeError exception. 13 + 1. If entry.[[Kind]] is either FIELD or METHOD, then 14 + a. Return entry.[[Value]]. 15 + ... 16 + 17 + PrivateSet ( O, P, value ) 18 + 1. Let entry be PrivateElementFind(O, P). 19 + 1. If entry is EMPTY, throw a TypeError exception. 20 + 1. If entry.[[Kind]] is FIELD, then 21 + a. Set entry.[[Value]] to value. 22 + ... 23 + 24 + ---*/ 25 + 26 + 27 + import "./setup_FIXTURE.js"; 28 + 29 + import defer * as ns from "./dep_FIXTURE.js"; 30 + 31 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 32 + 33 + class Marker extends function (x) { return x } { 34 + #mark = "bar"; 35 + 36 + static mark(obj) { 37 + new Marker(obj); 38 + } 39 + 40 + static access(obj) { 41 + return #mark in obj; 42 + } 43 + } 44 + 45 + assert.throws(TypeError, function () { 46 + Marker.mark(ns); 47 + }); 48 + 49 + assert.sameValue(false, Marker.access(ns)); 50 + 51 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-symbol-other-get-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/get-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/symbol-other.template 4 + /*--- 5 + description: _ [[Get]] when namespace object is in the prototype chain (of a symbol that is not a property of the namespace object, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[Get]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = Symbol(); 38 + 39 + const obj = Object.create(ns); 40 + obj[key]; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-symbol-other-hasProperty-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/hasProperty-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/symbol-other.template 4 + /*--- 5 + description: _ [[HasProperty]] when namespace object is in the prototype chain (of a symbol that is not a property of the namespace object, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[HasProperty]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = Symbol(); 38 + 39 + const obj = Object.create(ns); 40 + key in obj; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-symbol-toStringTag-get-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/get-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/symbol-toStringTag.template 4 + /*--- 5 + description: _ [[Get]] when namespace object is in the prototype chain (of Symbol.toStringTag, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[Get]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = Symbol.toStringTag; 38 + 39 + const obj = Object.create(ns); 40 + obj[key]; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/ignore-symbol-toStringTag-hasProperty-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/hasProperty-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/symbol-toStringTag.template 4 + /*--- 5 + description: _ [[HasProperty]] when namespace object is in the prototype chain (of Symbol.toStringTag, does not trigger execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[HasProperty]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = Symbol.toStringTag; 38 + 39 + const obj = Object.create(ns); 40 + key in obj; 41 + 42 + assert.sameValue(globalThis.evaluations.length, 0, "It does not trigger evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/trigger-exported-string-get-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/get-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/string-exported.template 4 + /*--- 5 + description: _ [[Get]] when namespace object is in the prototype chain (of a string that is an exported name, triggers execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[Get]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "exported"; 38 + 39 + const obj = Object.create(ns); 40 + obj[key]; 41 + 42 + assert(globalThis.evaluations.length > 0, "It triggers evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/trigger-exported-string-hasProperty-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/hasProperty-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/string-exported.template 4 + /*--- 5 + description: _ [[HasProperty]] when namespace object is in the prototype chain (of a string that is an exported name, triggers execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[HasProperty]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "exported"; 38 + 39 + const obj = Object.create(ns); 40 + key in obj; 41 + 42 + assert(globalThis.evaluations.length > 0, "It triggers evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/trigger-not-exported-string-get-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/get-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/string-not-exported.template 4 + /*--- 5 + description: _ [[Get]] when namespace object is in the prototype chain (of a string that is not an exported name, triggers execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[Get]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "notExported"; 38 + 39 + const obj = Object.create(ns); 40 + obj[key]; 41 + 42 + assert(globalThis.evaluations.length > 0, "It triggers evaluation");
+42
vendor/git/test262/test/language/import/import-defer/evaluation-triggers/trigger-not-exported-string-hasProperty-in-prototype.js
··· 1 + // This file was procedurally generated from the following sources: 2 + // - src/import-defer/hasProperty-in-prototype.case 3 + // - src/import-defer/trigger-on-possible-export/string-not-exported.template 4 + /*--- 5 + description: _ [[HasProperty]] when namespace object is in the prototype chain (of a string that is not an exported name, triggers execution) 6 + esid: sec-module-namespace-exotic-objects 7 + features: [import-defer] 8 + flags: [generated, module] 9 + info: | 10 + IsSymbolLikeNamespaceKey ( _P_, _O_ ) 11 + 1. If _P_ is a Symbol, return *true*. 12 + 1. If _ns_.[[Deferred]] is *true* and _P_ is "then", return *true*. 13 + 1. Return *false*. 14 + 15 + GetModuleExportsList ( _O_ ) 16 + 1. If _O_.[[Deferred]] is *true*, then 17 + 1. Let _m_ be _O_.[[Module]]. 18 + 1. If _m_ is a Cyclic Module Record, _m_.[[Status]] is not ~evaluated~, and ReadyForSyncExecution(_m_) is *false*, throw a *TypeError* exception. 19 + 1. Perform ? EvaluateSync(_m_). 20 + 1. Return _O_.[[Exports]]. 21 + 22 + 23 + [[HasProperty]] ( _P_, _Receiver_ ) 24 + 1. If IsSymbolLikeNamespaceKey(_P_, _O_), return ! OrdinaryGet(_O_, _P_, _Receiver_). 25 + 1. Let _exports_ be ? GetModuleExportsList(_O_). 26 + 1. ... 27 + 28 + ---*/ 29 + 30 + 31 + import "./setup_FIXTURE.js"; 32 + 33 + import defer * as ns from "./dep_FIXTURE.js"; 34 + 35 + assert.sameValue(globalThis.evaluations.length, 0, "import defer does not trigger evaluation"); 36 + 37 + var key = "notExported"; 38 + 39 + const obj = Object.create(ns); 40 + key in obj; 41 + 42 + assert(globalThis.evaluations.length > 0, "It triggers evaluation");