1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed cascade error, switched minidump test to use symbols.beeflang.org

This commit is contained in:
Brian Fiete 2019-08-29 17:40:17 -07:00
parent 7966abb501
commit 3625d76cc7
9 changed files with 78 additions and 47 deletions

View file

@ -27,7 +27,7 @@ TargetDirectory = "$(WorkspaceDir)/dist"
TargetName = "BeefIDE_d" TargetName = "BeefIDE_d"
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib" OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib"
CLibType = "Dynamic" CLibType = "Dynamic"
DebugCommandArguments = "-proddir=C:\\Beef\\IDE\\Tests\\Test1 -test=scripts\\HotSwap_VirtualRemap.txt -platform=Win64 -testNoExit" DebugCommandArguments = "-test=scripts\\Minidump.txt -testNoExit"
DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest" DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest"
EnvironmentVars = ["_NO_DEBUG_HEAP=1"] EnvironmentVars = ["_NO_DEBUG_HEAP=1"]

View file

@ -1,4 +1,4 @@
SetSymSrvOptions("C:/SymCache", "http://linux.beefy2d.com/symbols\nhttps://msdl.microsoft.com/download/symbols", "TempCache") SetSymSrvOptions("C:/SymCache", "http://symbols.beeflang.org/\nhttps://msdl.microsoft.com/download/symbols", "TempCache")
#SetSymSrvOptions("C:/SymCache", "https://msdl.microsoft.com/download/symbols\nhttps://chromium-browser-symsrv.commondatastorage.googleapis.com", "TempCache") #SetSymSrvOptions("C:/SymCache", "https://msdl.microsoft.com/download/symbols\nhttps://chromium-browser-symsrv.commondatastorage.googleapis.com", "TempCache")
#SetSymSrvOptions("C:/SymCache", "https://msdl.microsoft.com/download/symbols\nhttps://chromium-browser-symsrv.commondatastorage.googleapis.com", "None") #SetSymSrvOptions("C:/SymCache", "https://msdl.microsoft.com/download/symbols\nhttps://chromium-browser-symsrv.commondatastorage.googleapis.com", "None")

View file

@ -130,6 +130,10 @@ class Blurg
public static void Hey() public static void Hey()
{ {
TestStruct ts = .();
//int val = ts..mA;
ts.mA = 123;
VoidCall(); VoidCall();
int val0 = GetInt(); int val0 = GetInt();

View file

@ -4737,11 +4737,13 @@ namespace IDE
mViewWhiteSpace.mMenu = AddMenuItem(advancedEditMenu, "View White Space", "View White Space", null, null, true, mViewWhiteSpace.Bool ? 1 : 0); mViewWhiteSpace.mMenu = AddMenuItem(advancedEditMenu, "View White Space", "View White Space", null, null, true, mViewWhiteSpace.Bool ? 1 : 0);
AddMenuItem(advancedEditMenu, "Reformat Document", "Reformat Document"); AddMenuItem(advancedEditMenu, "Reformat Document", "Reformat Document");
subMenu.AddMenuItem(null); if (mSettings.mEnableDevMode)
{
var internalEditMenu = subMenu.AddMenuItem("Internal"); subMenu.AddMenuItem(null);
internalEditMenu.AddMenuItem("Hilight Cursor References", null, new (menu) => { ToggleCheck(menu, ref gApp.mSettings.mEditorSettings.mHiliteCursorReferences); }, null, null, true, gApp.mSettings.mEditorSettings.mHiliteCursorReferences ? 1 : 0); var internalEditMenu = subMenu.AddMenuItem("Internal");
internalEditMenu.AddMenuItem("Delayed Autocomplete", null, new (menu) => { ToggleCheck(menu, ref gApp.mDbgDelayedAutocomplete); }, null, null, true, gApp.mDbgDelayedAutocomplete ? 1 : 0); internalEditMenu.AddMenuItem("Hilight Cursor References", null, new (menu) => { ToggleCheck(menu, ref gApp.mSettings.mEditorSettings.mHiliteCursorReferences); }, null, null, true, gApp.mSettings.mEditorSettings.mHiliteCursorReferences ? 1 : 0);
internalEditMenu.AddMenuItem("Delayed Autocomplete", null, new (menu) => { ToggleCheck(menu, ref gApp.mDbgDelayedAutocomplete); }, null, null, true, gApp.mDbgDelayedAutocomplete ? 1 : 0);
}
////////// //////////
@ -4774,10 +4776,13 @@ namespace IDE
//subMenu.AddMenuItem("Compile Current File", null, new (menu) => { CompileCurrentFile(); }); //subMenu.AddMenuItem("Compile Current File", null, new (menu) => { CompileCurrentFile(); });
AddMenuItem(subMenu, "Cancel Build", "Cancel Build", new (menu) => { menu.SetDisabled(!IsCompiling); }); AddMenuItem(subMenu, "Cancel Build", "Cancel Build", new (menu) => { menu.SetDisabled(!IsCompiling); });
var internalBuildMenu = subMenu.AddMenuItem("Internal"); if (mSettings.mEnableDevMode)
internalBuildMenu.AddMenuItem("Autobuild (Debug)", null, new (menu) => { mDebugAutoBuild = !mDebugAutoBuild; }); {
internalBuildMenu.AddMenuItem("Autorun (Debug)", null, new (menu) => { mDebugAutoRun = !mDebugAutoRun; }); var internalBuildMenu = subMenu.AddMenuItem("Internal");
internalBuildMenu.AddMenuItem("Disable Compiling", null, new (menu) => { ToggleCheck(menu, ref mDisableBuilding); }, null, null, true, mDisableBuilding ? 1 : 0); internalBuildMenu.AddMenuItem("Autobuild (Debug)", null, new (menu) => { mDebugAutoBuild = !mDebugAutoBuild; });
internalBuildMenu.AddMenuItem("Autorun (Debug)", null, new (menu) => { mDebugAutoRun = !mDebugAutoRun; });
internalBuildMenu.AddMenuItem("Disable Compiling", null, new (menu) => { ToggleCheck(menu, ref mDisableBuilding); }, null, null, true, mDisableBuilding ? 1 : 0);
}
////////// //////////
@ -4803,38 +4808,41 @@ namespace IDE
AddMenuItem(newBreakpointMenu, "&Memory Breakpoint...", "Breakpoint Memory"); AddMenuItem(newBreakpointMenu, "&Memory Breakpoint...", "Breakpoint Memory");
AddMenuItem(newBreakpointMenu, "&Symbol Breakpoint...", "Breakpoint Symbol"); AddMenuItem(newBreakpointMenu, "&Symbol Breakpoint...", "Breakpoint Symbol");
var internalDebugMenu = subMenu.AddMenuItem("Internal"); if (mSettings.mEnableDevMode)
internalDebugMenu.AddMenuItem("Error Test", null, new (menu) => { DoErrorTest(); } ); {
internalDebugMenu.AddMenuItem("Reconnect BeefPerf", null, new (menu) => { BeefPerf.RetryConnect(); } ); var internalDebugMenu = subMenu.AddMenuItem("Internal");
AddMenuItem(internalDebugMenu, "Report Memory", "Report Memory"); internalDebugMenu.AddMenuItem("Error Test", null, new (menu) => { DoErrorTest(); } );
internalDebugMenu.AddMenuItem("Crash", null, new (menu) => { Runtime.FatalError("Bad"); }); internalDebugMenu.AddMenuItem("Reconnect BeefPerf", null, new (menu) => { BeefPerf.RetryConnect(); } );
internalDebugMenu.AddMenuItem("Exit Test", null, new (menu) => { ExitTest(); }); AddMenuItem(internalDebugMenu, "Report Memory", "Report Memory");
internalDebugMenu.AddMenuItem("Run Test", null, new (menu) => { mRunTest = !mRunTest; }); internalDebugMenu.AddMenuItem("Crash", null, new (menu) => { Runtime.FatalError("Bad"); });
internalDebugMenu.AddMenuItem("GC Collect", null, new (menu) => internalDebugMenu.AddMenuItem("Exit Test", null, new (menu) => { ExitTest(); });
{ internalDebugMenu.AddMenuItem("Run Test", null, new (menu) => { mRunTest = !mRunTest; });
var profileId = Profiler.StartSampling().GetValueOrDefault(); internalDebugMenu.AddMenuItem("GC Collect", null, new (menu) =>
for (int i < 10) {
GC.Collect(false); var profileId = Profiler.StartSampling().GetValueOrDefault();
if (profileId != 0) for (int i < 10)
profileId.Dispose(); GC.Collect(false);
}); if (profileId != 0)
internalDebugMenu.AddMenuItem("Enable GC Collect", null, new (menu) => { ToggleCheck(menu, ref mEnableGCCollect); EnableGCCollect = mEnableGCCollect; }, null, null, true, mEnableGCCollect ? 1 : 0); profileId.Dispose();
internalDebugMenu.AddMenuItem("Fast Updating", null, new (menu) => { ToggleCheck(menu, ref mDbgFastUpdate); EnableGCCollect = mDbgFastUpdate; }, null, null, true, mDbgFastUpdate ? 1 : 0); });
internalDebugMenu.AddMenuItem("Alloc String", null, new (menu) => { new String("Alloc String"); }); internalDebugMenu.AddMenuItem("Enable GC Collect", null, new (menu) => { ToggleCheck(menu, ref mEnableGCCollect); EnableGCCollect = mEnableGCCollect; }, null, null, true, mEnableGCCollect ? 1 : 0);
internalDebugMenu.AddMenuItem("Perform Long Update Checks", null, new (menu) => internalDebugMenu.AddMenuItem("Fast Updating", null, new (menu) => { ToggleCheck(menu, ref mDbgFastUpdate); EnableGCCollect = mDbgFastUpdate; }, null, null, true, mDbgFastUpdate ? 1 : 0);
{ internalDebugMenu.AddMenuItem("Alloc String", null, new (menu) => { new String("Alloc String"); });
bool wantsLongUpdateCheck = mLongUpdateProfileId != 0; internalDebugMenu.AddMenuItem("Perform Long Update Checks", null, new (menu) =>
ToggleCheck(menu, ref wantsLongUpdateCheck); {
mLastLongUpdateCheck = 0; bool wantsLongUpdateCheck = mLongUpdateProfileId != 0;
mLastLongUpdateCheckError = 0; ToggleCheck(menu, ref wantsLongUpdateCheck);
if (wantsLongUpdateCheck) mLastLongUpdateCheck = 0;
mLongUpdateProfileId = Profiler.StartSampling("LongUpdate"); mLastLongUpdateCheckError = 0;
else if (wantsLongUpdateCheck)
{ mLongUpdateProfileId = Profiler.StartSampling("LongUpdate");
mLongUpdateProfileId.Dispose(); else
mLongUpdateProfileId = 0; {
} mLongUpdateProfileId.Dispose();
}, null, null, true, (mLongUpdateProfileId != 0) ? 1 : 0); mLongUpdateProfileId = 0;
}
}, null, null, true, (mLongUpdateProfileId != 0) ? 1 : 0);
}
////////// //////////

View file

@ -638,6 +638,7 @@ namespace IDE
public KeySettings mKeySettings = new .() ~ delete _; public KeySettings mKeySettings = new .() ~ delete _;
public RecentFiles mRecentFiles = new RecentFiles() ~ delete _; public RecentFiles mRecentFiles = new RecentFiles() ~ delete _;
public String mWakaTimeKey = new .() ~ delete _; public String mWakaTimeKey = new .() ~ delete _;
public bool mEnableDevMode;
public this() public this()
{ {
@ -691,7 +692,11 @@ namespace IDE
} }
} }
sd.Add("WakaTimeKey", mWakaTimeKey); using (sd.CreateObject("Options"))
{
sd.Add("WakaTimeKey", mWakaTimeKey);
sd.Add("EnableDevMode", mEnableDevMode);
}
String dataStr = scope String(); String dataStr = scope String();
sd.ToTOML(dataStr); sd.ToTOML(dataStr);
@ -736,7 +741,11 @@ namespace IDE
} }
} }
sd.Get("WakaTimeKey", mWakaTimeKey); using (sd.Open("Options"))
{
sd.Get("WakaTimeKey", mWakaTimeKey);
sd.Get("EnableDevMode", ref mEnableDevMode);
}
} }
public void Apply() public void Apply()

View file

@ -14824,12 +14824,19 @@ BfTypedValue BfExprEvaluator::SetupNullConditional(BfTypedValue thisValue, BfTok
return thisValue; return thisValue;
} }
void BfExprEvaluator::CheckDotToken(BfTokenNode* tokenNode)
{
if ((tokenNode != NULL) && (tokenNode->mToken == BfToken_DotDot))
mModule->Fail("Unexpected cascade operation. Chaining can only be used for method invocations", tokenNode);
}
void BfExprEvaluator::DoMemberReference(BfMemberReferenceExpression* memberRefExpr, BfTypedValue* outCascadeValue) void BfExprEvaluator::DoMemberReference(BfMemberReferenceExpression* memberRefExpr, BfTypedValue* outCascadeValue)
{ {
CheckDotToken(memberRefExpr->mDotToken);
BfAttributeState attributeState; BfAttributeState attributeState;
attributeState.mTarget = (BfAttributeTargets)(BfAttributeTargets_MemberAccess); attributeState.mTarget = (BfAttributeTargets)(BfAttributeTargets_MemberAccess);
String findName; String findName;
BfAstNode* nameRefNode = memberRefExpr->mMemberName; BfAstNode* nameRefNode = memberRefExpr->mMemberName;
if (auto attrIdentifierExpr = BfNodeDynCast<BfAttributedIdentifierNode>(memberRefExpr->mMemberName)) if (auto attrIdentifierExpr = BfNodeDynCast<BfAttributedIdentifierNode>(memberRefExpr->mMemberName))

View file

@ -383,6 +383,7 @@ public:
void DoTypeIntAttr(BfTypeReference* typeRef, BfToken token); void DoTypeIntAttr(BfTypeReference* typeRef, BfToken token);
//void InitializedSizedArray(BfTupleExpression* createExpr, BfSizedArrayType* arrayType); //void InitializedSizedArray(BfTupleExpression* createExpr, BfSizedArrayType* arrayType);
void InitializedSizedArray(BfSizedArrayType* sizedArrayType, BfTokenNode* openToken, const BfSizedArray<BfExpression*>& values, const BfSizedArray<BfTokenNode*>& commas, BfTokenNode* closeToken, BfTypedValue* receivingValue = NULL); void InitializedSizedArray(BfSizedArrayType* sizedArrayType, BfTokenNode* openToken, const BfSizedArray<BfExpression*>& values, const BfSizedArray<BfTokenNode*>& commas, BfTokenNode* closeToken, BfTypedValue* receivingValue = NULL);
void CheckDotToken(BfTokenNode* tokenNode);
void DoMemberReference(BfMemberReferenceExpression* memberRefExpr, BfTypedValue* outCascadeValue); void DoMemberReference(BfMemberReferenceExpression* memberRefExpr, BfTypedValue* outCascadeValue);
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

View file

@ -1387,7 +1387,7 @@ public:
//#define BF_WANTS_LOG_CLANG //#define BF_WANTS_LOG_CLANG
//#define BF_WANTS_LOG_DBGEXPR //#define BF_WANTS_LOG_DBGEXPR
//#define BF_WANTS_LOG_CV //#define BF_WANTS_LOG_CV
#define BF_WANTS_LOG_DBG //#define BF_WANTS_LOG_DBG
#endif #endif
#ifdef BF_WANTS_LOG #ifdef BF_WANTS_LOG

View file

@ -840,6 +840,8 @@ BF_EXPORT void BF_CALLTYPE Debugger_SetSymSrvOptions(const char* symCacheDir, co
{ {
String symStr = String(startStr, cPtr - startStr); String symStr = String(startStr, cPtr - startStr);
symStr.Trim(); symStr.Trim();
if (symStr.EndsWith('/'))
symStr.Remove((int)symStr.length() - 1, 1);
if (!symStr.IsEmpty()) if (!symStr.IsEmpty())
symServers.Add(symStr); symServers.Add(symStr);
startStr = cPtr; startStr = cPtr;