salient-lang / salient

http://salient-lang.dev/
MIT License
0 stars 0 forks source link

Basic String Constants #13

Closed AjaniBilby closed 4 months ago

AjaniBilby commented 5 months ago

This is just a very primative implementation of string constants and likely to change.

Basically we just want to be able to have a string constant for responding in the HTTP Ping Server milestone, so basically it will take the string data, store the UTF-8 encoding in the linear memory on init, and result in a iovec being placed on the stack which refers to that section of data.

AjaniBilby commented 4 months ago

Constant strings currently resolve to an i32 which is just a pointer to a global shared iovec. In the future they should return the iovec itself. But for now it's just an int to get the benchmarks rolling