Skip to content

Commit

Permalink
fix wasm mistake for procedure symbol which were already defined by p…
Browse files Browse the repository at this point in the history
…ublic directive with language type

Language type were always reset if procedure was defined
now if language type is defined in public directive then it is hold
  • Loading branch information
jmalak committed Oct 31, 2020
1 parent 9444666 commit 5d915dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bld/wasm/c/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -3315,7 +3315,10 @@ static bool proc_exam( dir_node *proc, token_idx i )

minimum = TOK_PROC_FAR;
// finish = false;
proc->sym.langtype = ModuleInfo.langtype;
if( proc->sym.langtype == WASM_LANG_NONE ) {
proc->sym.langtype = ModuleInfo.langtype;
SetMangler( &proc->sym, NULL, WASM_LANG_NONE );
}

// fixme ... we need error checking here --- for nested procs

Expand All @@ -3327,7 +3330,6 @@ static bool proc_exam( dir_node *proc, token_idx i )
info->export = false;
info->is_vararg = false;
info->pe_type = ( ( Code->info.cpu & P_CPU_MASK ) == P_286 ) || ( ( Code->info.cpu & P_CPU_MASK ) == P_386 );
SetMangler( &proc->sym, NULL, WASM_LANG_NONE );

/* Parse the definition line, except the parameters */
for( i++; i < Token_Count && AsmBuffer[i].class != TC_COMMA; i++ ) {
Expand Down

0 comments on commit 5d915dc

Please sign in to comment.