Skip to content

Commit

Permalink
Merge branch 'master' into heaps
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Dec 12, 2024
2 parents ef68668 + 80a10d2 commit 7c88177
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
# see https://github.com/Homebrew/homebrew-core/issues/165793#issuecomment-1989441193
# see https://github.com/Homebrew/brew/blob/master/.github/workflows/tests.yml
brew unlink python && brew link --overwrite python
brew unlink [email protected] && brew link --overwrite [email protected]
- name: "Install: Required Dev Packages"
run: |
Expand Down
8 changes: 5 additions & 3 deletions other/haxelib/hlmem/Memory.hx
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ class Memory {
return args;
}

static var useColor = false;
static var useColor = true;
static function main() {
var m = new Memory();
var others: Array<Memory> = [];
Expand All @@ -999,8 +999,10 @@ class Memory {
m.loadBytecode(arg);
continue;
}
if( arg == "-c" || arg == "--color" ) {
useColor = true;
if( arg == "-c" || arg == "--color" )
continue;
if( arg == "--no-color" ) {
useColor = false;
continue;
}
if( arg == "--args" ) {
Expand Down
16 changes: 10 additions & 6 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,12 +896,16 @@ h_bool hl_module_patch( hl_module *m1, hl_code *c ) {
hl_module_add(m2);

// call entry point (will only update types)
if( m2->functions_ptrs[c->entrypoint] ) {
vclosure cl;
cl.t = c->functions[m2->functions_indexes[c->entrypoint]].type;
cl.fun = m2->functions_ptrs[c->entrypoint];
cl.hasValue = 0;
hl_dyn_call(&cl,NULL,0);
for(i=modules_count-1;i>=0;i--) {
hl_module *m = cur_modules[i];
if( m->functions_ptrs[m->code->entrypoint] ) {
vclosure cl;
cl.t = m->code->functions[m->functions_indexes[m->code->entrypoint]].type;
cl.fun = m->functions_ptrs[m->code->entrypoint];
cl.hasValue = 0;
hl_dyn_call(&cl,NULL,0);
break;
}
}

return true;
Expand Down

0 comments on commit 7c88177

Please sign in to comment.