Skip to content

Commit

Permalink
Do somes fixes and add minicoro as a submodule
Browse files Browse the repository at this point in the history
Next we want to replace libaco with minicoro as it also works on windows.
  • Loading branch information
UplinkCoder committed Feb 17, 2024
1 parent 11b47c9 commit 2885dbe
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "3rd_party/minicoro"]
path = 3rd_party/minicoro
url = https://github.com/edubart/minicoro.git
1 change: 1 addition & 0 deletions 3rd_party/minicoro
Submodule minicoro added at ff5321
2 changes: 1 addition & 1 deletion os/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct OS
/// Writes data to a file it will advance an internal pointer such that
/// another call to FileWrite will write to where the last call left off
/// In the event of a short write it updates inoutSize to reflect the number of bytes written
os_error_t (*FileWrite)(fhandle file, uint32_t offset, uint32_t inoutSize, void *inBuffer);
os_error_t (*FileWrite)(fhandle file, uint32_t offset, uint32_t *inoutSize, void *inBuffer);

/// Report the absolute position in the file
os_error_t (*FileTellPosition)(fhandle file, uint32_t* loWord, uint32_t* hiWord);
Expand Down
8 changes: 4 additions & 4 deletions package_serializer/build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pushd ..
call gen_code.bat
popd
cl /TP /I.. /DACCEL=ACCEL_TABLE package_serializer.c /DWRITE_TABLE /DNO_FIBERS /Od /I. /I. /Z7 /Zi /MD /D_SILENCE_IVEC_C4799
pushd ..
call gen_code.bat
popd
cl /TP /I.. /DACCEL=ACCEL_TABLE package_serializer.c /DWRITE_TABLE /DNO_FIBERS /Od /I. /I. /Z7 /Zi /MD /D_SILENCE_IVEC_C4799
18 changes: 9 additions & 9 deletions repl/build.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

cd ..

call gen_code.bat

cd repl

REM cl /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /Gm- /RTC1 /MTd /W3 /nologo /D"PRINT_CODE" /D"PRINT_BYTECODE" /ZI /TP /errorReport:prompt repl_win32.cpp


cd ..

call gen_code.bat

cd repl

REM cl /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /Gm- /RTC1 /MTd /W3 /nologo /D"PRINT_CODE" /D"PRINT_BYTECODE" /ZI /TP /errorReport:prompt repl_win32.cpp

cl /O1 /Oi /GL /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /MT /Gy /Gm- /W3 /nologo /Zi /TP /errorReport:prompt repl_win32.cpp
4 changes: 2 additions & 2 deletions repl/completion_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ void CompletionTrie_Collect(completion_trie_root_t* root,
collectCb(completionString, completionLength, userCtx);
// do we have to substract to toCopy now?
completionLength -= toCopy;
// in case he are at a child directly blow where we started
// in case we are at a child directly blow where we started
// we want to reset the unmatched prefix such that
// when we acend to the start node we will not match the next node randomly
// when we acend to the start node so we will not match the next node randomly
// due to the prefix check being a memcmp with size 0
if (currentNodeIdx == startNodeIdx)
currentUnmatchedPrefixLength = unmatchedPrefixLength;
Expand Down
6 changes: 3 additions & 3 deletions repl/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,15 @@ void Presemantic_(repl_state_t* self)
}
structNameStr =
IdentifierPtrToCharPtr(self->SemanticState.ParserIdentifierTable, printIdentifier);
xprintf("structNameStr: '%s'\n", structNameStr);
// xprintf("structNameStr: '%s'\n", structNameStr);
if (printIdentifier.v
&& printIdentifier.v != empty_identifier.v
&& 0 == strcmp("metac_compiler_t", structNameStr))
{
compilerStruct = (metac_type_aggregate_t*)
MetaCSemantic_doDeclSemantic(&self->SemanticState, struct_);
xprintf("compilerStruct: %s\n",
MetaCPrinter_PrintSemaNode(&printer, &self->SemanticState, cast(metac_node_t)compilerStruct));
// xprintf("compilerStruct: %s\n",
// MetaCPrinter_PrintSemaNode(&printer, &self->SemanticState, cast(metac_node_t)compilerStruct));
self->SemanticState.CompilerInterface = compilerStruct;
g_compilerInterface = self->SemanticState.CompilerInterface;
{
Expand Down

0 comments on commit 2885dbe

Please sign in to comment.