Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions lib/Common/ConfigFlagsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ PHASE(All)
PHASE(Delay)
PHASE(Speculation)
PHASE(GatherCodeGenData)
PHASE(Wasm)
PHASE(WasmBytecode)
PHASE(WasmParser)
PHASE(WasmReader)
PHASE(WasmSection)
PHASE(WasmLEB128)
PHASE(WasmFunctionBody)
PHASE(WasmBytecode)
PHASE(WasmParser)
PHASE(WasmReader)
PHASE(WasmSection)
PHASE(WasmLEB128)
PHASE(WasmFunctionBody)
PHASE(WasmDeferred)
PHASE(WasmNativeTypeCallTest)
PHASE(Asmjs)
Expand Down Expand Up @@ -378,6 +377,7 @@ PHASE(All)
#else
#define DEFAULT_CONFIG_SIMDJS (false)
#endif
#define DEFAULT_CONFIG_WASM (false)
#define DEFAULT_CONFIG_BgJitDelayFgBuffer (0)
#define DEFAULT_CONFIG_BgJitPendingFuncCap (31)
#define DEFAULT_CONFIG_CurrentSourceInfo (true)
Expand Down Expand Up @@ -830,6 +830,7 @@ FLAGNR(Boolean, AsmJsEdge , "Enable asm.js features which may have b
#define COMPILE_DISABLE_Simdjs 0
#endif
FLAGPR_REGOVR_EXP(Boolean, ES6, Simdjs, "Enable Simdjs", DEFAULT_CONFIG_SIMDJS)

FLAGR(Boolean, Simd128TypeSpec, "Enable type-specialization of Simd128 symbols", false)

FLAGNR(Boolean, AssertBreak , "Debug break on assert", false)
Expand Down Expand Up @@ -1023,6 +1024,11 @@ FLAGPRA (Boolean, ES6, ESSharedArrayBuffer , sab , "Enable Share

// /ES6 (BLUE+1) features/flags

#ifndef COMPILE_DISABLE_Wasm
#define COMPILE_DISABLE_Wasm 0
#endif
FLAGPR_REGOVR_EXP(Boolean, ES6, Wasm, "Enable WebAssembly", DEFAULT_CONFIG_WASM)

#ifdef ENABLE_PROJECTION
FLAGNR(Boolean, WinRTDelegateInterfaces , "Treat WinRT Delegates as Interfaces when determining their resolvability.", DEFAULT_CONFIG_WinRTDelegateInterfaces)
FLAGR(Boolean, WinRTAdaptiveApps , "Enable the adaptive apps feature, allowing for variable projection." , DEFAULT_CONFIG_WinRTAdaptiveApps)
Expand Down
1 change: 1 addition & 0 deletions lib/Runtime/Base/ThreadConfigFlagsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ FLAG_RELEASE(IsES7AsyncAndAwaitEnabled, ES7AsyncAwait)
FLAG_RELEASE(IsArrayBufferTransferEnabled, ArrayBufferTransfer)
FLAG_RELEASE(IsESObjectGetOwnPropertyDescriptorsEnabled, ESObjectGetOwnPropertyDescriptors)
FLAG_RELEASE(IsESSharedArrayBufferEnabled, ESSharedArrayBuffer)
FLAG_RELEASE(IsWasmEnabled, Wasm)
#ifdef ENABLE_PROJECTION
FLAG(AreWinRTDelegatesInterfaces, WinRTDelegateInterfaces)
FLAG_RELEASE(IsWinRTAdaptiveAppsEnabled, WinRTAdaptiveApps)
Expand Down
10 changes: 5 additions & 5 deletions lib/Runtime/Library/JavascriptLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ namespace Js
INIT_ERROR_PROTO(uriErrorPrototype, InitializeURIErrorPrototype);

#ifdef ENABLE_WASM
if (PHASE_ON1(WasmPhase))
if (scriptContext->GetConfig()->IsWasmEnabled())
{
INIT_ERROR_PROTO(webAssemblyCompileErrorPrototype, InitializeWebAssemblyCompileErrorPrototype);
INIT_ERROR_PROTO(webAssemblyRuntimeErrorPrototype, InitializeWebAssemblyRuntimeErrorPrototype);
Expand Down Expand Up @@ -363,7 +363,7 @@ namespace Js
DeferredTypeHandler<InitializeStringIteratorPrototype, DefaultDeferredTypeFilter, true>::GetDefaultInstance()));

#ifdef ENABLE_WASM
if (PHASE_ON1(WasmPhase))
if (scriptContext->GetConfig()->IsWasmEnabled())
{
webAssemblyMemoryPrototype = DynamicObject::New(recycler,
DynamicType::New(scriptContext, TypeIds_Object, objectPrototype, nullptr,
Expand Down Expand Up @@ -467,7 +467,7 @@ namespace Js
INIT_SIMPLE_TYPE(uriErrorType, TypeIds_Error, uriErrorPrototype);

#ifdef ENABLE_WASM
if (PHASE_ON1(WasmPhase))
if (scriptContext->GetConfig()->IsWasmEnabled())
{
INIT_SIMPLE_TYPE(webAssemblyCompileErrorType, TypeIds_Error, webAssemblyCompileErrorPrototype);
INIT_SIMPLE_TYPE(webAssemblyRuntimeErrorType, TypeIds_Error, webAssemblyRuntimeErrorPrototype);
Expand Down Expand Up @@ -612,7 +612,7 @@ namespace Js
#endif

#ifdef ENABLE_WASM
if (PHASE_ON1(WasmPhase))
if (scriptContext->GetConfig()->IsWasmEnabled())
{
webAssemblyModuleType = DynamicType::New(scriptContext, TypeIds_WebAssemblyModule, webAssemblyModulePrototype, nullptr, NullTypeHandler<false>::GetDefaultInstance(), true, true);
webAssemblyInstanceType = DynamicType::New(scriptContext, TypeIds_WebAssemblyInstance, webAssemblyInstancePrototype, nullptr, NullTypeHandler<false>::GetDefaultInstance(), true, true);
Expand Down Expand Up @@ -1508,7 +1508,7 @@ namespace Js
AddFunction(globalObject, PropertyIds::URIError, uriErrorConstructor);

#ifdef ENABLE_WASM
if (PHASE_ON1(WasmPhase))
if (scriptContext->GetConfig()->IsWasmEnabled())
{
// new WebAssembly object
webAssemblyObject = DynamicObject::New(recycler,
Expand Down
4 changes: 2 additions & 2 deletions lib/Runtime/Library/WebAssemblyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ WebAssemblyModule::CreateModule(
const byte* buffer,
const uint lengthBytes)
{
AutoProfilingPhase wasmPhase(scriptContext, Js::WasmPhase);
AutoProfilingPhase wasmPhase(scriptContext, Js::WasmBytecodePhase);
Unused(wasmPhase);

WebAssemblyModule * webAssemblyModule = nullptr;
Expand Down Expand Up @@ -162,7 +162,7 @@ WebAssemblyModule::ValidateModule(
const byte* buffer,
const uint lengthBytes)
{
AutoProfilingPhase wasmPhase(scriptContext, Js::WasmPhase);
AutoProfilingPhase wasmPhase(scriptContext, Js::WasmBytecodePhase);
Unused(wasmPhase);

try
Expand Down
2 changes: 1 addition & 1 deletion lib/WasmReader/WasmReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

// Level of tracing
#define DO_WASM_TRACE_ALL PHASE_TRACE1(Js::WasmPhase)
#define DO_WASM_TRACE_ALL PHASE_TRACE1(Js::WasmBytecodePhase)
#define DO_WASM_TRACE_DECODER DO_WASM_TRACE_ALL || PHASE_TRACE1(Js::WasmReaderPhase)
#define DO_WASM_TRACE_SECTION DO_WASM_TRACE_DECODER || PHASE_TRACE1(Js::WasmSectionPhase)
#define DO_WASM_TRACE_LEB128 DO_WASM_TRACE_ALL || PHASE_TRACE1(Js::WasmLEB128Phase)
Expand Down
Loading