Skip to content

Commit 1e3af79

Browse files
committed
fix whitespace issues
1 parent ea28f1e commit 1e3af79

19 files changed

Lines changed: 50 additions & 29 deletions

BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ action("ChakraCoreBuild") {
4242
"/p:Configuration=$config",
4343
"/p:platform=$current_cpu"
4444
]
45-
}
45+
}

Build/scripts/pgo/pogo_training.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ param (
3131
[string]$pogoArgs = "",
3232

3333
[string]$vcinstallroot = ${Env:ProgramFiles(x86)},
34-
[string]$vcbinpath = "Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\Hostx64\",
34+
[string]$vcbinpath = "Microsoft Visual Studio 14.0\VC\bin",
3535
[string]$dllname = "pgort140.dll",
3636
[string]$dllCheckName = "pgort*.dll"
3737
)
@@ -47,7 +47,7 @@ $pgoOutDllCheck = Join-Path $binpath $dllCheckName
4747
$pgoOutDll = Join-Path $binpath $dllname
4848
if (-not (Test-Path $pgoOutDllCheck)) {
4949
if ($arch -eq "x64") {
50-
$dllname = Join-Path "x64" $dllname
50+
$dllname = Join-Path "amd64" $dllname
5151
} elseif ($arch -eq "arm") {
5252
$dllname = Join-Path "arm" $dllname
5353
}

bin/ch/ChakraRtInterface.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ struct JsAPIHooks
129129

130130
typedef JsErrorCode(WINAPI *JsrtVarSerializerPtr)(SerializerCallbackBase *delegate, SerializerHandleBase **serializerHandle);
131131
typedef JsErrorCode(WINAPI *JsrtVarDeserializerPtr)(void *data, size_t dataLength, DeserializerCallbackBase *delegate, DeserializerHandleBase **deserializerHandle);
132-
typedef JsErrorCode(WINAPI *JsrtDetachArrayBufferPtr)(JsValueRef buffer);
132+
typedef JsErrorCode(WINAPI *JsrtDetachArrayBufferPtr)(JsValueRef buffer);
133133

134134
JsrtCreateRuntimePtr pfJsrtCreateRuntime;
135135
JsrtCreateContextPtr pfJsrtCreateContext;
@@ -251,7 +251,7 @@ struct JsAPIHooks
251251

252252
JsrtVarSerializerPtr pfJsrtVarSerializer;
253253
JsrtVarDeserializerPtr pfJsrtVarDeserializer;
254-
JsrtDetachArrayBufferPtr pfJsrtDetachArrayBuffer;
254+
JsrtDetachArrayBufferPtr pfJsrtDetachArrayBuffer;
255255
#ifdef _WIN32
256256
JsrtConnectJITProcess pfJsrtConnectJITProcess;
257257
#endif
@@ -478,7 +478,7 @@ class ChakraRTInterface
478478

479479
static JsErrorCode WINAPI JsVarSerializer(SerializerCallbackBase *delegate, SerializerHandleBase **serializerHandle) { return HOOK_JS_API(VarSerializer(delegate, serializerHandle)); }
480480
static JsErrorCode WINAPI JsVarDeserializer(void *data, size_t dataLength, DeserializerCallbackBase *delegate, DeserializerHandleBase **deserializerHandle) { return HOOK_JS_API(VarDeserializer(data, dataLength, delegate, deserializerHandle)); }
481-
static JsErrorCode WINAPI JsDetachArrayBuffer(JsValueRef buffer) { return HOOK_JS_API(DetachArrayBuffer(buffer)); }
481+
static JsErrorCode WINAPI JsDetachArrayBuffer(JsValueRef buffer) { return HOOK_JS_API(DetachArrayBuffer(buffer)); }
482482
static JsErrorCode WINAPI JsQueueBackgroundParse_Experimental(JsScriptContents* contents, DWORD* dwBgParseCookie) { return HOOK_JS_API(QueueBackgroundParse_Experimental)(contents, dwBgParseCookie); }
483483
static JsErrorCode WINAPI JsDiscardBackgroundParse_Experimental(DWORD dwBgParseCookie, void* buffer, bool* callerOwnsBuffer) { return HOOK_JS_API(DiscardBackgroundParse_Experimental(dwBgParseCookie, buffer, callerOwnsBuffer)); }
484484
static JsErrorCode WINAPI JsExecuteBackgroundParse_Experimental(DWORD dwBgParseCookie, JsValueRef script, JsSourceContext sourceContext, WCHAR *url, JsParseScriptAttributes parseAttributes, JsValueRef parserState, JsValueRef *result) { return HOOK_JS_API(ExecuteBackgroundParse_Experimental(dwBgParseCookie, script, sourceContext, url, parseAttributes, parserState, result)); }

bin/ch/WScriptJsrt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646

4747
struct SerializerBlob
4848
{
49-
void *data;
50-
size_t dataLength;
51-
std::vector< std::pair<void *, uint32> > transferableArrays;
49+
void *data;
50+
size_t dataLength;
51+
std::vector< std::pair<void *, uint32> > transferableArrays;
5252
};
5353

5454
MessageQueue* WScriptJsrt::messageQueue = nullptr;

lib/Common/CommonDefines.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@
269269

270270
// JIT features
271271

272+
#define ENABLE_SPECTRE_RUNTIME_MITIGATIONS
273+
272274
#if DISABLE_JIT
273275
#define ENABLE_NATIVE_CODEGEN 0
274276
#define ENABLE_PROFILE_INFO 0
@@ -340,7 +342,6 @@
340342
#endif
341343

342344
#ifdef NTBUILD
343-
#define ENABLE_SPECTRE_RUNTIME_MITIGATIONS
344345
#define ENABLE_PROJECTION
345346
#define ENABLE_FOUNDATION_OBJECT
346347
#define ENABLE_EXPERIMENTAL_FLAGS

lib/Common/ConfigFlagsList.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,25 @@ PHASE(All)
525525
#define DEFAULT_CONFIG_MaxJitThreadCount (2)
526526
#define DEFAULT_CONFIG_ForceMaxJitThreadCount (false)
527527

528+
#ifdef ENABLE_SPECTRE_RUNTIME_MITIGATIONS
529+
#define DEFAULT_CONFIG_MitigateSpectre (true)
530+
531+
#define DEFAULT_CONFIG_AddMaskingBlocks (true)
532+
533+
#define DEFAULT_CONFIG_PoisonVarArrayLoad (true)
534+
#define DEFAULT_CONFIG_PoisonIntArrayLoad (true)
535+
#define DEFAULT_CONFIG_PoisonFloatArrayLoad (true)
536+
#define DEFAULT_CONFIG_PoisonTypedArrayLoad (true)
537+
#define DEFAULT_CONFIG_PoisonStringLoad (true)
538+
#define DEFAULT_CONFIG_PoisonObjectsForLoads (true)
539+
540+
#define DEFAULT_CONFIG_PoisonVarArrayStore (true)
541+
#define DEFAULT_CONFIG_PoisonIntArrayStore (true)
542+
#define DEFAULT_CONFIG_PoisonFloatArrayStore (true)
543+
#define DEFAULT_CONFIG_PoisonTypedArrayStore (true)
544+
#define DEFAULT_CONFIG_PoisonStringStore (true)
545+
#define DEFAULT_CONFIG_PoisonObjectsForStores (true)
546+
#else
528547
#define DEFAULT_CONFIG_MitigateSpectre (false)
529548

530549
#define DEFAULT_CONFIG_AddMaskingBlocks (false)
@@ -540,8 +559,9 @@ PHASE(All)
540559
#define DEFAULT_CONFIG_PoisonIntArrayStore (false)
541560
#define DEFAULT_CONFIG_PoisonFloatArrayStore (false)
542561
#define DEFAULT_CONFIG_PoisonTypedArrayStore (false)
543-
#define DEFAULT_CONFIG_PoisonStringStore (true)
562+
#define DEFAULT_CONFIG_PoisonStringStore (false)
544563
#define DEFAULT_CONFIG_PoisonObjectsForStores (false)
564+
#endif
545565

546566
#ifdef RECYCLER_PAGE_HEAP
547567
#define DEFAULT_CONFIG_PageHeap ((Js::Number) PageHeapMode::PageHeapModeOff)

lib/Jsrt/Core/JsrtContextCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ bool ChakraHostDeserializerHandle::ReadRawBytes(size_t length, void **data)
271271

272272
bool ChakraHostDeserializerHandle::ReadBytes(size_t length, void **data)
273273
{
274-
Assert(m_deserializer);
275-
return m_deserializer->ReadBytes(length, data);
274+
Assert(m_deserializer);
275+
return m_deserializer->ReadBytes(length, data);
276276
}
277277

278278
JsValueRef ChakraHostDeserializerHandle::ReadValue()

lib/Runtime/Library/ArrayBuffer.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ namespace Js
9494
virtual BYTE* GetBuffer() const = 0;
9595
virtual bool IsValidVirtualBufferLength(uint length) const { return false; };
9696

97-
char GetExtraInfoBits() { return infoBits; }
98-
void SetExtraInfoBits(char info) { infoBits = info; }
97+
char GetExtraInfoBits() { return infoBits; }
98+
void SetExtraInfoBits(char info) { infoBits = info; }
9999

100100
static int GetIsDetachedOffset() { return offsetof(ArrayBufferBase, isDetached); }
101101

102102
protected:
103103
Field(bool) isDetached;
104-
Field(char) infoBits;
105-
};
104+
Field(char) infoBits;
105+
};
106106

107107
template <> bool VarIsImpl<ArrayBufferBase>(RecyclableObject* obj);
108108

@@ -208,7 +208,7 @@ namespace Js
208208
static int GetByteLengthOffset() { return offsetof(ArrayBuffer, bufferLength); }
209209
virtual void AddParent(ArrayBufferParent* parent) override;
210210

211-
void Detach();
211+
void Detach();
212212
#if defined(TARGET_64)
213213
//maximum 2G -1 for amd64
214214
static const uint32 MaxArrayBufferLength = 0x7FFFFFFF;

lib/SCACore/SCAEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ namespace Js
1717
// No debugger support yet.
1818
}
1919
}
20-
};
20+
};

lib/SCACore/SCAEngine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,4 @@ namespace Js
230230
}
231231
};
232232

233-
}
233+
}

0 commit comments

Comments
 (0)