mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 17:47:16 +00:00
Improve comments
This commit is contained in:
parent
4a9c2600bc
commit
8cf0efa6ae
1 changed files with 3 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ function main({ runtime, buffer, system }) {
|
|||
// Set the System global
|
||||
program.variables[0].setValue(system);
|
||||
|
||||
// Replace class hashes with those from the runtime
|
||||
// Replace class hashes with actual JavaScript classes from the runtime
|
||||
program.classes = program.classes.map(hash => {
|
||||
const resolved = runtime[hash];
|
||||
if (resolved == null) {
|
||||
|
|
@ -20,11 +20,13 @@ function main({ runtime, buffer, system }) {
|
|||
return resolved;
|
||||
});
|
||||
|
||||
// Bind toplevel handlers.
|
||||
program.bindings.forEach(binding => {
|
||||
const handler = () => {
|
||||
return interpret(binding.commandOffset, program);
|
||||
};
|
||||
|
||||
// For now we only know how to handle System handlers.
|
||||
if (binding.variableOffset === 0) {
|
||||
const obj = program.variables[binding.variableOffset].getValue();
|
||||
const method = program.methods[binding.methodOffset];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue