From ec1d7ccc6fe50f6b57aee611b0fccf60c4eebd85 Mon Sep 17 00:00:00 2001
From: Leo Balter <leonardo.balter@gmail.com>
Date: Tue, 9 Oct 2018 18:05:39 -0400
Subject: [PATCH] Rename imported to namespace

---
 .../{module-namespace-object => namespace}/await.template | 4 ++--
 .../promise.template                                      | 4 ++--
 ...Symbol-toStringTag.case => ns-Symbol-toStringTag.case} | 6 +++---
 .../{imported-extensible.case => ns-extensible.case}      | 4 ++--
 .../{imported-no-iterator.case => ns-no-iterator.case}    | 4 ++--
 .../{imported-prop-descs.case => ns-prop-descs.case}      | 8 ++++----
 .../{imported-prototype.case => ns-prototype.case}        | 4 ++--
 .../module-code_FIXTURE.js                                | 0
 8 files changed, 17 insertions(+), 17 deletions(-)
 rename src/dynamic-import/{module-namespace-object => namespace}/await.template (96%)
 rename src/dynamic-import/{module-namespace-object => namespace}/promise.template (97%)
 rename src/dynamic-import/{imported-Symbol-toStringTag.case => ns-Symbol-toStringTag.case} (85%)
 rename src/dynamic-import/{imported-extensible.case => ns-extensible.case} (75%)
 rename src/dynamic-import/{imported-no-iterator.case => ns-no-iterator.case} (73%)
 rename src/dynamic-import/{imported-prop-descs.case => ns-prop-descs.case} (86%)
 rename src/dynamic-import/{imported-prototype.case => ns-prototype.case} (68%)
 rename test/language/module-code/dynamic-import/{module-namespace-object => ns}/module-code_FIXTURE.js (100%)

diff --git a/src/dynamic-import/module-namespace-object/await.template b/src/dynamic-import/namespace/await.template
similarity index 96%
rename from src/dynamic-import/module-namespace-object/await.template
rename to src/dynamic-import/namespace/await.template
index bc79c102ab..f2ad5afe0a 100644
--- a/src/dynamic-import/module-namespace-object/await.template
+++ b/src/dynamic-import/namespace/await.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/module-namespace-object/await-
+path: language/module-code/dynamic-import/ns/await-
 name: value from await resolving
 esid: sec-finishdynamicimport
 info: |
@@ -73,7 +73,7 @@ flags: [async]
 ---*/
 
 async function fn() {
-    const imported = await /*{ import }*/;
+    const ns = await /*{ import }*/;
 
     /*{ body }*/
 }
diff --git a/src/dynamic-import/module-namespace-object/promise.template b/src/dynamic-import/namespace/promise.template
similarity index 97%
rename from src/dynamic-import/module-namespace-object/promise.template
rename to src/dynamic-import/namespace/promise.template
index 7da1a8e9c5..fce701c04b 100644
--- a/src/dynamic-import/module-namespace-object/promise.template
+++ b/src/dynamic-import/namespace/promise.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/module-namespace-object/promise-then-
+path: language/module-code/dynamic-import/ns/promise-then-
 name: value from promise then
 esid: sec-finishdynamicimport
 info: |
@@ -72,7 +72,7 @@ features: [dynamic-import]
 flags: [async]
 ---*/
 
-/*{ import }*/.then(imported => {
+/*{ import }*/.then(ns => {
 
     /*{ body }*/
 
diff --git a/src/dynamic-import/imported-Symbol-toStringTag.case b/src/dynamic-import/ns-Symbol-toStringTag.case
similarity index 85%
rename from src/dynamic-import/imported-Symbol-toStringTag.case
rename to src/dynamic-import/ns-Symbol-toStringTag.case
index 99d43b22da..9ac7e8b62e 100644
--- a/src/dynamic-import/imported-Symbol-toStringTag.case
+++ b/src/dynamic-import/ns-Symbol-toStringTag.case
@@ -2,7 +2,7 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 desc: Module namespace objects have a Symbol.toStringTag
-template: module-namespace-object
+template: namespace
 info: |
     @@toStringTag
 
@@ -16,13 +16,13 @@ features: [Symbol.toStringTag]
 //- import
 import('./module-code_FIXTURE.js')
 //- body
-assert.sameValue(imported[Symbol.toStringTag], 'Module');
+assert.sameValue(ns[Symbol.toStringTag], 'Module');
 
 // propertyHelper.js is not appropriate for this test because it assumes that
 // the object exposes the ordinary object's implementation of [[Get]], [[Set]],
 // [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
 // object does not.
-var desc = Object.getOwnPropertyDescriptor(imported, Symbol.toStringTag);
+var desc = Object.getOwnPropertyDescriptor(ns, Symbol.toStringTag);
 
 assert.sameValue(desc.enumerable, false, 'reports as non-enumerable');
 assert.sameValue(desc.writable, false, 'reports as non-writable');
diff --git a/src/dynamic-import/imported-extensible.case b/src/dynamic-import/ns-extensible.case
similarity index 75%
rename from src/dynamic-import/imported-extensible.case
rename to src/dynamic-import/ns-extensible.case
index 15e87c6097..b54a0c88d6 100644
--- a/src/dynamic-import/imported-extensible.case
+++ b/src/dynamic-import/ns-extensible.case
@@ -2,11 +2,11 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 desc: Module namespace objects are not extensible.
-template: module-namespace-object
+template: namespace
 includes: [propertyHelper.js]
 ---*/
 
 //- import
 import('./module-code_FIXTURE.js')
 //- body
-assert.sameValue(Object.isExtensible(imported), false);
+assert.sameValue(Object.isExtensible(ns), false);
diff --git a/src/dynamic-import/imported-no-iterator.case b/src/dynamic-import/ns-no-iterator.case
similarity index 73%
rename from src/dynamic-import/imported-no-iterator.case
rename to src/dynamic-import/ns-no-iterator.case
index 0999a89ddd..9e082e3c11 100644
--- a/src/dynamic-import/imported-no-iterator.case
+++ b/src/dynamic-import/ns-no-iterator.case
@@ -3,11 +3,11 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 desc: Module namespace objects lack a Symbol.toStringTag
-template: module-namespace-object
+template: namespace
 features: [Symbol.iterator]
 ---*/
 
 //- import
 import('./module-code_FIXTURE.js')
 //- body
-assert.sameValue(Object.prototype.hasOwnProperty.call(imported, Symbol.iterator), false);
+assert.sameValue(Object.prototype.hasOwnProperty.call(ns, Symbol.iterator), false);
diff --git a/src/dynamic-import/imported-prop-descs.case b/src/dynamic-import/ns-prop-descs.case
similarity index 86%
rename from src/dynamic-import/imported-prop-descs.case
rename to src/dynamic-import/ns-prop-descs.case
index 55edf6daa1..ad873e711d 100644
--- a/src/dynamic-import/imported-prop-descs.case
+++ b/src/dynamic-import/ns-prop-descs.case
@@ -2,7 +2,7 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 desc: imported object properties descriptors
-template: module-namespace-object
+template: namespace
 ---*/
 
 //- import
@@ -12,21 +12,21 @@ import('./module-code_FIXTURE.js')
 // the object exposes the ordinary object's implementation of [[Get]], [[Set]],
 // [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
 // object does not.
-var desc = Object.getOwnPropertyDescriptor(imported, 'default');
+var desc = Object.getOwnPropertyDescriptor(ns, 'default');
 
 assert.sameValue(desc.value, 42, 'default value is 42');
 assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
 assert.sameValue(desc.writable, true, 'default reports as writable');
 assert.sameValue(desc.configurable, false, 'default reports as non-configurable');
 
-desc = Object.getOwnPropertyDescriptor(imported, 'x');
+desc = Object.getOwnPropertyDescriptor(ns, 'x');
 
 assert.sameValue(desc.value, 'Test262', 'x value is "Test262"');
 assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
 assert.sameValue(desc.writable, true, 'x reports as writable');
 assert.sameValue(desc.configurable, false, 'x reports as non-configurable');
 
-desc = Object.getOwnPropertyDescriptor(imported, 'z');
+desc = Object.getOwnPropertyDescriptor(ns, 'z');
 
 assert.sameValue(desc.value, 42, 'z value is 42');
 assert.sameValue(desc.enumerable, true, 'z reports as enumerable');
diff --git a/src/dynamic-import/imported-prototype.case b/src/dynamic-import/ns-prototype.case
similarity index 68%
rename from src/dynamic-import/imported-prototype.case
rename to src/dynamic-import/ns-prototype.case
index fd5c281749..3a8d66d41e 100644
--- a/src/dynamic-import/imported-prototype.case
+++ b/src/dynamic-import/ns-prototype.case
@@ -2,10 +2,10 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 desc: Module namespace object prototype is null
-template: module-namespace-object
+template: namespace
 ---*/
 
 //- import
 import('./module-code_FIXTURE.js')
 //- body
-assert.sameValue(Object.getPrototypeOf(imported), null, 'prototype is null');
+assert.sameValue(Object.getPrototypeOf(ns), null, 'prototype is null');
diff --git a/test/language/module-code/dynamic-import/module-namespace-object/module-code_FIXTURE.js b/test/language/module-code/dynamic-import/ns/module-code_FIXTURE.js
similarity index 100%
rename from test/language/module-code/dynamic-import/module-namespace-object/module-code_FIXTURE.js
rename to test/language/module-code/dynamic-import/ns/module-code_FIXTURE.js
-- 
GitLab