зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1848325 - Part 5: Rename CommonPropertyNames with *-prefix. r=jandem
Depends on D186291 Differential Revision: https://phabricator.services.mozilla.com/D186292
This commit is contained in:
Родитель
dafac534b4
Коммит
e3426d8cd5
|
@ -1974,12 +1974,14 @@ ModuleNode* Parser<FullParseHandler, Unit>::moduleBody(
|
|||
|
||||
// Reserve an environment slot for a "*namespace*" psuedo-binding and mark as
|
||||
// closed-over. We do not know until module linking if this will be used.
|
||||
if (!noteDeclaredName(TaggedParserAtomIndex::WellKnown::starNamespaceStar(),
|
||||
DeclarationKind::Const, pos())) {
|
||||
if (!noteDeclaredName(
|
||||
TaggedParserAtomIndex::WellKnown::star_namespace_star_(),
|
||||
DeclarationKind::Const, pos())) {
|
||||
return nullptr;
|
||||
}
|
||||
modulepc.varScope()
|
||||
.lookupDeclaredName(TaggedParserAtomIndex::WellKnown::starNamespaceStar())
|
||||
.lookupDeclaredName(
|
||||
TaggedParserAtomIndex::WellKnown::star_namespace_star_())
|
||||
->value()
|
||||
->setClosedOver();
|
||||
|
||||
|
|
|
@ -5406,7 +5406,7 @@ static bool GetModuleEnvironmentNames(JSContext* cx, unsigned argc, Value* vp) {
|
|||
|
||||
// The "*namespace*" binding is a detail of current implementation so hide
|
||||
// it to give stable results in tests.
|
||||
ids.eraseIfEqual(NameToId(cx->names().starNamespaceStar));
|
||||
ids.eraseIfEqual(NameToId(cx->names().star_namespace_star_));
|
||||
|
||||
uint32_t length = ids.length();
|
||||
Rooted<ArrayObject*> array(cx, NewDenseFullyAllocatedArray(cx, length));
|
||||
|
|
|
@ -503,7 +503,7 @@
|
|||
MACRO_(SpeciesConstructor, "SpeciesConstructor") \
|
||||
MACRO_(stack, "stack") \
|
||||
MACRO1(star, "*") \
|
||||
MACRO_(starNamespaceStar, "*namespace*") \
|
||||
MACRO_(star_namespace_star_, "*namespace*") \
|
||||
MACRO_(start, "start") \
|
||||
MACRO_(startRange, "startRange") \
|
||||
MACRO_(startTimestamp, "startTimestamp") \
|
||||
|
|
|
@ -675,7 +675,7 @@ static bool IsInternalDotName(JSContext* cx, HandleId id) {
|
|||
id.isAtom(cx->names().dot_staticFieldKeys_) ||
|
||||
id.isAtom(cx->names().dot_args_) ||
|
||||
id.isAtom(cx->names().dot_newTarget_) ||
|
||||
id.isAtom(cx->names().starNamespaceStar);
|
||||
id.isAtom(cx->names().star_namespace_star_);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ static bool ModuleResolveExport(JSContext* cx, Handle<ModuleObject*> module,
|
|||
// this export.
|
||||
// Step 5.a.ii.2. Return ResolvedBinding Record { [[Module]]:
|
||||
// importedModule, [[BindingName]]: namespace }.
|
||||
name = cx->names().starNamespaceStar;
|
||||
name = cx->names().star_namespace_star_;
|
||||
return CreateResolvedBindingObject(cx, importedModule, name, result);
|
||||
} else {
|
||||
// Step 5.a.iii.1. Assert: module imports a specific binding for this
|
||||
|
@ -832,7 +832,7 @@ static ModuleNamespaceObject* ModuleNamespaceCreate(
|
|||
importedModule = binding->module();
|
||||
bindingName = binding->bindingName();
|
||||
|
||||
if (bindingName == cx->names().starNamespaceStar) {
|
||||
if (bindingName == cx->names().star_namespace_star_) {
|
||||
importedNamespace = GetOrCreateModuleNamespace(cx, importedModule);
|
||||
if (!importedNamespace) {
|
||||
return nullptr;
|
||||
|
@ -1002,7 +1002,7 @@ bool js::ModuleInitializeEnvironment(JSContext* cx,
|
|||
bindingName = binding->bindingName();
|
||||
|
||||
// Step 7.d.iii. If resolution.[[BindingName]] is namespace, then:
|
||||
if (bindingName == cx->names().starNamespaceStar) {
|
||||
if (bindingName == cx->names().star_namespace_star_) {
|
||||
// Step 7.d.iii.1. Let namespace be ?
|
||||
// GetModuleNamespace(resolution.[[Module]]).
|
||||
Rooted<ModuleNamespaceObject*> ns(
|
||||
|
|
Загрузка…
Ссылка в новой задаче