mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed comptime const evals within comptime
This commit is contained in:
parent
1ee32434a5
commit
6c3944170d
5 changed files with 47 additions and 13 deletions
|
@ -5078,11 +5078,19 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8*
|
|||
SetAndRestoreValue<BfMethodInstance*> prevMethodInstance(mCurModule->mCurMethodInstance, mCallerMethodInstance);
|
||||
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCurModule->mCurTypeInstance, mCallerTypeInstance);
|
||||
|
||||
int32 strInstAddr = *(int32*)((uint8*)stackPtr + 0);
|
||||
// int32 strInstAddr = *(int32*)((uint8*)stackPtr + 0);
|
||||
// String emitStr;
|
||||
// if (!GetStringFromAddr(strInstAddr, emitStr))
|
||||
// {
|
||||
// _Fail("Invalid String");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
addr_ce strViewPtr = *(addr_ce*)((uint8*)stackPtr);
|
||||
String emitStr;
|
||||
if (!GetStringFromAddr(strInstAddr, emitStr))
|
||||
if (!GetStringFromStringView(strViewPtr, emitStr))
|
||||
{
|
||||
_Fail("Invalid String");
|
||||
_Fail("Invalid StringView");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue