-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync to internal development branch of October 2022 #34
Conversation
…s.txt if logging is enabled)
Instead of swapping pointers in an array of pointers, content of the pointer was swapped instead
…rements of full build
Timing functions are required by compiler time statistics, but without execution environment they will return 0
…scope can have its own lookup table Restoring an old scope now just changes the scope pointer and records a lookup location to hide entities defined after that points. 'unrestricted' scope flag allows new scopes in generic instantiation to lookup variables without location filtering (location filter points to the beginning of the function/type definition and we will to lookup variables defined after that) Shadowing arrays are no longer required. Entities defined in type and namespace scope are visible through top-level scope instead of a nested scope (so functions of local types still require a clean-up like before) Small behavior change, entities in scopes in top-level space behave like local scopes. Top-level scope is removed without lookup table clean-up. Generic instantiation overhead has been lowered to almost nothing.
…n is defined without default arguments Default arguments cannot be changed/repeated
Class types will store a map of all their methods, now we can lookup only specific functions and traverse the base classes directly
Do not check type map for types that are never placed there Load type name only for class types (other types will generate type name) Clear array with a memset
…y when those are referenced
…ed previously Stopped invalidating the lookup map for assignment on function removal since they are not precise and wont create false lookup results
…ch 'longername.nc'
…haracter arrays Fixed unsafe operations in low-level string functions
'nullcSetMissingFunctionLookup' is provided as a replacement. libdl is no longer required.
… target is displayed as well
Also output total instruction count at the end of a test run.
…the optimizations applied
…en when they are in global scope
Also add protections against null pointers.
Co-authored-by: mingodad <[email protected]>
I'm just building this branch to test it and I can see that there is still several warnings like:
That on my fork I tried to fix then by wrapping memset see here https://github.com/mingodad/nullc/blob/a2db7962723040bdca581aabf9a92f1da652eacc/NULLC/stdafx.h#L38 :
This way we have less compiler warnings to distract our attention. |
Also this easy to fix problem #28 has not been fixed. |
Maybe it's not that easy. |
I'll check your PR with a fix for this. |
Looking through it and seeing
Original nullc:
|
Language improvements and changes:
Library improvements:
vector:sort
for containers of pointersstrlen
andstrcpy
tostd.string
module for work with null-terminated character arraysstring
class instd.string
modulestd.string
modulestrcmp
instd.string
module on some platformsis_derived_from
function On branch jan-2021-wip missing NULLC::IsDerivedFromBase #29Code generation improvements:
Runtime improvements:
API changes:
NULLC_AUTOBINDING
feature that allowed calling external C functions by automatically finding them in the current running binary (usingdlsym
/GetProcAddress
).This feature was disabled by default before in CMake builds, but not in Makefile/VS builds.
As a replacement,
nullcSetMissingFunctionLookup
can be used to setup a callback for missing functions and do the same thing manually.Other changes:
std.memory
module translation to C++