Skip to content

Commit

Permalink
Jit Generators and Asyncs
Browse files Browse the repository at this point in the history
  • Loading branch information
rhuanjl committed Jun 10, 2020
1 parent be43c03 commit 90e1e13
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Common/ConfigFlagsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ FLAGR(Boolean, ESImportMeta, "Enable import.meta keyword", DEFAULT_CONFIG_ESImpo
FLAGR(Boolean, ESGlobalThis, "Enable globalThis", DEFAULT_CONFIG_ESGlobalThis)

// This flag to be removed once JITing generator functions is stable
FLAGNR(Boolean, JitES6Generators , "Enable JITing of ES6 generators", false)
FLAGNR(Boolean, JitES6Generators , "Enable JITing of ES6 generators", true)

FLAGNR(Boolean, FastLineColumnCalculation, "Enable fast calculation of line/column numbers from the source.", DEFAULT_CONFIG_FastLineColumnCalculation)
FLAGR (String, Filename , "Jscript source file", nullptr)
Expand Down
2 changes: 1 addition & 1 deletion lib/Runtime/Base/FunctionBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ namespace Js
bool
FunctionBody::IsGeneratorAndJitIsDisabled() const
{
return this->IsCoroutine() && !(CONFIG_ISENABLED(Js::JitES6GeneratorsFlag) && !this->GetHasTry() && !this->IsInDebugMode() && !this->IsAsync());
return this->IsCoroutine() && !(CONFIG_ISENABLED(Js::JitES6GeneratorsFlag) && !this->GetHasTry() && !this->IsInDebugMode());
}

ScriptContext* EntryPointInfo::GetScriptContext()
Expand Down
5 changes: 2 additions & 3 deletions lib/Runtime/ByteCode/ByteCodeEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ void ByteCodeGenerator::FinalizeRegisters(FuncInfo* funcInfo, Js::FunctionBody*

this->SetClosureRegisters(funcInfo, byteCodeFunction);

if (this->IsInDebugMode() || byteCodeFunction->IsCoroutine())
if (this->IsInDebugMode())
{
// Give permanent registers to the inner scopes in debug mode.
// TODO: We create seperate debuggerscopes for each block which has own scope. These are stored in the var registers
Expand Down Expand Up @@ -2860,9 +2860,8 @@ void ByteCodeGenerator::EmitOneFunction(ParseNodeFnc *pnodeFnc)

// Reserve temp registers for the inner scopes. We prefer temps because the JIT will then renumber them
// and see different lifetimes. (Note that debug mode requires permanent registers. See FinalizeRegisters.)
// Need to revisit the condition when enabling JitES6Generators.
uint innerScopeCount = funcInfo->InnerScopeCount();
if (!this->IsInDebugMode() && !byteCodeFunction->IsCoroutine())
if (!this->IsInDebugMode())
{
byteCodeFunction->SetInnerScopeCount(innerScopeCount);
if (innerScopeCount)
Expand Down
1 change: 0 additions & 1 deletion test/es6/rlexe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,6 @@
<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>
<tags>exclude_arm</tags>
</default>
Expand Down

0 comments on commit 90e1e13

Please sign in to comment.