Ver código fonte

Remove some old switches (#6441)

* Remove always on flag EnableJitInDiagMode

* Remove Some completely unused flags

* Remove always on ES6Species flag

* Remove always on ES6Classes flag

* Remove always on flag ES6ForLoopSemantics

* Remove always on flag ES6Promise

* Remove always on flag ES6Destructuring

* Remove always on flag ES6DefaultArgs

* Test updates for removed flags
Richard 5 anos atrás
pai
commit
d8cbaff6a2

+ 0 - 2
lib/Backend/BailOut.cpp

@@ -1427,8 +1427,6 @@ BailOutRecord::BailOutHelper(Js::JavascriptCallStackLayout * layout, Js::ScriptF
 
 #ifdef ENABLE_SCRIPT_DEBUGGING
     bool isInDebugMode = executeFunction->IsInDebugMode();
-    AssertMsg(!isInDebugMode || Js::Configuration::Global.EnableJitInDebugMode(),
-        "In diag mode we can get here (function has to be JIT'ed) only when EnableJitInDiagMode is true!");
 
     // Adjust bailout offset for debug mode (only scenario when we ignore exception).
     if (isInDebugMode)

+ 1 - 3
lib/Backend/JITTimeWorkItem.cpp

@@ -41,9 +41,7 @@ JITTimeWorkItem::IsLoopBody() const
 bool
 JITTimeWorkItem::IsJitInDebugMode() const
 {
-    // TODO (michhol): flags?
-    return Js::Configuration::Global.EnableJitInDebugMode()
-        && m_workItemData->isJitInDebugMode;
+    return m_workItemData->isJitInDebugMode;
 }
 
 intptr_t

+ 2 - 15
lib/Backend/NativeCodeGenerator.cpp

@@ -160,11 +160,7 @@ void NativeCodeGenerator::Close()
     // Close FreeLoopBodyJobManager first, as it depends on NativeCodeGenerator to be open before it's removed
     this->freeLoopBodyManager.Close();
 
-    // Remove only if it is not updated in the debug mode (and which goes to interpreter mode).
-    if (!hasUpdatedQForDebugMode || Js::Configuration::Global.EnableJitInDebugMode())
-    {
-        Processor()->RemoveManager(this);
-    }
+    Processor()->RemoveManager(this);
 
     this->isClosed = true;
 
@@ -2014,10 +2010,7 @@ NativeCodeGenerator::UpdateQueueForDebugMode()
 
     this->hasUpdatedQForDebugMode = true;
 
-    if (Js::Configuration::Global.EnableJitInDebugMode())
-    {
-        Processor()->AddManager(this);
-    }
+    Processor()->AddManager(this);
 }
 
 void
@@ -3252,12 +3245,6 @@ NativeCodeGenerator::EnterScriptStart()
         return;
     }
 
-    // Don't need to do anything if we're in debug mode
-    if (this->scriptContext->IsScriptContextInDebugMode() && !Js::Configuration::Global.EnableJitInDebugMode())
-    {
-        return;
-    }
-
     // We've already done a few calls to this scriptContext, don't bother waiting.
     if (scriptContext->callCount >= 3)
     {

+ 0 - 27
lib/Common/ConfigFlagsList.h

@@ -514,7 +514,6 @@ PHASE(All)
 #define DEFAULT_CONFIG_ForceOldDateAPI      (false)
 #define DEFAULT_CONFIG_Loop                 (1)
 #define DEFAULT_CONFIG_ForceDiagnosticsMode (false)
-#define DEFAULT_CONFIG_EnableJitInDiagMode  (true)
 #define DEFAULT_CONFIG_UseFullName          (true)
 #define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers  (true)
 #define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns  (true)
@@ -629,12 +628,7 @@ PHASE(All)
 #define DEFAULT_CONFIG_CollectGarbage          (false)
 
 // ES6 sub-feature gate - to enable-disable ES6 sub-feature when ES6 flag is enabled
-#define DEFAULT_CONFIG_ES6Species              (true)
-#define DEFAULT_CONFIG_ES6Classes              (true)
 #define DEFAULT_CONFIG_ES6DateParseFix         (true)
-#define DEFAULT_CONFIG_ES6DefaultArgs          (true)
-#define DEFAULT_CONFIG_ES6Destructuring        (true)
-#define DEFAULT_CONFIG_ES6ForLoopSemantics     (true)
 #define DEFAULT_CONFIG_ES6FunctionNameFull     (true)
 #define DEFAULT_CONFIG_ES6Generators           (true)
 #define DEFAULT_CONFIG_ES6IsConcatSpreadable   (true)
@@ -648,7 +642,6 @@ PHASE(All)
 #define DEFAULT_CONFIG_ES6Object               (true)
 #define DEFAULT_CONFIG_ES6Number               (true)
 #define DEFAULT_CONFIG_ES6ObjectLiterals       (true)
-#define DEFAULT_CONFIG_ES6Promise              (true)
 #define DEFAULT_CONFIG_ES6Proxy                (true)
 #define DEFAULT_CONFIG_ES6Rest                 (true)
 #define DEFAULT_CONFIG_ES6Spread               (true)
@@ -772,7 +765,6 @@ PHASE(All)
 #define DEFAULT_CONFIG_BigDictionaryTypeHandlerThreshold (0xffff)
 #define DEFAULT_CONFIG_ForceStringKeyedSimpleDictionaryTypeHandler (false)
 #define DEFAULT_CONFIG_TypeSnapshotEnumeration (true)
-#define DEFAULT_CONFIG_EnumerationCompat    (false)
 #define DEFAULT_CONFIG_ConcurrentRuntime (false)
 #define DEFAULT_CONFIG_PrimeRecycler     (false)
 #if defined(_WIN32)
@@ -816,8 +808,6 @@ PHASE(All)
 #define DEFAULT_CONFIG_InjectPartiallyInitializedInterpreterFrameError (0)
 #define DEFAULT_CONFIG_InjectPartiallyInitializedInterpreterFrameErrorType (0)
 
-#define DEFAULT_CONFIG_InvalidateSolutionContextsForGetStructure (true)
-
 #define DEFAULT_CONFIG_DeferLoadingAvailableSource  (false)
 #ifdef ENABLE_PROJECTION
 #define DEFAULT_CONFIG_NoWinRTFastSig       (false)
@@ -1131,14 +1121,8 @@ FLAGNRC(Boolean, ES6Experimental           , "Enable all experimental features",
 
 // Per ES6 feature/flag
 
-FLAGPR           (Boolean, ES6, ES6Species             , "Enable ES6 '@@species' properties and built-in behaviors" , DEFAULT_CONFIG_ES6Species)
-
 FLAGPR           (Boolean, ES6, ES7AsyncAwait          , "Enable ES7 'async' and 'await' keywords"                  , DEFAULT_CONFIG_ES7AsyncAwait)
-FLAGPR           (Boolean, ES6, ES6Classes             , "Enable ES6 'class' and 'extends' keywords"                , DEFAULT_CONFIG_ES6Classes)
 FLAGPR           (Boolean, ES6, ES6DateParseFix        , "Enable ES6 Date.parse fixes"                              , DEFAULT_CONFIG_ES6DateParseFix)
-FLAGPR           (Boolean, ES6, ES6DefaultArgs         , "Enable ES6 Default Arguments"                             , DEFAULT_CONFIG_ES6DefaultArgs)
-FLAGPR           (Boolean, ES6, ES6Destructuring       , "Enable ES6 Destructuring"                                 , DEFAULT_CONFIG_ES6Destructuring)
-FLAGPR           (Boolean, ES6, ES6ForLoopSemantics    , "Enable ES6 for loop per iteration bindings"               , DEFAULT_CONFIG_ES6ForLoopSemantics)
 FLAGPR           (Boolean, ES6, ES6FunctionNameFull    , "Enable ES6 Full function.name"                            , DEFAULT_CONFIG_ES6FunctionNameFull)
 FLAGPR           (Boolean, ES6, ES6Generators          , "Enable ES6 generators"                                    , DEFAULT_CONFIG_ES6Generators)
 FLAGPR           (Boolean, ES6, ES7ExponentiationOperator, "Enable ES7 exponentiation operator (**)"                , DEFAULT_CONFIG_ES7ExponentionOperator)
@@ -1157,7 +1141,6 @@ FLAGPR           (Boolean, ES6, ES6Module              , "Enable ES6 Modules"
 FLAGPR           (Boolean, ES6, ES6Object              , "Enable ES6 Object extensions"                             , DEFAULT_CONFIG_ES6Object)
 FLAGPR           (Boolean, ES6, ES6Number              , "Enable ES6 Number extensions"                             , DEFAULT_CONFIG_ES6Number)
 FLAGPR           (Boolean, ES6, ES6ObjectLiterals      , "Enable ES6 Object literal extensions"                     , DEFAULT_CONFIG_ES6ObjectLiterals)
-FLAGPR           (Boolean, ES6, ES6Promise             , "Enable ES6 Promise feature"                               , DEFAULT_CONFIG_ES6Promise)
 FLAGPR           (Boolean, ES6, ES6Proxy               , "Enable ES6 Proxy feature"                                 , DEFAULT_CONFIG_ES6Proxy)
 FLAGPR           (Boolean, ES6, ES6Rest                , "Enable ES6 Rest parameters"                               , DEFAULT_CONFIG_ES6Rest)
 FLAGPR           (Boolean, ES6, ES6Spread              , "Enable ES6 Spread support"                                , DEFAULT_CONFIG_ES6Spread)
@@ -1251,7 +1234,6 @@ FLAGNR(Boolean, ForceGetWriteWatchOOM , "Force GetWriteWatch to go into OOM code
 FLAGNR(Boolean, ForcePostLowerGlobOptInstrString, "Force tracking of globopt instr string post lower", DEFAULT_CONFIG_ForcePostLowerGlobOptInstrString)
 FLAGNR(Boolean, ForceSplitScope       , "All functions will have unmerged body and param scopes", DEFAULT_CONFIG_ForceSplitScope)
 FLAGNR(Boolean, EnumerateSpecialPropertiesInDebugger, "Enable enumeration of special debug properties", DEFAULT_CONFIG_EnumerateSpecialPropertiesInDebugger)
-FLAGNR(Boolean, EnableJitInDiagMode   , "Enable Fast F12 (only applicable with ForceDiagnosticsMode or while under debugger)", DEFAULT_CONFIG_EnableJitInDiagMode)
 FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForHelpers, "Enable wrapper over helper methods in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers)
 FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForBuiltIns, "Enable wrapper over library calls in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns)
 FLAGNR(Boolean, EnableFunctionSourceReportForHeapEnum, "During HeapEnum, whether to report function source info (url/row/col)", DEFAULT_CONFIG_EnableFunctionSourceReportForHeapEnum)
@@ -1534,7 +1516,6 @@ FLAGR (Number,  AllocPolicyLimit      , "Memory allocation policy limit in MB (d
 #ifdef RUNTIME_DATA_COLLECTION
 FLAGNR(String,  RuntimeDataOutputFile, "Filename to write the dynamic profile info", nullptr)
 #endif
-FLAGNR(Boolean, ReportErrors          , "Enable reporting of syntax errors", false)
 FLAGR (Number,  SpeculationCap        , "How much bytecode we'll speculatively JIT", DEFAULT_CONFIG_SpeculationCap)
 #if DBG_DUMP || defined(BGJIT_STATS) || defined(RECYCLER_STATS)
 FLAGNR(Phases,  Stats                 , "Stats the given phase", )
@@ -1579,7 +1560,6 @@ FLAGNR(Boolean, TrackDispatch         , "Save stack traces of where JavascriptDi
 #endif
 FLAGNR(Boolean, Verbose               , "Dump details", DEFAULT_CONFIG_Verbose)
 FLAGNR(Boolean, UseFullName           , "Enable fully qualified name", DEFAULT_CONFIG_UseFullName)
-FLAGNR(Boolean, UseFunctionIdForTrace , "Use function id instead of function number for trace output", false)
 FLAGNR(Boolean, Utf8                  , "Use UTF8 for file output", false)
 FLAGR (Number,  Version               , "Version in which to run the jscript engine. [one of 1,2,3,4,5,6]. Default is latest for jc/jshost, 1 for IE", 6 )
 #ifdef ENABLE_PROJECTION
@@ -1629,7 +1609,6 @@ FLAGNR(Number,  DeletedPropertyReuseThreshold, "Start reusing deleted property i
 FLAGNR(Boolean, ForceStringKeyedSimpleDictionaryTypeHandler, "Force switch to string keyed version of SimpleDictionaryTypeHandler on first new property added to a SimpleDictionaryTypeHandler", DEFAULT_CONFIG_ForceStringKeyedSimpleDictionaryTypeHandler)
 FLAGNR(Number,  BigDictionaryTypeHandlerThreshold, "Min Slot Capacity required to convert DictionaryTypeHandler to BigDictionaryTypeHandler.(Advisable to give more than 15 - to avoid false positive cases)", DEFAULT_CONFIG_BigDictionaryTypeHandlerThreshold)
 FLAGNR(Boolean, TypeSnapshotEnumeration, "Create a true snapshot of the type of an object before enumeration and enumerate only those properties.", DEFAULT_CONFIG_TypeSnapshotEnumeration)
-FLAGR (Boolean, EnumerationCompat,      "When set in IE10 mode, restores enumeration behavior to RC behavior", DEFAULT_CONFIG_EnumerationCompat)
 FLAGNR(Boolean, IsolatePrototypes, "Should prototypes get unique types not shared with other objects (default: true)?", DEFAULT_CONFIG_IsolatePrototypes)
 FLAGNR(Boolean, ChangeTypeOnProto, "When becoming a prototype should the object switch to a new type (default: true)?", DEFAULT_CONFIG_ChangeTypeOnProto)
 FLAGNR(Boolean, ShareInlineCaches, "Determines whether inline caches are shared between all loads (or all stores) of the same property ID", DEFAULT_CONFIG_ShareInlineCaches)
@@ -1690,12 +1669,6 @@ FLAGNR(Number, ConstructorCacheInvalidationThreshold, "Clear uniquePropertyGuard
 FLAGNR(Boolean, IRViewer, "Enable IRViewer functionality (improved UI for various stages of IR generation)", false)
 #endif /* IR_VIEWER */
 
-FLAGNR(Boolean, InvalidateSolutionContextsForGetStructure, "To reduce memory consumption, in the end of GetStructure call, invalidate script contexts used only for GetStructure -- this would invalidate ones associated with solution files (not top-most references such as helpers.js)", DEFAULT_CONFIG_InvalidateSolutionContextsForGetStructure)
-FLAGNR(Boolean, ES5LangTel, "Print ES5 language telemetry output.", false)
-FLAGNR(Boolean, ES6LangTel, "Print ES6 language telemetry output.", false)
-FLAGNR(Boolean, ESBLangTel, "Print ES built-ins telemetry output.", false)
-FLAGNR(Boolean, DateParseTel, "Print Date.parse telemetry output.", false)
-
 FLAGNR(Number,  GCMemoryThreshold, "Threshold for allocation-based GC initiation (in MB)", 0)
 
 #ifdef _CONTROL_FLOW_GUARD

+ 0 - 5
lib/Common/Core/ConfigFlagsTable.cpp

@@ -1264,11 +1264,6 @@ namespace Js
     {
     }
 
-    bool Configuration::EnableJitInDebugMode()
-    {
-        return CONFIG_FLAG(EnableJitInDiagMode);
-    }
-
     Configuration        Configuration::Global;
 
 

+ 0 - 1
lib/Common/Core/ConfigFlagsTable.h

@@ -567,7 +567,6 @@ namespace Js
     public:
         ConfigFlagsTable           flags;
         static Configuration        Global;
-        bool EnableJitInDebugMode();
 
         // Public in case the client wants to have
         // a separate config from the global one

+ 0 - 20
lib/Common/Core/ConfigParser.cpp

@@ -238,26 +238,6 @@ void ConfigParser::ParseRegistryKey(HKEY hk, CmdLineArgsParser &parser)
         }
     }
 
-    // EnumerationCompat
-    // This setting allows disabling a couple of changes to enumeration:
-    //     - A change that causes deleted property indexes to be reused for new properties, thereby changing the order in which
-    //       properties are enumerated
-    //     - A change that creates a true snapshot of the type just before enumeration, and enumerating only those properties. A
-    //       property that was deleted before enumeration and is added back during enumeration will not be enumerated.
-    // Values:
-    //     0 - Default
-    //     1 - Compatibility mode for enumeration order (disable changes described above)
-    // This FCK does not apply to WWAs. WWAs should use the RC compat mode to disable these changes.
-    dwValue = 0;
-    dwSize = sizeof(dwValue);
-    if (NOERROR == RegGetValueW(hk, nullptr, _u("EnumerationCompat"), RRF_RT_DWORD, nullptr, (LPBYTE)&dwValue, &dwSize))
-    {
-        if (dwValue == 1)
-        {
-            Js::Configuration::Global.flags.EnumerationCompat = true;
-        }
-    }
-
 #ifdef ENABLE_PROJECTION
     // FailFastIfDisconnectedDelegate
     // This setting allows enabling fail fast if the delegate invoked is disconnected

+ 3 - 8
lib/Jsrt/JsrtDebugManager.cpp

@@ -369,10 +369,8 @@ bool JsrtDebugManager::EnableAsyncBreak(Js::ScriptContext* scriptContext)
     if (!probeContainer->IsAsyncActivate())
     {
         probeContainer->AsyncActivate(this);
-        if (Js::Configuration::Global.EnableJitInDebugMode())
-        {
-            scriptContext->GetThreadContext()->GetDebugManager()->GetDebuggingFlags()->SetForceInterpreter(true);
-        }
+
+        scriptContext->GetThreadContext()->GetDebugManager()->GetDebuggingFlags()->SetForceInterpreter(true);
         return true;
     }
     return false;
@@ -453,10 +451,7 @@ void JsrtDebugManager::CallDebugEventCallbackForBreak(JsDiagDebugEvent debugEven
         tempScriptContext->GetDebugContext()->GetProbeContainer()->AsyncDeactivate();
     }
 
-    if (Js::Configuration::Global.EnableJitInDebugMode())
-    {
-        scriptContext->GetThreadContext()->GetDebugManager()->GetDebuggingFlags()->SetForceInterpreter(false);
-    }
+    scriptContext->GetThreadContext()->GetDebugManager()->GetDebuggingFlags()->SetForceInterpreter(false);
 }
 
 Js::DynamicObject* JsrtDebugManager::GetScript(Js::Utf8SourceInfo* utf8SourceInfo)

+ 16 - 39
lib/Parser/Parse.cpp

@@ -27,11 +27,6 @@ const uint ParseNode::mpnopgrfnop[knopLim] =
 #include "ptlist.h"
 };
 
-bool Parser::IsES6DestructuringEnabled() const
-{
-    return m_scriptContext->GetConfig()->IsES6DestructuringEnabled();
-}
-
 struct BlockInfoStack
 {
     StmtNest pstmt;
@@ -1355,7 +1350,7 @@ Symbol* Parser::AddDeclForPid(ParseNodeVar * pnodeVar, IdentPtr pid, SymbolType
             case knopLetDecl:
             case knopConstDecl:
                 // Destructuring made possible to have the formals to be the let bind. But that shouldn't throw the error.
-                if (errorOnRedecl && (!IsES6DestructuringEnabled() || sym->GetSymbolType() != STFormal))
+                if (errorOnRedecl && (sym->GetSymbolType() != STFormal))
                 {
                     Error(ERRRedeclaration);
                 }
@@ -2865,10 +2860,6 @@ ParseNodePtr Parser::ParseDefaultExportClause()
     {
     case tkCLASS:
     {
-        if (!m_scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled())
-        {
-            goto LDefault;
-        }
 
         // Before we parse the class itself we need to know if the class has an identifier name.
         // If it does, we'll treat this class as an ordinary class declaration which will bind
@@ -3343,11 +3334,6 @@ ParseNodePtr Parser::ParseTerm(BOOL fAllowCall,
         ichLim = this->GetScanner()->IchLimTok();
         iecpLim = this->GetScanner()->IecpLimTok();
 
-        if (!m_scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled())
-        {
-            goto LUnknown;
-        }
-
         this->GetScanner()->Scan();
 
         pid = ParseSuper<buildAST>(!!fAllowCall);
@@ -3574,7 +3560,7 @@ ParseNodePtr Parser::ParseTerm(BOOL fAllowCall,
         iecpMin = this->GetScanner()->IecpMinTok();
         this->GetScanner()->Scan();
 
-        if (m_token.tk == tkDot && m_scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled())
+        if (m_token.tk == tkDot)
         {
             pid = ParseMetaProperty<buildAST>(tkNEW, ichMin, &fCanAssign);
 
@@ -3620,7 +3606,7 @@ ParseNodePtr Parser::ParseTerm(BOOL fAllowCall,
             this->m_funcInArrayDepth = 0;
         }
         ChkCurTok(tkRBrack, ERRnoRbrack);
-        if (IsES6DestructuringEnabled() && pfLikelyPattern != nullptr && !IsPostFixOperators())
+        if (pfLikelyPattern != nullptr && !IsPostFixOperators())
         {
             *pfLikelyPattern = TRUE;
         }
@@ -3640,7 +3626,7 @@ ParseNodePtr Parser::ParseTerm(BOOL fAllowCall,
             pnode->ichLim = this->GetScanner()->IchLimTok();
         }
         ChkCurTok(tkRCurly, ERRnoRcurly);
-        if (IsES6DestructuringEnabled() && pfLikelyPattern != nullptr && !IsPostFixOperators())
+        if (pfLikelyPattern != nullptr && !IsPostFixOperators())
         {
             *pfLikelyPattern = TRUE;
         }
@@ -3683,14 +3669,8 @@ ParseNodePtr Parser::ParseTerm(BOOL fAllowCall,
     }
 
     case tkCLASS:
-        if (m_scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled())
-        {
-            pnode = ParseClassDecl<buildAST>(FALSE, pNameHint, pHintLength, pShortNameOffset);
-        }
-        else
-        {
-            goto LUnknown;
-        }
+        pnode = ParseClassDecl<buildAST>(FALSE, pNameHint, pHintLength, pShortNameOffset);
+
         fCanAssign = FALSE;
         break;
 
@@ -4723,7 +4703,7 @@ ParseNodePtr Parser::ParseMemberList(LPCOLESTR pNameHint, uint32* pNameHintLengt
     bool seenRest = false;
 
     // we get declaration tkLCurly - when the possible object pattern found under the expression.
-    bool isObjectPattern = (declarationType == tkVAR || declarationType == tkLET || declarationType == tkCONST || declarationType == tkLCurly) && IsES6DestructuringEnabled();
+    bool isObjectPattern = (declarationType == tkVAR || declarationType == tkLET || declarationType == tkCONST || declarationType == tkLCurly);
 
     // Check for an empty list
     if (tkRCurly == m_token.tk)
@@ -6898,7 +6878,7 @@ void Parser::ParseFncFormals(ParseNodeFnc * pnodeFnc, ParseNodeFnc * pnodeParent
             
             if (m_token.tk != tkID)
             {
-                if (IsES6DestructuringEnabled() && IsPossiblePatternStart())
+                if (IsPossiblePatternStart())
                 {
                     // Mark that the function has a non simple parameter list before parsing the pattern since the pattern can have function definitions.
                     this->GetCurrentFunctionNode()->SetHasNonSimpleParameterList();
@@ -7025,7 +7005,7 @@ void Parser::ParseFncFormals(ParseNodeFnc * pnodeFnc, ParseNodeFnc * pnodeParent
 
                 this->GetScanner()->Scan();
 
-                if (m_token.tk == tkAsg && m_scriptContext->GetConfig()->IsES6DefaultArgsEnabled())
+                if (m_token.tk == tkAsg)
                 {
                     if (seenRestParameter && m_scriptContext->GetConfig()->IsES6RestEnabled())
                     {
@@ -7392,7 +7372,7 @@ void Parser::CheckStrictFormalParameters()
 
             this->GetScanner()->Scan();
 
-            if (m_token.tk == tkAsg && m_scriptContext->GetConfig()->IsES6DefaultArgsEnabled())
+            if (m_token.tk == tkAsg)
             {
                 this->GetScanner()->Scan();
                 // We can avoid building the AST since we are just checking the default expression.
@@ -9039,7 +9019,7 @@ ParseNodePtr Parser::ParseExpr(int oplMin,
     else
     {
         ichMin = this->GetScanner()->IchMinTok();
-        pnode = ParseTerm<buildAST>(TRUE, pNameHint, &hintLength, &hintOffset, &term, fUnaryOrParen, TRUE, &fCanAssign, IsES6DestructuringEnabled() ? &fLikelyPattern : nullptr, &fIsDotOrIndex, plastRParen);
+        pnode = ParseTerm<buildAST>(TRUE, pNameHint, &hintLength, &hintOffset, &term, fUnaryOrParen, TRUE, &fCanAssign, &fLikelyPattern, &fIsDotOrIndex, plastRParen);
         if (pfLikelyPattern != nullptr)
         {
             *pfLikelyPattern = !!fLikelyPattern;
@@ -9583,7 +9563,7 @@ ParseNodePtr Parser::ParseVariableDeclaration(
 
     for (;;)
     {
-        if (IsES6DestructuringEnabled() && IsPossiblePatternStart())
+        if (IsPossiblePatternStart())
         {
             pnodeThis = ParseDestructuredLiteral<buildAST>(declarationType, true, !!isTopVarParse, DIC_None, !!fAllowIn, pfForInOk, nativeForOk);
             if (pnodeThis != nullptr)
@@ -9884,7 +9864,7 @@ ParseNodeCatch * Parser::ParseCatch()
             this->GetScanner()->Scan(); //catch(
             if (tkID != m_token.tk)
             {
-                isPattern = IsES6DestructuringEnabled() && IsPossiblePatternStart();
+                isPattern = IsPossiblePatternStart();
                 if (!isPattern)
                 {
                     IdentifierExpectedError(m_token);
@@ -10219,14 +10199,11 @@ LRestart:
         {
             Error(ERRLabelBeforeClassDeclaration);
         }
-        else if (m_scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled())
-        {
-            pnode = ParseClassDecl<buildAST>(TRUE, nullptr, nullptr, nullptr);
-        }
         else
         {
-            goto LDefaultToken;
+            pnode = ParseClassDecl<buildAST>(TRUE, nullptr, nullptr, nullptr);
         }
+
         break;
 
     case tkID:
@@ -10396,7 +10373,7 @@ LRestart:
                 this->GetScanner()->Capture(&startExprOrIdentifier);
             }
             bool fLikelyPattern = false;
-            if (IsES6DestructuringEnabled() && (beforeToken == tkLBrack || beforeToken == tkLCurly))
+            if (beforeToken == tkLBrack || beforeToken == tkLCurly)
             {
                 pnodeT = ParseExpr<buildAST>(koplNo,
                     &fCanAssign,

+ 0 - 1
lib/Parser/Parse.h

@@ -1016,7 +1016,6 @@ private:
 
     void AppendToList(ParseNodePtr * node, ParseNodePtr nodeToAppend);
 
-    bool IsES6DestructuringEnabled() const;
     bool IsPossiblePatternStart() const { return m_token.tk == tkLCurly || m_token.tk == tkLBrack; }
     bool IsPostFixOperators() const
     {

+ 0 - 20
lib/Runtime/Base/ScriptContext.cpp

@@ -3856,21 +3856,6 @@ ExitTempAllocator:
 
         } autoRestore(this->GetThreadContext());
 
-        if (!Js::Configuration::Global.EnableJitInDebugMode())
-        {
-            if (attach)
-            {
-                // Now force nonative, so the job will not be put in jit queue.
-                ForceNoNative();
-            }
-            else
-            {
-                // Take the runtime out of interpreted mode so the JIT
-                // queue can be exercised.
-                this->ForceNative();
-            }
-        }
-
         // Invalidate all the caches.
         this->threadContext->InvalidateAllProtoInlineCaches();
         this->threadContext->InvalidateAllStoreFieldInlineCaches();
@@ -4505,11 +4490,6 @@ ExitTempAllocator:
         {
             forceNoNative = this->IsInterpreted();
         }
-        else if (!Js::Configuration::Global.EnableJitInDebugMode())
-        {
-            forceNoNative = true;
-            this->ForceNoNative();
-        }
         return forceNoNative;
     }
 

+ 0 - 6
lib/Runtime/Base/ThreadConfigFlagsList.h

@@ -8,12 +8,7 @@ FLAG(IsCollectGarbageEnabled, CollectGarbage)
 FLAG(IsErrorStackTraceEnabled, errorStackTrace)
 FLAG(IsES6UnicodeVerboseEnabled, ES6UnicodeVerbose)
 FLAG_RELEASE(IsIntlEnabled, Intl)
-FLAG_RELEASE(IsES6SpeciesEnabled, ES6Species)
-FLAG_RELEASE(IsES6ClassAndExtendsEnabled, ES6Classes)
 FLAG_RELEASE(IsES6DateParseFixEnabled, ES6DateParseFix)
-FLAG_RELEASE(IsES6DefaultArgsEnabled, ES6DefaultArgs)
-FLAG_RELEASE(IsES6DestructuringEnabled, ES6Destructuring)
-FLAG_RELEASE(IsES6ForLoopSemanticsEnabled, ES6ForLoopSemantics)
 FLAG_RELEASE(IsES6FunctionNameFullEnabled, ES6FunctionNameFull)
 FLAG_RELEASE(IsES6GeneratorsEnabled, ES6Generators)
 FLAG_RELEASE(IsES7ExponentiationOperatorEnabled, ES7ExponentiationOperator)
@@ -25,7 +20,6 @@ FLAG_RELEASE(IsES6ModuleEnabled, ES6Module)
 FLAG_RELEASE(IsES6ObjectExtensionsEnabled, ES6Object)
 FLAG_RELEASE(IsES6NumberExtensionsEnabled, ES6Number)
 FLAG_RELEASE(IsES6ObjectLiteralsEnabled, ES6ObjectLiterals)
-FLAG_RELEASE(IsES6PromiseEnabled, ES6Promise)
 FLAG_RELEASE(IsES6ProxyEnabled, ES6Proxy)
 FLAG_RELEASE(IsES6RestEnabled, ES6Rest)
 FLAG_RELEASE(IsES6SpreadEnabled, ES6Spread)

+ 14 - 44
lib/Runtime/ByteCode/ByteCodeEmitter.cpp

@@ -2164,7 +2164,7 @@ void ByteCodeGenerator::LoadThisObject(FuncInfo *funcInfo, bool thisLoadedFromPa
     Assert(thisSym);
     Assert(!funcInfo->IsLambda());
 
-    if (this->scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled() && funcInfo->IsClassConstructor())
+    if (funcInfo->IsClassConstructor())
     {
         // Derived class constructors initialize 'this' to be Undecl
         //   - we'll check this value during a super call and during 'this' access
@@ -7273,7 +7273,6 @@ void EmitAssignment(
 
     case knopObjectPattern:
     {
-        Assert(byteCodeGenerator->IsES6DestructuringEnabled());
         // Copy the rhs value to be the result of the assignment if needed.
         if (asgnNode != nullptr)
         {
@@ -7284,7 +7283,6 @@ void EmitAssignment(
 
     case knopArrayPattern:
     {
-        Assert(byteCodeGenerator->IsES6DestructuringEnabled());
         // Copy the rhs value to be the result of the assignment if needed.
         if (asgnNode != nullptr)
         {
@@ -9583,8 +9581,7 @@ void EmitLoop(
         Emit(body, byteCodeGenerator, funcInfo, fReturnValue);
         funcInfo->ReleaseLoc(body);
 
-        if (byteCodeGenerator->IsES6ForLoopSemanticsEnabled() &&
-            forLoopBlock != nullptr)
+        if (forLoopBlock != nullptr)
         {
             CloneEmitBlock(forLoopBlock, byteCodeGenerator, funcInfo);
         }
@@ -9757,10 +9754,7 @@ void EmitForInOfLoopBody(ParseNodeForInOrForOf *loopNode,
         sym->SetNeedDeclaration(false);
     }
 
-    if (byteCodeGenerator->IsES6ForLoopSemanticsEnabled())
-    {
-        BeginEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
-    }
+    BeginEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
 
     EmitAssignment(nullptr, loopNode->pnodeLval, loopNode->itemLocation, byteCodeGenerator, funcInfo);
 
@@ -9772,10 +9766,7 @@ void EmitForInOfLoopBody(ParseNodeForInOrForOf *loopNode,
     Emit(loopNode->pnodeBody, byteCodeGenerator, funcInfo, fReturnValue);
     funcInfo->ReleaseLoc(loopNode->pnodeBody);
 
-    if (byteCodeGenerator->IsES6ForLoopSemanticsEnabled())
-    {
-        EndEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
-    }
+    EndEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
 
     funcInfo->ReleaseTmpRegister(loopNode->itemLocation);
     if (loopNode->emitLabels)
@@ -9828,11 +9819,6 @@ void EmitForIn(ParseNodeForInOrForOf *loopNode,
     byteCodeGenerator->Writer()->ExitLoop(loopId);
 
     funcInfo->ReleaseForInLoopLevel(forInLoopLevel);
-
-    if (!byteCodeGenerator->IsES6ForLoopSemanticsEnabled())
-    {
-        EndEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
-    }
 }
 
 void EmitForInOrForOf(ParseNodeForInOrForOf *loopNode, ByteCodeGenerator *byteCodeGenerator, FuncInfo *funcInfo, BOOL fReturnValue)
@@ -9858,8 +9844,7 @@ void EmitForInOrForOf(ParseNodeForInOrForOf *loopNode, ByteCodeGenerator *byteCo
     // (break every time on the loop back edge) and correct display of current statement under debugger.
     // See WinBlue 231880 for details.
     byteCodeGenerator->Writer()->RecordStatementAdjustment(Js::FunctionBody::SAT_All);
-    if (byteCodeGenerator->IsES6ForLoopSemanticsEnabled() &&
-        loopNode->pnodeBlock->HasBlockScopedContent())
+    if (loopNode->pnodeBlock->HasBlockScopedContent())
     {
         byteCodeGenerator->Writer()->RecordForInOrOfCollectionScope();
     }
@@ -9874,26 +9859,17 @@ void EmitForInOrForOf(ParseNodeForInOrForOf *loopNode, ByteCodeGenerator *byteCo
     Emit(loopNode->pnodeObj, byteCodeGenerator, funcInfo, false); // evaluate collection expression
     funcInfo->ReleaseLoc(loopNode->pnodeObj);
 
-    if (byteCodeGenerator->IsES6ForLoopSemanticsEnabled())
+    EndEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
+    if (loopNode->pnodeBlock->scope != nullptr)
     {
-        EndEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
-        if (loopNode->pnodeBlock->scope != nullptr)
-        {
-            loopNode->pnodeBlock->scope->ForEachSymbol([](Symbol *sym) {
-                sym->SetIsTrackedForDebugger(false);
-            });
-        }
+        loopNode->pnodeBlock->scope->ForEachSymbol([](Symbol *sym) {
+            sym->SetIsTrackedForDebugger(false);
+        });
     }
 
     if (isForIn)
     {
         EmitForIn(loopNode, loopEntrance, continuePastLoop, byteCodeGenerator, funcInfo, fReturnValue);
-
-        if (!byteCodeGenerator->IsES6ForLoopSemanticsEnabled())
-        {
-            EndEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
-        }
-
         return;
     }
 
@@ -10041,11 +10017,6 @@ void EmitForInOrForOf(ParseNodeForInOrForOf *loopNode, ByteCodeGenerator *byteCo
         byteCodeGenerator,
         funcInfo,
         isForAwaitOf);
-
-    if (!byteCodeGenerator->IsES6ForLoopSemanticsEnabled())
-    {
-        EndEmitBlock(loopNode->pnodeBlock, byteCodeGenerator, funcInfo);
-    }
 }
 
 void EmitArrayLiteral(ParseNode *pnode, ByteCodeGenerator *byteCodeGenerator, FuncInfo *funcInfo)
@@ -11655,7 +11626,7 @@ void Emit(ParseNode* pnode, ByteCodeGenerator* byteCodeGenerator, FuncInfo* func
             EmitAssignment(nullptr, lhs, rhs->location, byteCodeGenerator, funcInfo);
         }
         funcInfo->ReleaseLoc(rhs);
-        if (!(byteCodeGenerator->IsES6DestructuringEnabled() && (lhs->IsPattern())))
+        if (!lhs->IsPattern())
         {
             funcInfo->ReleaseReference(lhs);
         }
@@ -11977,10 +11948,9 @@ void Emit(ParseNode* pnode, ByteCodeGenerator* byteCodeGenerator, FuncInfo* func
             BeginEmitBlock(pnodeFor->pnodeBlock, byteCodeGenerator, funcInfo);
             Emit(pnodeFor->pnodeInit, byteCodeGenerator, funcInfo, false);
             funcInfo->ReleaseLoc(pnodeFor->pnodeInit);
-            if (byteCodeGenerator->IsES6ForLoopSemanticsEnabled())
-            {
-                CloneEmitBlock(pnodeFor->pnodeBlock, byteCodeGenerator, funcInfo);
-            }
+
+            CloneEmitBlock(pnodeFor->pnodeBlock, byteCodeGenerator, funcInfo);
+
             EmitLoop(pnodeFor,
                 pnodeFor->pnodeCond,
                 pnodeFor->pnodeBody,

+ 1 - 11
lib/Runtime/ByteCode/ByteCodeGenerator.cpp

@@ -786,16 +786,6 @@ bool ByteCodeGenerator::IsSuper(ParseNode* pnode)
     return pnode->nop == knopName && pnode->AsParseNodeName()->IsSpecialName() && pnode->AsParseNodeSpecialName()->isSuper;
 }
 
-bool ByteCodeGenerator::IsES6DestructuringEnabled() const
-{
-    return scriptContext->GetConfig()->IsES6DestructuringEnabled();
-}
-
-bool ByteCodeGenerator::IsES6ForLoopSemanticsEnabled() const
-{
-    return scriptContext->GetConfig()->IsES6ForLoopSemanticsEnabled();
-}
-
 // ByteCodeGenerator debug mode means we are generating debug mode user-code. Library code is always in non-debug mode.
 bool ByteCodeGenerator::IsInDebugMode() const
 {
@@ -4814,7 +4804,7 @@ void AssignRegisters(ParseNode *pnode, ByteCodeGenerator *byteCodeGenerator)
                 CheckMaybeEscapedUse(pnode->AsParseNodeBin()->pnode1, byteCodeGenerator);
             }
 
-            if (byteCodeGenerator->IsES6DestructuringEnabled() && (pnode->AsParseNodeBin()->pnode1->nop == knopArrayPattern || pnode->AsParseNodeBin()->pnode1->nop == knopObjectPattern))
+            if ((pnode->AsParseNodeBin()->pnode1->nop == knopArrayPattern || pnode->AsParseNodeBin()->pnode1->nop == knopObjectPattern))
             {
                 // Destructured arrays may have default values and need undefined.
                 byteCodeGenerator->AssignUndefinedConstRegister();

+ 0 - 3
lib/Runtime/ByteCode/ByteCodeGenerator.h

@@ -424,9 +424,6 @@ public:
     void StartSubexpression(ParseNode* node);
     void EndSubexpression(ParseNode* node);
 
-    bool IsES6DestructuringEnabled() const;
-    bool IsES6ForLoopSemanticsEnabled() const;
-
     // Debugger methods.
     bool IsInDebugMode() const;
     bool IsInNonDebugMode() const;

+ 0 - 1
lib/Runtime/Debug/DiagObjectModel.cpp

@@ -3172,7 +3172,6 @@ namespace Js
                 if (pResolvedObject->obj == nullptr)
                 {
                     // Temp workaround till the arguments (In jit code) work is ready.
-                    Assert(Js::Configuration::Global.EnableJitInDebugMode());
                     pResolvedObject->obj = pMembersList->Item(i)->aVar;
                 }
                 else if (pResolvedObject->obj != pMembersList->Item(i)->aVar)

+ 3 - 5
lib/Runtime/Debug/TTRuntimeInfoTracker.cpp

@@ -785,11 +785,9 @@ namespace TTD
 
         this->EnqueueRootPathObject(_u("_throwTypeErrorRestrictedPropertyAccessor"), ctx->GetLibrary()->GetThrowTypeErrorRestrictedPropertyAccessorFunction());
 
-        if(ctx->GetConfig()->IsES6PromiseEnabled())
-        {
-            this->EnqueueRootPathObject(_u("_identityFunction"), ctx->GetLibrary()->GetIdentityFunction());
-            this->EnqueueRootPathObject(_u("_throwerFunction"), ctx->GetLibrary()->GetThrowerFunction());
-        }
+        this->EnqueueRootPathObject(_u("_identityFunction"), ctx->GetLibrary()->GetIdentityFunction());
+        this->EnqueueRootPathObject(_u("_throwerFunction"), ctx->GetLibrary()->GetThrowerFunction());
+
        // ArrayIteratorPrototype is not created when we have JsBuiltins, it it created on-demand only
 #ifdef ENABLE_JS_BUILTINS
         if (ctx->IsJsBuiltInEnabled())

+ 27 - 32
lib/Runtime/Language/JavascriptOperators.cpp

@@ -10672,30 +10672,28 @@ SetElementIHelper_INDEX_TYPE_IS_NUMBER:
         //3.ReturnIfAbrupt(C).
         Var constructor = JavascriptOperators::GetProperty(object, PropertyIds::constructor, scriptContext);
 
-        if (scriptContext->GetConfig()->IsES6SpeciesEnabled())
+        //4.If C is undefined, return defaultConstructor.
+        if (JavascriptOperators::IsUndefinedObject(constructor))
         {
-            //4.If C is undefined, return defaultConstructor.
-            if (JavascriptOperators::IsUndefinedObject(constructor))
-            {
-                return defaultConstructor;
-            }
-            //5.If Type(C) is not Object, throw a TypeError exception.
-            if (!JavascriptOperators::IsObject(constructor))
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedObject, _u("[constructor]"));
-            }
-            //6.Let S be Get(C, @@species).
-            //7.ReturnIfAbrupt(S).
-            Var species = nullptr;
-            if (!JavascriptOperators::GetProperty(VarTo<RecyclableObject>(constructor),
-                PropertyIds::_symbolSpecies, &species, scriptContext)
-                || JavascriptOperators::IsUndefinedOrNull(species))
-            {
-                //8.If S is either undefined or null, return defaultConstructor.
-                return defaultConstructor;
-            }
-            constructor = species;
+            return defaultConstructor;
+        }
+        //5.If Type(C) is not Object, throw a TypeError exception.
+        if (!JavascriptOperators::IsObject(constructor))
+        {
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedObject, _u("[constructor]"));
         }
+        //6.Let S be Get(C, @@species).
+        //7.ReturnIfAbrupt(S).
+        Var species = nullptr;
+        if (!JavascriptOperators::GetProperty(VarTo<RecyclableObject>(constructor),
+            PropertyIds::_symbolSpecies, &species, scriptContext)
+            || JavascriptOperators::IsUndefinedOrNull(species))
+        {
+            //8.If S is either undefined or null, return defaultConstructor.
+            return defaultConstructor;
+        }
+        constructor = species;
+
         //9.If IsConstructor(S) is true, return S.
         RecyclableObject* constructorObj = JavascriptOperators::TryFromVar<RecyclableObject>(constructor);
         if (constructorObj && JavascriptOperators::IsConstructor(constructorObj))
@@ -11466,17 +11464,14 @@ SetElementIHelper_INDEX_TYPE_IS_NUMBER:
     // Helper to fetch @@species from a constructor object
     Var JavascriptOperators::GetSpecies(RecyclableObject* constructor, ScriptContext* scriptContext)
     {
-        if (scriptContext->GetConfig()->IsES6SpeciesEnabled())
-        {
-            Var species = nullptr;
+        Var species = nullptr;
 
-            // Let S be Get(C, @@species)
-            if (JavascriptOperators::GetProperty(constructor, PropertyIds::_symbolSpecies, &species, scriptContext)
-                && !JavascriptOperators::IsUndefinedOrNull(species))
-            {
-                // If S is neither undefined nor null, let C be S
-                return species;
-            }
+        // Let S be Get(C, @@species)
+        if (JavascriptOperators::GetProperty(constructor, PropertyIds::_symbolSpecies, &species, scriptContext)
+            && !JavascriptOperators::IsUndefinedOrNull(species))
+        {
+            // If S is neither undefined nor null, let C be S
+            return species;
         }
 
         return constructor;

+ 25 - 32
lib/Runtime/Library/ArrayBuffer.cpp

@@ -565,45 +565,38 @@ namespace Js
 
         ArrayBuffer* newBuffer = nullptr;
 
-        if (scriptContext->GetConfig()->IsES6SpeciesEnabled())
-        {
-            JavascriptFunction* defaultConstructor = scriptContext->GetLibrary()->GetArrayBufferConstructor();
-            RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(arrayBuffer, defaultConstructor, scriptContext);
-            AssertOrFailFast(JavascriptOperators::IsConstructor(constructor));
-
-            bool isDefaultConstructor = constructor == defaultConstructor;
-            Js::Var newVar = JavascriptOperators::NewObjectCreationHelper_ReentrancySafe(constructor, isDefaultConstructor, scriptContext->GetThreadContext(), [=]()->Js::Var
-            {
-                Js::Var constructorArgs[] = { constructor, JavascriptNumber::ToVar(byteLength, scriptContext) };
-                Js::CallInfo constructorCallInfo(Js::CallFlags_New, _countof(constructorArgs));
-                return JavascriptOperators::NewScObject(constructor, Js::Arguments(constructorCallInfo, constructorArgs), scriptContext);
-            });
+        JavascriptFunction* defaultConstructor = scriptContext->GetLibrary()->GetArrayBufferConstructor();
+        RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(arrayBuffer, defaultConstructor, scriptContext);
+        AssertOrFailFast(JavascriptOperators::IsConstructor(constructor));
 
-            if (!VarIs<ArrayBuffer>(newVar)) // 24.1.4.3: 19.If new does not have an [[ArrayBufferData]] internal slot throw a TypeError exception.
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedArrayBufferObject);
-            }
+        bool isDefaultConstructor = constructor == defaultConstructor;
+        Js::Var newVar = JavascriptOperators::NewObjectCreationHelper_ReentrancySafe(constructor, isDefaultConstructor, scriptContext->GetThreadContext(), [=]()->Js::Var
+        {
+            Js::Var constructorArgs[] = { constructor, JavascriptNumber::ToVar(byteLength, scriptContext) };
+            Js::CallInfo constructorCallInfo(Js::CallFlags_New, _countof(constructorArgs));
+            return JavascriptOperators::NewScObject(constructor, Js::Arguments(constructorCallInfo, constructorArgs), scriptContext);
+        });
 
-            newBuffer = VarTo<ArrayBuffer>(newVar);
+        if (!VarIs<ArrayBuffer>(newVar)) // 24.1.4.3: 19.If new does not have an [[ArrayBufferData]] internal slot throw a TypeError exception.
+        {
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedArrayBufferObject);
+        }
 
-            if (newBuffer->IsDetached()) // 24.1.4.3: 21. If IsDetachedBuffer(new) is true, then throw a TypeError exception.
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_DetachedTypedArray, _u("ArrayBuffer.prototype.slice"));
-            }
+        newBuffer = VarTo<ArrayBuffer>(newVar);
 
-            if (newBuffer == arrayBuffer) // 24.1.4.3: 22. If SameValue(new, O) is true, then throw a TypeError exception.
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedArrayBufferObject);
-            }
+        if (newBuffer->IsDetached()) // 24.1.4.3: 21. If IsDetachedBuffer(new) is true, then throw a TypeError exception.
+        {
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_DetachedTypedArray, _u("ArrayBuffer.prototype.slice"));
+        }
 
-            if (newBuffer->bufferLength < byteLength) // 24.1.4.3: 23.If the value of new's [[ArrayBufferByteLength]] internal slot < newLen, then throw a TypeError exception.
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_ArgumentOutOfRange, _u("ArrayBuffer.prototype.slice"));
-            }
+        if (newBuffer == arrayBuffer) // 24.1.4.3: 22. If SameValue(new, O) is true, then throw a TypeError exception.
+        {
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedArrayBufferObject);
         }
-        else
+
+        if (newBuffer->bufferLength < byteLength) // 24.1.4.3: 23.If the value of new's [[ArrayBufferByteLength]] internal slot < newLen, then throw a TypeError exception.
         {
-            newBuffer = library->CreateArrayBuffer(byteLength);
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_ArgumentOutOfRange, _u("ArrayBuffer.prototype.slice"));
         }
 
         Assert(newBuffer);

+ 2 - 2
lib/Runtime/Library/JavascriptArray.cpp

@@ -9595,7 +9595,7 @@ Case0:
             )
         }
         // skip the typed array and "pure" array case, we still need to handle special arrays like es5array, remote array, and proxy of array.
-        else if (pArr == nullptr || scriptContext->GetConfig()->IsES6SpeciesEnabled())
+        else
         {
             JS_REENTRANT_NO_MUTATE(jsReentLock, newObj = ArraySpeciesCreate(obj, length, scriptContext, nullptr, nullptr, &isBuiltinArrayCtor));
         }
@@ -12273,7 +12273,7 @@ Case0:
     RecyclableObject*
     JavascriptArray::ArraySpeciesCreate(Var originalArray, T length, ScriptContext* scriptContext, bool *pIsIntArray, bool *pIsFloatArray, bool *pIsBuiltinArrayCtor)
     {
-        if (originalArray == nullptr || !scriptContext->GetConfig()->IsES6SpeciesEnabled())
+        if (originalArray == nullptr)
         {
             return nullptr;
         }

+ 16 - 51
lib/Runtime/Library/JavascriptLibrary.cpp

@@ -423,12 +423,9 @@ namespace Js
         }
 #endif
 
-        if(scriptContext->GetConfig()->IsES6PromiseEnabled())
-        {
-            promisePrototype = DynamicObject::New(recycler,
-                DynamicType::New(scriptContext, TypeIds_Object, objectPrototype, nullptr,
-                DeferredTypeHandler<InitializePromisePrototype, DefaultDeferredTypeFilter, true>::GetDefaultInstance()));
-        }
+        promisePrototype = DynamicObject::New(recycler,
+            DynamicType::New(scriptContext, TypeIds_Object, objectPrototype, nullptr,
+            DeferredTypeHandler<InitializePromisePrototype, DefaultDeferredTypeFilter, true>::GetDefaultInstance()));
 
         if(scriptContext->GetConfig()->IsES6GeneratorsEnabled())
         {
@@ -614,10 +611,7 @@ namespace Js
             proxyType = DynamicType::New(scriptContext, TypeIds_Proxy, GetNull(), nullptr, NullTypeHandler<false>::GetDefaultInstance(), true, true);
         }
 
-        if (config->IsES6PromiseEnabled())
-        {
-            promiseType = DynamicType::New(scriptContext, TypeIds_Promise, promisePrototype, nullptr, NullTypeHandler<false>::GetDefaultInstance(), true, true);
-        }
+        promiseType = DynamicType::New(scriptContext, TypeIds_Promise, promisePrototype, nullptr, NullTypeHandler<false>::GetDefaultInstance(), true, true);
 
         if (config->IsES6ModuleEnabled())
         {
@@ -1440,14 +1434,12 @@ namespace Js
         __proto__setterFunction = CreateNonProfiledFunction(&ObjectPrototypeObject::EntryInfo::__proto__setter);
         __proto__setterFunction->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable, nullptr);
 
-        if (scriptContext->GetConfig()->IsES6PromiseEnabled())
-        {
-            identityFunction = CreateNonProfiledFunction(&JavascriptPromise::EntryInfo::Identity);
-            identityFunction->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable, nullptr);
 
-            throwerFunction = CreateNonProfiledFunction(&JavascriptPromise::EntryInfo::Thrower);
-            throwerFunction->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable, nullptr);
-        }
+        identityFunction = CreateNonProfiledFunction(&JavascriptPromise::EntryInfo::Identity);
+        identityFunction->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable, nullptr);
+
+        throwerFunction = CreateNonProfiledFunction(&JavascriptPromise::EntryInfo::Thrower);
+        throwerFunction->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable, nullptr);
 
         booleanTrue = RecyclerNew(recycler, JavascriptBoolean, true, booleanTypeStatic);
         booleanFalse = RecyclerNew(recycler, JavascriptBoolean, false, booleanTypeStatic);
@@ -1565,12 +1557,9 @@ namespace Js
             AddMember(globalObject, PropertyIds::Reflect, reflectObject);
         }
 
-        if (scriptContext->GetConfig()->IsES6PromiseEnabled())
-        {
-            promiseConstructor = CreateBuiltinConstructor(&JavascriptPromise::EntryInfo::NewInstance,
-                DeferredTypeHandler<InitializePromiseConstructor>::GetDefaultInstance());
-            AddFunction(globalObject, PropertyIds::Promise, promiseConstructor);
-        }
+        promiseConstructor = CreateBuiltinConstructor(&JavascriptPromise::EntryInfo::NewInstance,
+            DeferredTypeHandler<InitializePromiseConstructor>::GetDefaultInstance());
+        AddFunction(globalObject, PropertyIds::Promise, promiseConstructor);
 
         dateConstructor = CreateBuiltinConstructor(&JavascriptDate::EntryInfo::NewInstance,
             DeferredTypeHandler<InitializeDateConstructor>::GetDefaultInstance());
@@ -2567,10 +2556,8 @@ namespace Js
         {
             library->AddMember(symbolConstructor, PropertyIds::asyncIterator, library->GetSymbolAsyncIterator(), PropertyNone);
         }
-        if (scriptContext->GetConfig()->IsES6SpeciesEnabled())
-        {
-            library->AddMember(symbolConstructor, PropertyIds::species, library->GetSymbolSpecies(), PropertyNone);
-        }
+
+        library->AddMember(symbolConstructor, PropertyIds::species, library->GetSymbolSpecies(), PropertyNone);
 
         if (scriptContext->GetConfig()->IsES6ToPrimitiveEnabled())
         {
@@ -4999,10 +4986,7 @@ namespace Js
 
     void JavascriptLibrary::AddSpeciesAccessorsToLibraryObject(DynamicObject* object, FunctionInfo * getterFunctionInfo)
     {
-        if (scriptContext->GetConfig()->IsES6SpeciesEnabled())
-        {
-            AddAccessorsToLibraryObjectWithName(object, PropertyIds::_symbolSpecies, PropertyIds::_RuntimeFunctionNameId_species, getterFunctionInfo, nullptr);
-        }
+        AddAccessorsToLibraryObjectWithName(object, PropertyIds::_symbolSpecies, PropertyIds::_RuntimeFunctionNameId_species, getterFunctionInfo, nullptr);
     }
 
     RuntimeFunction* JavascriptLibrary::CreateGetterFunction(PropertyId nameId, FunctionInfo* functionInfo)
@@ -6581,8 +6565,6 @@ namespace Js
 
     JavascriptPromiseCapabilitiesExecutorFunction* JavascriptLibrary::CreatePromiseCapabilitiesExecutorFunction(JavascriptMethod entryPoint, JavascriptPromiseCapability* capability)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = &Js::JavascriptPromise::EntryInfo::CapabilitiesExecutorFunction;
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());
         JavascriptPromiseCapabilitiesExecutorFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseCapabilitiesExecutorFunction, type, functionInfo, capability);
@@ -6594,8 +6576,6 @@ namespace Js
 
     JavascriptPromiseResolveOrRejectFunction* JavascriptLibrary::CreatePromiseResolveOrRejectFunction(JavascriptMethod entryPoint, JavascriptPromise* promise, bool isReject, JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyResolvedRecord)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = &Js::JavascriptPromise::EntryInfo::ResolveOrRejectFunction;
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());
         JavascriptPromiseResolveOrRejectFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseResolveOrRejectFunction, type, functionInfo, promise, isReject, alreadyResolvedRecord);
@@ -6607,8 +6587,6 @@ namespace Js
 
     JavascriptPromiseReactionTaskFunction* JavascriptLibrary::CreatePromiseReactionTaskFunction(JavascriptMethod entryPoint, JavascriptPromiseReaction* reaction, Var argument)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint, FunctionInfo::Attributes::ErrorOnNew);
         DynamicType* type = CreateDeferredPrototypeFunctionType(entryPoint);
 
@@ -6617,8 +6595,6 @@ namespace Js
 
     JavascriptPromiseResolveThenableTaskFunction* JavascriptLibrary::CreatePromiseResolveThenableTaskFunction(JavascriptMethod entryPoint, JavascriptPromise* promise, RecyclableObject* thenable, RecyclableObject* thenFunction)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint, FunctionInfo::Attributes::ErrorOnNew);
         DynamicType* type = CreateDeferredPrototypeFunctionType(entryPoint);
 
@@ -6627,8 +6603,6 @@ namespace Js
 
     JavascriptPromiseAllResolveElementFunction* JavascriptLibrary::CreatePromiseAllResolveElementFunction(JavascriptMethod entryPoint, uint32 index, JavascriptArray* values, JavascriptPromiseCapability* capabilities, JavascriptPromiseAllResolveElementFunctionRemainingElementsWrapper* remainingElements)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = &Js::JavascriptPromise::EntryInfo::AllResolveElementFunction;
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());
         JavascriptPromiseAllResolveElementFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAllResolveElementFunction, type, functionInfo, index, values, capabilities, remainingElements);
@@ -6640,8 +6614,6 @@ namespace Js
 
     JavascriptPromiseAllSettledResolveOrRejectElementFunction* JavascriptLibrary::CreatePromiseAllSettledResolveOrRejectElementFunction(JavascriptMethod entryPoint, uint32 index, JavascriptArray* values, JavascriptPromiseCapability* capabilities, JavascriptPromiseAllResolveElementFunctionRemainingElementsWrapper* remainingElements, JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyCalledWrapper, bool isRejecting)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = &Js::JavascriptPromise::EntryInfo::AllSettledResolveOrRejectElementFunction;
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());
         JavascriptPromiseAllSettledResolveOrRejectElementFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAllSettledResolveOrRejectElementFunction, type, functionInfo, index, values, capabilities, remainingElements, alreadyCalledWrapper, isRejecting);
@@ -6653,8 +6625,6 @@ namespace Js
 
     JavascriptPromiseThenFinallyFunction* JavascriptLibrary::CreatePromiseThenFinallyFunction(JavascriptMethod entryPoint, RecyclableObject* OnFinally, RecyclableObject* Constructor, bool shouldThrow)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint, FunctionInfo::Attributes::ErrorOnNew);
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());
 
@@ -6666,8 +6636,6 @@ namespace Js
 
     JavascriptPromiseThunkFinallyFunction* JavascriptLibrary::CreatePromiseThunkFinallyFunction(JavascriptMethod entryPoint, Var value, bool shouldThrow)
     {
-        Assert(scriptContext->GetConfig()->IsES6PromiseEnabled());
-
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint, FunctionInfo::Attributes::ErrorOnNew);
         DynamicType* type = CreateDeferredPrototypeFunctionType(entryPoint);
 
@@ -7462,10 +7430,7 @@ namespace Js
 
         ScriptConfiguration const& config = *(scriptContext->GetConfig());
 
-        if (config.IsES6PromiseEnabled())
-        {
-            REGISTER_OBJECT(Promise);
-        }
+        REGISTER_OBJECT(Promise);
 
         if (config.IsES6ProxyEnabled())
         {

+ 8 - 11
lib/Runtime/Library/JavascriptReflect.cpp

@@ -386,21 +386,18 @@ namespace Js
         }
 
         Var newTarget = nullptr;
-        if (scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled())
+        if (args.Info.Count > 3)
         {
-            if (args.Info.Count > 3)
+            newTarget = args[3];
+            if (!JavascriptOperators::IsConstructor(newTarget))
             {
-                newTarget = args[3];
-                if (!JavascriptOperators::IsConstructor(newTarget))
-                {
-                    JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedConstructor, _u("newTarget"));
-                }
-            }
-            else
-            {
-                newTarget = target;
+                JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedConstructor, _u("newTarget"));
             }
         }
+        else
+        {
+            newTarget = target;
+        }
 
         RecyclableObject* thisArg = VarTo<RecyclableObject>(undefinedValue);
         if (newTarget != nullptr)

+ 21 - 28
lib/Runtime/Library/SharedArrayBuffer.cpp

@@ -174,40 +174,33 @@ namespace Js
 
         SharedArrayBuffer* newBuffer = nullptr;
 
-        if (scriptContext->GetConfig()->IsES6SpeciesEnabled())
-        {
-            JavascriptFunction* defaultConstructor = scriptContext->GetLibrary()->GetSharedArrayBufferConstructor();
-            RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(currentBuffer, defaultConstructor, scriptContext);
-            AssertOrFailFast(JavascriptOperators::IsConstructor(constructor));
+        JavascriptFunction* defaultConstructor = scriptContext->GetLibrary()->GetSharedArrayBufferConstructor();
+        RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(currentBuffer, defaultConstructor, scriptContext);
+        AssertOrFailFast(JavascriptOperators::IsConstructor(constructor));
 
-            bool isDefaultConstructor = constructor == defaultConstructor;
-            Js::Var newVar = JavascriptOperators::NewObjectCreationHelper_ReentrancySafe(constructor, isDefaultConstructor, scriptContext->GetThreadContext(), [=]()->Js::Var
-            {
-                Js::Var constructorArgs[] = { constructor, JavascriptNumber::ToVar(newbyteLength, scriptContext) };
-                Js::CallInfo constructorCallInfo(Js::CallFlags_New, _countof(constructorArgs));
-                return JavascriptOperators::NewScObject(constructor, Js::Arguments(constructorCallInfo, constructorArgs), scriptContext);
-            });
-
-            if (!VarIs<SharedArrayBuffer>(newVar))
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedSharedArrayBufferObject);
-            }
+        bool isDefaultConstructor = constructor == defaultConstructor;
+        Js::Var newVar = JavascriptOperators::NewObjectCreationHelper_ReentrancySafe(constructor, isDefaultConstructor, scriptContext->GetThreadContext(), [=]()->Js::Var
+        {
+            Js::Var constructorArgs[] = { constructor, JavascriptNumber::ToVar(newbyteLength, scriptContext) };
+            Js::CallInfo constructorCallInfo(Js::CallFlags_New, _countof(constructorArgs));
+            return JavascriptOperators::NewScObject(constructor, Js::Arguments(constructorCallInfo, constructorArgs), scriptContext);
+        });
 
-            newBuffer = VarTo<SharedArrayBuffer>(newVar);
+        if (!VarIs<SharedArrayBuffer>(newVar))
+        {
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedSharedArrayBufferObject);
+        }
 
-            if (newBuffer == currentBuffer)
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedSharedArrayBufferObject);
-            }
+        newBuffer = VarTo<SharedArrayBuffer>(newVar);
 
-            if (newBuffer->GetByteLength() < newbyteLength)
-            {
-                JavascriptError::ThrowTypeError(scriptContext, JSERR_ArgumentOutOfRange, _u("SharedArrayBuffer.prototype.slice"));
-            }
+        if (newBuffer == currentBuffer)
+        {
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedSharedArrayBufferObject);
         }
-        else
+
+        if (newBuffer->GetByteLength() < newbyteLength)
         {
-            newBuffer = library->CreateSharedArrayBuffer(newbyteLength);
+            JavascriptError::ThrowTypeError(scriptContext, JSERR_ArgumentOutOfRange, _u("SharedArrayBuffer.prototype.slice"));
         }
 
         Assert(newBuffer);

+ 9 - 16
lib/Runtime/Library/TypedArray.cpp

@@ -1373,24 +1373,17 @@ namespace Js
         uint32 beginByteOffset = srcByteOffset + begin * BYTES_PER_ELEMENT;
         uint32 newLength = end - begin;
 
-        if (scriptContext->GetConfig()->IsES6SpeciesEnabled())
-        {
-            JavascriptFunction* defaultConstructor = TypedArrayBase::GetDefaultConstructor(this, scriptContext);
-            RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(this, defaultConstructor, scriptContext);
-            AssertOrFailFast(JavascriptOperators::IsConstructor(constructor));
+        JavascriptFunction* defaultConstructor = TypedArrayBase::GetDefaultConstructor(this, scriptContext);
+        RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(this, defaultConstructor, scriptContext);
+        AssertOrFailFast(JavascriptOperators::IsConstructor(constructor));
 
-            bool isDefaultConstructor = constructor == defaultConstructor;
-            newTypedArray = VarTo<RecyclableObject>(JavascriptOperators::NewObjectCreationHelper_ReentrancySafe(constructor, isDefaultConstructor, scriptContext->GetThreadContext(), [=]()->Js::Var
-            {
-                Js::Var constructorArgs[] = { constructor, buffer, JavascriptNumber::ToVar(beginByteOffset, scriptContext), JavascriptNumber::ToVar(newLength, scriptContext) };
-                Js::CallInfo constructorCallInfo(Js::CallFlags_New, _countof(constructorArgs));
-                return TypedArrayBase::TypedArrayCreate(constructor, &Js::Arguments(constructorCallInfo, constructorArgs), newLength, scriptContext);
-            }));
-        }
-        else
+        bool isDefaultConstructor = constructor == defaultConstructor;
+        newTypedArray = VarTo<RecyclableObject>(JavascriptOperators::NewObjectCreationHelper_ReentrancySafe(constructor, isDefaultConstructor, scriptContext->GetThreadContext(), [=]()->Js::Var
         {
-            newTypedArray = TypedArray<TypeName, clamped, virtualAllocated>::Create(buffer, beginByteOffset, newLength, scriptContext->GetLibrary());
-        }
+            Js::Var constructorArgs[] = { constructor, buffer, JavascriptNumber::ToVar(beginByteOffset, scriptContext), JavascriptNumber::ToVar(newLength, scriptContext) };
+            Js::CallInfo constructorCallInfo(Js::CallFlags_New, _countof(constructorArgs));
+            return TypedArrayBase::TypedArrayCreate(constructor, &Js::Arguments(constructorCallInfo, constructorArgs), newLength, scriptContext);
+        }));
 
         return newTypedArray;
     }

+ 13 - 13
test/DebuggerCommon/rlexe.xml

@@ -737,7 +737,7 @@
   <test>
     <default>
       <files>setframe.js</files>
-      <compile-flags>-EnableJitInDiagMode -debuglaunch -dbgbaseline:setframe.js.dbg.baseline -Intl-</compile-flags>
+      <compile-flags>-debuglaunch -dbgbaseline:setframe.js.dbg.baseline -Intl-</compile-flags>
     </default>
   </test>
   <test>
@@ -750,14 +750,14 @@
   <test>
     <default>
       <files>JIT_localsAtNativeFrame1.js</files>
-      <compile-flags>-forceNative -off:simpleJit -EnableJitInDiagMode -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame1.js.dbg.baseline</compile-flags>
+      <compile-flags>-forceNative -off:simpleJit -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame1.js.dbg.baseline</compile-flags>
       <tags>exclude_dynapogo,exclude_arm,exclude_nonative</tags>
     </default>
   </test>
   <test>
     <default>
       <files>JIT_localsAtNativeFrame2.js</files>
-      <compile-flags>-forceNative -off:simpleJit -EnableJitInDiagMode -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame2.js.dbg.baseline</compile-flags>
+      <compile-flags>-forceNative -off:simpleJit -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame2.js.dbg.baseline</compile-flags>
       <tags>exclude_dynapogo,exclude_arm,exclude_nonative</tags>
     </default>
   </test>
@@ -818,21 +818,21 @@
   <test>
     <default>
       <files>jit_exprEval1.js</files>
-      <compile-flags>-EnableJitInDiagMode -debuglaunch -es6functionnamefull -forceNative -off:simpleJit -dbgbaseline:jit_exprEval1.js.dbg.baseline -Intl-</compile-flags>
+      <compile-flags>-debuglaunch -es6functionnamefull -forceNative -off:simpleJit -dbgbaseline:jit_exprEval1.js.dbg.baseline -Intl-</compile-flags>
       <tags>exclude_dynapogo,exclude_nonative</tags>
     </default>
   </test>
   <test>
     <default>
       <files>jit_editvalue1.js</files>
-      <compile-flags>-EnableJitInDiagMode -es6functionnamefull -debuglaunch -forceNative -off:simpleJit -dbgbaseline:jit_editvalue1.js.dbg.baseline</compile-flags>
+      <compile-flags>-es6functionnamefull -debuglaunch -forceNative -off:simpleJit -dbgbaseline:jit_editvalue1.js.dbg.baseline</compile-flags>
       <tags>exclude_dynapogo,exclude_nonative</tags>
     </default>
   </test>
   <test>
     <default>
       <files>jitAttach.js</files>
-      <compile-flags> -maxinterpretcount:1 -off:simpleJit -EnableJitInDiagMode -dbgbaseline:jitAttach.js.dbg.baseline</compile-flags>
+      <compile-flags> -maxinterpretcount:1 -off:simpleJit -dbgbaseline:jitAttach.js.dbg.baseline</compile-flags>
       <tags>exclude_dynapogo</tags>
     </default>
   </test>
@@ -893,7 +893,7 @@
   <test>
     <default>
       <files>jitAttach.js</files>
-      <compile-flags> -maxinterpretcount:1 -off:simpleJit -EnableJitInDiagMode -dbgbaseline:jitAttach.js.dbg.baseline</compile-flags>
+      <compile-flags> -maxinterpretcount:1 -off:simpleJit -dbgbaseline:jitAttach.js.dbg.baseline</compile-flags>
       <tags>exclude_dynapogo</tags>
     </default>
   </test>
@@ -1060,7 +1060,7 @@
   <test>
     <default>
       <files>qualified_names2.js</files>
-      <compile-flags>-debuglaunch -dbgbaseline:qualified_names2.js.dbg.baseline -es6classes -Intl-</compile-flags>
+      <compile-flags>-debuglaunch -dbgbaseline:qualified_names2.js.dbg.baseline -Intl-</compile-flags>
     </default>
   </test>
   <test>
@@ -1091,7 +1091,7 @@
   <test>
     <default>
       <files>symbols.js</files>
-      <compile-flags>-ES6Species -debuglaunch -dbgbaseline:symbols.js.dbg.baseline</compile-flags>
+      <compile-flags>-debuglaunch -dbgbaseline:symbols.js.dbg.baseline</compile-flags>
       <tags>exclude_dynapogo</tags>
     </default>
   </test>
@@ -1218,7 +1218,7 @@
   <test>
     <default>
       <files>rest.js</files>
-      <compile-flags>-dbgbaseline:rest.js.dbg.baseline -ES6Rest -ES6Classes -InspectMaxStringLength:100</compile-flags>
+      <compile-flags>-dbgbaseline:rest.js.dbg.baseline -ES6Rest -InspectMaxStringLength:100</compile-flags>
     </default>
   </test>
   <test>
@@ -1269,7 +1269,7 @@
   <test>
     <default>
       <files>TypedArray.js</files>
-      <compile-flags>-ES6Species -debuglaunch -dbgbaseline:typedarray.js.dbg.baseline -InspectMaxStringLength:200</compile-flags>
+      <compile-flags>-debuglaunch -dbgbaseline:typedarray.js.dbg.baseline -InspectMaxStringLength:200</compile-flags>
     </default>
   </test>
   <test>
@@ -1301,7 +1301,7 @@
     <default>
       <files>ConsoleScope.js</files>
       <baseline>ConsoleScope.js.baseline</baseline>
-      <compile-flags>-debuglaunch -es6classes -dbgbaseline:consolescope.js.dbg.baseline</compile-flags>
+      <compile-flags>-debuglaunch -dbgbaseline:consolescope.js.dbg.baseline</compile-flags>
     </default>
   </test>
   <test>
@@ -1320,7 +1320,7 @@
   <test>
     <default>
       <files>destructuring-debug.js</files>
-      <compile-flags>-es6defaultargs -es6destructuring -debuglaunch -InspectMaxStringLength:100 -dbgbaseline:destructuring-debug.js.dbg.baseline</compile-flags>
+      <compile-flags>-debuglaunch -InspectMaxStringLength:100 -dbgbaseline:destructuring-debug.js.dbg.baseline</compile-flags>
     </default>
   </test>
   <test>

+ 1 - 1
test/Object/rlexe.xml

@@ -337,7 +337,7 @@
   <test>
     <default>
       <files>objectCreateNull.js</files>
-      <compile-flags>-ES6Promise -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>

+ 0 - 17
test/es6/OS_917200.js

@@ -1,17 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
-
-function foo() {
-  function bar() {
-    eval('[a] = this;');
-  }
-  let a;
-  bar();
-}
-assert.throws(function () { foo(); }, SyntaxError, "Invalid assignment to array throws runtime reference error when destructuring is disabled", "Invalid left-hand side in assignment.");
-
-WScript.Echo("PASS");

+ 44 - 53
test/es6/rlexe.xml

@@ -44,7 +44,7 @@
   <test>
     <default>
       <files>boundBug3837520.js</files>
-      <compile-flags>-es6generators -es6classes -args summary -endargs</compile-flags>
+      <compile-flags>-es6generators -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -68,7 +68,7 @@
   <test>
     <default>
       <files>computedPropertyToString.js</files>
-      <compile-flags>-ES6Classes -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -103,13 +103,13 @@
   <test>
     <default>
       <files>function.name.js</files>
-      <compile-flags>-ES6Generators -ES6Classes -es6functionnamefull -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Generators -es6functionnamefull -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>function.name.js</files>
-      <compile-flags>-ES6Generators -ES6Classes -es6functionnamefull -force:deferparse -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Generators -es6functionnamefull -force:deferparse -args summary -endargs</compile-flags>
       <timeout>120</timeout> <!-- ARM64 take more than 60 -->
     </default>
   </test>
@@ -383,26 +383,26 @@
   <test>
     <default>
       <files>ES6SubclassableBuiltins.js</files>
-      <compile-flags>-ES6Classes -ES6Spread -ES6Generators -ESSharedArrayBuffer -Off:Deferparse -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Spread -ES6Generators -ESSharedArrayBuffer -Off:Deferparse -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6SubclassableBuiltins.js</files>
-      <compile-flags>-ES6Classes -ES6Spread -ES6Generators -ESSharedArrayBuffer -Force:Deferparse -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Spread -ES6Generators -ESSharedArrayBuffer -Force:Deferparse -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6SubclassableAsync.js</files>
-      <compile-flags>-ES6Classes -ES6Spread -ES6Generators -Off:Deferparse</compile-flags>
+      <compile-flags>-ES6Spread -ES6Generators -Off:Deferparse</compile-flags>
       <baseline>ES6SubclassableAsync.baseline</baseline>
     </default>
   </test>
   <test>
     <default>
       <files>ES6SubclassableAsync.js</files>
-      <compile-flags>-ES6Classes -ES6Spread -ES6Generators -Force:Deferparse</compile-flags>
+      <compile-flags>-ES6Spread -ES6Generators -Force:Deferparse</compile-flags>
       <baseline>ES6SubclassableAsync.baseline</baseline>
     </default>
   </test>
@@ -459,7 +459,7 @@
   <test>
     <default>
       <files>ES6TypedArrayExtensions.js</files>
-      <compile-flags>-CollectGarbage -ES6ObjectLiterals -ES6Species -ESSharedArrayBuffer -args summary -endargs</compile-flags>
+      <compile-flags>-CollectGarbage -ES6ObjectLiterals -ESSharedArrayBuffer -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -471,19 +471,19 @@
   <test>
     <default>
       <files>ES6ArrayUseConstructor.js</files>
-      <compile-flags> -ES6Species -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6ArrayUseConstructor_v5.js</files>
-      <compile-flags> -ES6Species- -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6Symbol.js</files>
-      <compile-flags>-CollectGarbage -ES6ObjectLiterals -ES6Species -ES6RegExSymbols -args summary -endargs</compile-flags>
+      <compile-flags>-CollectGarbage -ES6ObjectLiterals -ES6RegExSymbols -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -496,14 +496,14 @@
   <test>
     <default>
       <files>ES6Promise.js</files>
-      <compile-flags> -ES6 -ES6Promise -ES6Species -args summary -endargs</compile-flags>
+      <compile-flags> -ES6 -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6PromiseAsync.js</files>
       <baseline>ES6PromiseAsync.baseline</baseline>
-      <compile-flags> -ES6 -ES6Promise</compile-flags>
+      <compile-flags> -ES6</compile-flags>
     </default>
   </test>
   <test>
@@ -545,25 +545,25 @@
   <test>
     <default>
       <files>spreadIterator.js</files>
-      <compile-flags>-ES6Classes -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>reflectConstructConsumeNewTarget.js</files>
-      <compile-flags>-ES6Classes -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ReflectApiTests.js</files>
-      <compile-flags>-ES6Classes -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>proxyTrapConsumeNewTarget.js</files>
-      <compile-flags>-ES6Classes -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -647,7 +647,6 @@
     <default>
       <files>supersyntax05.js</files>
       <baseline>supersyntax05.baseline</baseline>
-      <compile-flags> -ES6Classes</compile-flags>
       <tags>exclude_dynapogo</tags>
     </default>
   </test>
@@ -655,14 +654,13 @@
     <default>
       <files>supersyntax06.js</files>
       <baseline>supersyntax06.baseline</baseline>
-      <compile-flags> -ES6Classes</compile-flags>
       <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>objlit.js</files>
-      <compile-flags> -ES6 -ES6ObjectLiterals -ES6DefaultArgs -args summary -endargs</compile-flags>
+      <compile-flags> -ES6 -ES6ObjectLiterals -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -696,13 +694,13 @@
   <test>
     <default>
       <files>ES6Species-apis.js</files>
-      <compile-flags>-ES6 -ES6Classes -ES6Species -args summary -endargs</compile-flags>
+      <compile-flags>-ES6 -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6Species-bugs.js</files>
-      <compile-flags>-CollectGarbage -ES6 -ES6Species -args summary -endargs</compile-flags>
+      <compile-flags>-CollectGarbage -ES6 -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -830,26 +828,26 @@
   <test>
     <default>
       <files>rest.js</files>
-      <compile-flags>-ES6Rest -ES6ObjectLiterals -ES6Spread -ES6DefaultArgs -ES6Classes -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Rest -ES6ObjectLiterals -ES6Spread -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>rest.js</files>
-      <compile-flags>-ES6Rest -ES6ObjectLiterals -ES6Spread -ES6DefaultArgs -ES6Classes -force:deferparse -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Rest -ES6ObjectLiterals -ES6Spread -force:deferparse -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>generators-syntax.js</files>
-      <compile-flags>-ES6Generators -ES6Classes -ES6DefaultArgs -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Generators -args summary -endargs</compile-flags>
       <tags>exclude_arm</tags>
     </default>
   </test>
   <test>
     <default>
       <files>generators-syntax.js</files>
-      <compile-flags>-ES6Generators -ES6Classes -ES6DefaultArgs -force:deferparse -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Generators -force:deferparse -args summary -endargs</compile-flags>
       <tags>exclude_arm</tags>
     </default>
   </test>
@@ -862,7 +860,7 @@
   <test>
     <default>
       <files>generators-deferparse.js</files>
-      <compile-flags>-force:deferparse -ES6Generators -ES6Classes -ES6DefaultArgs</compile-flags>
+      <compile-flags>-force:deferparse -ES6Generators</compile-flags>
       <tags>exclude_arm</tags>
     </default>
   </test>
@@ -876,22 +874,22 @@
   <test>
     <default>
       <files>generators-functionality.js</files>
-      <!-- <compile-flags>-ES6Generators -JitES6Generators -ES6Classes -args summary -endargs</compile-flags> -->
-      <compile-flags>-ES6Generators -ES6Classes -ES6DefaultArgs -args summary -endargs</compile-flags>
+      <!-- <compile-flags>-ES6Generators -JitES6Generators -args summary -endargs</compile-flags> -->
+      <compile-flags>-ES6Generators -args summary -endargs</compile-flags>
       <tags>exclude_arm</tags>
     </default>
   </test>
   <test>
     <default>
       <files>generators-deferred.js</files>
-      <compile-flags>-ES6Generators -ES6Classes -force:deferparse</compile-flags>
+      <compile-flags>-ES6Generators -force:deferparse</compile-flags>
       <tags>exclude_arm</tags>
     </default>
   </test>
   <test>
     <default>
       <files>generators-deferred.js</files>
-      <compile-flags>-ES6Generators -ES6Classes -serialized</compile-flags>
+      <compile-flags>-ES6Generators -serialized</compile-flags>
       <tags>exclude_arm,exclude_forceserialized</tags>
     </default>
   </test>
@@ -927,19 +925,19 @@
   <test>
     <default>
       <files>destructuring.js</files>
-      <compile-flags>-ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Rest -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>destructuring_obj.js</files>
-      <compile-flags>-ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Rest -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>destructuring_params.js</files>
-      <compile-flags>-ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs</compile-flags>
+      <compile-flags>-ES6Rest -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -956,13 +954,13 @@
   <test>
     <default>
       <files>destructuring_catch.js</files>
-      <compile-flags>-ES6Destructuring -ES6DefaultArgs -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>destructuring_bugs.js</files>
-      <compile-flags>-ES6Destructuring -ForceDeferParse -args summary -endargs</compile-flags>
+      <compile-flags>-ForceDeferParse -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -971,12 +969,6 @@
       <compile-flags>-es6spread</compile-flags>
     </default>
   </test>
-  <test>
-    <default>
-      <files>OS_917200.js</files>
-      <compile-flags>-ES6Destructuring-</compile-flags>
-    </default>
-  </test>
   <test>
     <default>
       <files>blue_641922.js</files>
@@ -1091,13 +1083,13 @@
   <test>
     <default>
       <files>regexflags.js</files>
-      <compile-flags>-version:6 -ES6RegExSticky -ES6Unicode -ES6RegExPrototypeProperties -ES6Destructuring -args summary -endargs</compile-flags>
+      <compile-flags>-version:6 -ES6RegExSticky -ES6Unicode -ES6RegExPrototypeProperties -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>regexflags-disabled-features.js</files>
-      <compile-flags>-ES2018RegExDotAll- -ES6RegExSticky- -ES6Unicode- -ES6RegExPrototypeProperties -ES6Destructuring -args summary -endargs</compile-flags>
+      <compile-flags>-ES2018RegExDotAll- -ES6RegExSticky- -ES6Unicode- -ES6RegExPrototypeProperties -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
@@ -1216,33 +1208,33 @@
   <test>
     <default>
       <files>ES6NewTarget.js</files>
-      <compile-flags>-es6classes -ES6Destructuring -args summary -endargs -es6generators</compile-flags>
+      <compile-flags>-args summary -endargs -es6generators</compile-flags>
     </default>
   </test>
 
   <test>
     <default>
       <files>ES6NewTarget_bugfixes.js</files>
-      <compile-flags>-ES6Classes -Off:Deferparse -args summary -endargs</compile-flags>
+      <compile-flags>-Off:Deferparse -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6NewTarget_bugfixes.js</files>
-      <compile-flags>-ES6Classes -Force:Deferparse -args summary -endargs</compile-flags>
+      <compile-flags>-Force:Deferparse -args summary -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6NewTarget_bugfixes.js</files>
-      <compile-flags>-ES6Classes -forceundodefer -args summary -endargs</compile-flags>
+      <compile-flags>-forceundodefer -args summary -endargs</compile-flags>
     </default>
   </test>
 
   <test>
     <default>
       <files>ES6Class_SuperChain.js</files>
-      <compile-flags>-es6classes -args summary -endargs -es6generators</compile-flags>
+      <compile-flags>-args summary -endargs -es6generators</compile-flags>
     </default>
   </test>
   <test>
@@ -1271,13 +1263,12 @@
       <files>globalParamCatchNewTargetSyntaxError.js</files>
       <baseline>globalParamCatchNewTargetSyntaxError.baseline</baseline>
       <tags>exclude_dynapogo</tags>
-      <compile-flags>-ES6Destructuring</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>ES6Class_BaseClassConstruction.js</files>
-      <compile-flags>-es6classes -args summary -endargs -es6generators</compile-flags>
+      <compile-flags>-args summary -endargs -es6generators</compile-flags>
     </default>
   </test>
   <test>
@@ -1313,7 +1304,7 @@
   <test>
     <default>
       <files>object_literal_bug.js</files>
-      <compile-flags>-ES6Destructuring -args summary -endargs</compile-flags>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
   <test>