Bug 1505784 part 4 - Remove some now-redundant initialization code in JSScript::initFromModuleContext. r=tcampbell
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 08 Nov 2018 19:35:44 +0000
changeset 445379 1f940df360da2cd74197285dd5f998991e4c92d8
parent 445378 648aae3548989d0495cc03093ec9a9a6f531e443
child 445380 352ca0c8670470c1a03d8012acc0448c41e2e6ec
push id35015
push userdluca@mozilla.com
push dateFri, 09 Nov 2018 17:45:20 +0000
treeherdermozilla-central@2f1158e5e0ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1505784
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1505784 part 4 - Remove some now-redundant initialization code in JSScript::initFromModuleContext. r=tcampbell Depends on D11336 Differential Revision: https://phabricator.services.mozilla.com/D11337
js/src/vm/JSScript.cpp
--- a/js/src/vm/JSScript.cpp
+++ b/js/src/vm/JSScript.cpp
@@ -3346,23 +3346,16 @@ JSScript::initFromFunctionBox(HandleScri
     script->setFlag(ImmutableFlags::FunHasAnyAliasedFormal, !!fi);
 
     script->setFlag(ImmutableFlags::HasInnerFunctions, funbox->hasInnerFunctions());
 }
 
 /* static */ void
 JSScript::initFromModuleContext(HandleScript script)
 {
-    script->clearFlag(ImmutableFlags::FunHasExtensibleScope);
-    script->clearFlag(ImmutableFlags::NeedsHomeObject);
-    script->clearFlag(ImmutableFlags::IsDerivedClassConstructor);
-    script->funLength_ = 0;
-
-    script->clearFlag(ImmutableFlags::IsGenerator);
-
     // Since modules are only run once, mark the script so that initializers
     // created within it may be given more precise types.
     script->setTreatAsRunOnce();
     MOZ_ASSERT(!script->hasRunOnce());
 }
 
 /* static */ bool
 JSScript::fullyInitFromEmitter(JSContext* cx, HandleScript script, frontend::BytecodeEmitter* bce)