Skip to content
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

compile code/load compiled code feature (*.zsc) #242

Open
jespa007 opened this issue Dec 27, 2020 · 0 comments
Open

compile code/load compiled code feature (*.zsc) #242

jespa007 opened this issue Dec 27, 2020 · 0 comments
Assignees

Comments

@jespa007
Copy link
Owner

jespa007 commented Dec 27, 2020

This will avoid eval process everytime. This should compile in each import directive in each file.
map each scope with and id (class_function_sX) should be required to link them post load

Structure (4 days)

Write a file with these regions,

  • header
  • constrant strings
  • debug info
  • scopes
  • global vars
  • global functions
  • classes

Header

Will a signature with zs version and a signature

Constant strings

A region of strings for reference symbols, files, etc

Debug info

Will have a reference of symbol where function instruction it refers

Scopes

Will have a set of scopes and its symbols whenever it has or not.

Global functions (Scope 0)

Will define global functions with its intructions

Global vars (Scope 0)

Will define global vars

Classes

Will have classes with its constants/attribs/functions and instructions

Implementation (2 days)

Implement zs with parameters to write/read (and execute) compiled file

Post link operation (2 days)

Link scopes in classes, functions in instructions and link global vars after load all *.zsc

@jespa007 jespa007 added this to the ZetScript 2.0.0 milestone Dec 27, 2020
@jespa007 jespa007 self-assigned this Dec 27, 2020
@jespa007 jespa007 changed the title save/load byte code to file *.zsc compile code/load compiled code feature (*.zsc) Dec 28, 2020
@jespa007 jespa007 removed this from the ZetScript 2.1.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant