Repository navigation
Lua hot reload: name declarations from their identity - #1546
Conversation
A hot-reload build names each function, global, class, field, allocator and dispatch stub after its source name and a short hash of its identity, so adding or removing a declaration renames nothing else. Release builds keep their numbered names.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df1cc5f328
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…erloads keep their own names
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bef3d58db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… within their function Identities whose six-digit hashes collide get sixteen digits, found before anything is named, so names do not depend on the order of the compilation units. Locals and parameters are numbered per function, so a function added to the program renumbers nothing in another (the stack-trace parameter of every function did).
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9aa23ea2f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ef3c23df9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
First step towards hot reloading more than function bodies: a
-luaHotReloadbuild names its declarations from their identity instead of numbering them.Release builds number generated Lua names in translation order (
score,score1, ...), so adding or removing a declaration can rename others, and the running map then no longer matches the edited program. A hot-reload build now names each function, global, class, field storage, class allocator and dispatch stub after its source name plus six hex digits of a hash of its package, IM name and signature (score_010f82). Every function is still named before any body is translated, so a new local cannot take a function's name.This accepts no new kind of edit on its own; it is what new functions, new globals and fields, and new lambdas will build on.
declarationNameis the previousuniqueName(rawName).addedDeclarationsRenameNothing: a global, a function and a class added in front of existing declarations, plus another package declaring the same names, leave every existing name and its meaning as it was.testSuccess/testFailby their Lua names (LuaTranslator.functionNames), which now carry the hash in hot-reload builds.LuaHotReloadTests(17) pass locally (Windows).