-
Notifications
You must be signed in to change notification settings - Fork 63
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
Memory improvements + Type analysis #56
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Commented
this also fixes some type related issues with allocations and includes some rewrites of string to support this
typescript doesn't like a d.ts file to have the same name as .ts apparently :(
for some reason i changed the order of the args, because yes of course string concatenation is communitive
I still think this PR is not quite ready to be merged, but I think it's at a stage where this is no longer a draft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're going to slowly incrementally add the improvements from this into main instead of just merging one chunky PR :)
based off #56 Co-Authored-By: Bob Varioa <[email protected]>
partially from #56 Co-Authored-By: Bob Varioa <[email protected]>
Summary:
allocString
method to the allocator, currently only for the static allocatorString.prototype.concat
to be a builtin method, instead of a function in codegenPorffor.bs/s
callsPorffor.allocatePage<type>
andPorffor.allocateBytes<type>
as simple memory management utilitiesString.prototype.concat
to function in more cases, along with many other methods)Porffor.allocateNamedPage<type>(key)
to create a pointer to a single keyed place in memoryCurrent issues: (box is checked if it is completed)
makeStringBuffer
should be removed, as it has been superceded by thePorffor.allocate
methodsFuture extensions:
Porffor.allocatePage
whenever possible, choosingPorffor.allocateBytes
insteadallocateBytes
(set as well)malloc
andfree
, to be any useful requires a GC so likely far future