Skip to content

Commit d9e633f

Browse files
Merge branch 'master' into linux_merge
2 parents 530ec11 + e89d944 commit d9e633f

33 files changed

Lines changed: 218 additions & 599 deletions

lib/Backend/GlobOpt.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ GlobOpt::Optimize()
277277
if (!func->DoGlobOpt())
278278
{
279279
this->lengthEquivBv = nullptr;
280-
argumentsEquivBv = nullptr;
280+
this->argumentsEquivBv = nullptr;
281+
this->callerEquivBv = nullptr;
281282

282283
// Still need to run the dead store phase to calculate the live reg on back edge
283284
this->BackwardPass(Js::DeadStorePhase);
@@ -287,7 +288,8 @@ GlobOpt::Optimize()
287288

288289
{
289290
this->lengthEquivBv = this->func->m_symTable->m_propertyEquivBvMap->Lookup(Js::PropertyIds::length, nullptr); // Used to kill live "length" properties
290-
argumentsEquivBv = func->m_symTable->m_propertyEquivBvMap->Lookup(Js::PropertyIds::arguments, nullptr); // Used to kill live "arguments" properties
291+
this->argumentsEquivBv = func->m_symTable->m_propertyEquivBvMap->Lookup(Js::PropertyIds::arguments, nullptr); // Used to kill live "arguments" properties
292+
this->callerEquivBv = func->m_symTable->m_propertyEquivBvMap->Lookup(Js::PropertyIds::caller, nullptr); // Used to kill live "caller" properties
291293

292294
// The backward phase needs the glob opt's allocator to allocate the propertyTypeValueMap
293295
// in GlobOpt::EnsurePropertyTypeValue and ranges of instructions where int overflow may be ignored.

lib/Backend/GlobOpt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,7 @@ class GlobOpt
12011201

12021202
BVSparse<JitArenaAllocator> * lengthEquivBv;
12031203
BVSparse<JitArenaAllocator> * argumentsEquivBv;
1204+
BVSparse<JitArenaAllocator> * callerEquivBv;
12041205

12051206
GlobOptBlockData blockData;
12061207

lib/Backend/GlobOptFields.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,10 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse<JitArenaAllocator> *bv, bo
539539
case Js::OpCode::InlineeEnd:
540540
Assert(!instr->UsesAllFields());
541541

542-
// Kill all live 'arguments' fields, as 'inlineeFunction.arguments' cannot be copy-propped across different instances of
543-
// the same inlined function.
542+
// Kill all live 'arguments' and 'caller' fields, as 'inlineeFunction.arguments' and 'inlineeFunction.caller'
543+
// cannot be copy-propped across different instances of the same inlined function.
544544
KillLiveFields(argumentsEquivBv, bv);
545+
KillLiveFields(callerEquivBv, bv);
545546
break;
546547

547548
case Js::OpCode::CallDirect:

lib/Common/CommonDefines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
//----------------------------------------------------------------------------------------------------
1313
#define CHAKRA_CORE_MAJOR_VERSION 1
1414
#define CHAKRA_CORE_MINOR_VERSION 2
15-
#define CHAKRA_CORE_VERSION_RELEASE 0
15+
#define CHAKRA_CORE_VERSION_RELEASE 1
1616
#define CHAKRA_CORE_VERSION_PRERELEASE 1
1717
#define CHAKRA_CORE_VERSION_RELEASE_QFE 0
1818

19-
#define CHAKRA_VERSION_RELEASE 0
19+
#define CHAKRA_VERSION_RELEASE 1
2020

2121
// NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
2222

lib/Common/ConfigFlagsList.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ PHASE(All)
1111
PHASE(RegexCompile)
1212
PHASE(DeferParse)
1313
PHASE(DeferEventHandlers)
14-
PHASE(ParserBind)
1514
PHASE(FunctionSourceInfoParse)
1615
PHASE(StringTemplateParse)
1716
PHASE(SkipNestedDeferred)
@@ -415,7 +414,6 @@ PHASE(All)
415414
#define DEFAULT_CONFIG_Loop (1)
416415
#define DEFAULT_CONFIG_ForceDiagnosticsMode (false)
417416
#define DEFAULT_CONFIG_EnableJitInDiagMode (true)
418-
#define DEFAULT_CONFIG_EnableJitInHybridDebugging (true)
419417
#define DEFAULT_CONFIG_UseFullName (true)
420418
#define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers (true)
421419
#define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns (true)
@@ -934,7 +932,6 @@ FLAGNR(Boolean, ForcePostLowerGlobOptInstrString, "Force tracking of globopt ins
934932
FLAGNR(Boolean, ForceSplitScope , "All functions will have unmerged body and param scopes", DEFAULT_CONFIG_ForceSplitScope)
935933
FLAGNR(Boolean, EnumerateSpecialPropertiesInDebugger, "Enable enumeration of special debug properties", DEFAULT_CONFIG_EnumerateSpecialPropertiesInDebugger)
936934
FLAGNR(Boolean, EnableJitInDiagMode , "Enable Fast F12 (only applicable with ForceDiagnosticsMode or while under debugger)", DEFAULT_CONFIG_EnableJitInDiagMode)
937-
FLAGR (Boolean, EnableJitInHybridDebugging, "Enable Fast Debugging for Hybrid Debugging. Node: to turn this ON in full, EnableJitInDiagMode must be ON as well.", DEFAULT_CONFIG_EnableJitInHybridDebugging)
938935
FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForHelpers, "Enable wrapper over helper methods in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers)
939936
FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForBuiltIns, "Enable wrapper over library calls in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns)
940937
FLAGNR(Boolean, EnableFunctionSourceReportForHeapEnum, "During HeapEnum, whether to report function source info (url/row/col)", DEFAULT_CONFIG_EnableFunctionSourceReportForHeapEnum)

lib/Common/Core/ConfigFlagsTable.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include "Memory/PageHeapBlockTypeFilter.h"
77

88
#include <initguid.h>
9-
// {17DC713D-8B3E-4434-9DC8-90C275C75194}
10-
DEFINE_GUID(HybridDebuggingGuid, 0x17dc713d, 0x8b3e, 0x4434, 0x9d, 0xc8, 0x90, 0xc2, 0x75, 0xc7, 0x51, 0x94);
119

1210
#undef DebugBreak
1311

@@ -1170,28 +1168,15 @@ namespace Js
11701168
// Configuration options
11711169
//
11721170

1173-
Configuration::Configuration() : isHybridDebugging(false)
1171+
Configuration::Configuration()
11741172
{
1175-
if(IsDebuggerPresent())
1176-
{
1177-
if(IsEqualGUID(hybridDebuggingGuid, HybridDebuggingGuid))
1178-
{
1179-
isHybridDebugging = true;
1180-
}
1181-
}
11821173
}
11831174

11841175
bool Configuration::EnableJitInDebugMode()
11851176
{
1186-
return (!IsHybridDebugging() || CONFIG_FLAG(EnableJitInHybridDebugging)) && CONFIG_FLAG(EnableJitInDiagMode);
1177+
return CONFIG_FLAG(EnableJitInDiagMode);
11871178
}
11881179

1189-
bool Configuration::IsHybridDebugging()
1190-
{
1191-
return isHybridDebugging;
1192-
}
1193-
1194-
11951180
Configuration Configuration::Global;
11961181

11971182

lib/Common/Core/ConfigFlagsTable.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,10 @@ namespace Js
502502
ConfigFlagsTable flags;
503503
static Configuration Global;
504504
bool EnableJitInDebugMode();
505-
bool IsHybridDebugging();
506505

507506
// Public in case the client wants to have
508507
// a separate config from the global one
509508
Configuration();
510-
511-
private:
512-
GUID hybridDebuggingGuid; // Set to HybridDebuggingGuid when hybrid debugging - set by the out of process debugging component - jscript9diag.
513-
// Otherwise, remains un-initialized
514-
bool isHybridDebugging;
515509
};
516510

517511
//Create macros for a useful subset of the config options that either get the value from the configuration (if the option is enabled) or

lib/Jsrt/Core/JsrtContextCore.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Js::ScriptContext* JsrtContextCore::EnsureScriptContext()
7171

7272
Js::JavascriptLibrary *library = this->GetScriptContext()->GetLibrary();
7373
Assert(library != nullptr);
74+
localThreadContext->GetRecycler()->RootRelease(library->GetGlobalObject());
7475

7576
library->GetEvalFunctionObject()->SetEntryPoint(&Js::GlobalObject::EntryEval);
7677
library->GetFunctionConstructor()->SetEntryPoint(&Js::JavascriptFunction::NewInstance);

lib/Parser/Parse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ ParseNodePtr Parser::StartParseBlockWithCapacity(PnodeBlockType blockType, Scope
14411441
// Block scopes are created lazily when we discover block-scoped content.
14421442
if (scopeType != ScopeType_Unknown && scopeType != ScopeType_Block)
14431443
{
1444-
scope = Anew(&m_nodeAllocator, Scope, &m_nodeAllocator, scopeType, PHASE_OFF1(Js::ParserBindPhase), capacity);
1444+
scope = Anew(&m_nodeAllocator, Scope, &m_nodeAllocator, scopeType, capacity);
14451445
PushScope(scope);
14461446
}
14471447

lib/Parser/rterrors.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,6 @@ RT_ERROR_MSG(ASYNCERR_NoErrorInErrorState, 5200, "", "Status is 'error', but get
282282
RT_ERROR_MSG(ASYNCERR_InvalidStatusArg, 5201, "", "Missing or invalid status parameter passed to completed handler", kjstError, 0)
283283
RT_ERROR_MSG(ASYNCERR_InvalidSenderArg, 5202, "", "Missing or invalid sender parameter passed to completed handler", kjstError, 0)
284284

285-
// Error messages for hybrid debugging
286-
RT_ERROR_MSG(DIAGERR_FunctionCallNotSupported, 5400, "", "Function evaluation is disabled while debugging native code", kjstError, 0)
287-
RT_ERROR_MSG(DIAGERR_EvaluateNotSupported, 5401, "", "Evaluation of the JavaScript expression is not supported while debugging native code", kjstError, 0)
288-
289285
RT_ERROR_MSG(JSERR_InvalidCodePoint, 5600, "Invalid code point %s", "Invalid code point", kjstRangeError, 0)
290286
RT_ERROR_MSG(JSERR_InvalidNormalizationForm, 5601, "Normalization form '%s' is invalid. Expected one of: ['NFC', 'NFD', 'NFKC', 'NFKD'].", "Invalid normalization form. Expected one of: ['NFC', 'NFD', 'NFKC', 'NFKD']", kjstRangeError, 0)
291287
RT_ERROR_MSG(JSERR_InvalidUnicodeCharacter, 5602, "Failed to normalize: invalid or missing unicode character at index %d.", "Failed to normalize: invalid or missing unicode character.", kjstRangeError, 0)

0 commit comments

Comments
 (0)