Commit 59f24db9 authored by Camil Staps's avatar Camil Staps 🙂

Merge branch 'fix-global_label_string_count-for-multiple-arguments-of-bcgen' into 'master'

Fix global_label_string_count for multiple arguments of bcgen

See merge request !128
parents cb22d975 99ba4342
Pipeline #43651 passed with stages
in 12 minutes and 8 seconds
......@@ -204,7 +204,7 @@ class ABCInterpreter {
var result=undefined;
const new_asp=me.interpreter.instance.exports.get_asp();
const hp_ptr=me.memory_array[new_asp/4];
const hp_ptr=me.memory_array[new_asp/4+2];
if (me.memory_array[hp_ptr/4]!=25*8+2) { // INT, i.e. JSWorld
// Assume we have received a tuple with the first element as the result
// This is the case with jsWrapFunWithResult
......@@ -720,10 +720,10 @@ class ABCInterpreter {
/* NB: the order here matters: copy_js_to_clean may trigger garbage
* collection, so do that first, then set the rest of the arguments and
* update asp. */
const copied=me.copy_js_to_clean(args, asp+8);
me.memory_array[asp/4]=(30+17*2)*8; // JSWorld: INT 17
me.memory_array[asp/4+4]=me.shared_clean_values[f.shared_clean_value_index].ref;
me.interpreter.instance.exports.set_asp(asp+16);
const copied=me.copy_js_to_clean(args, asp+16);
me.memory_array[asp/4+2]=(30+17*2)*8; // JSWorld: INT 17
me.memory_array[asp/4+6]=me.shared_clean_values[f.shared_clean_value_index].ref;
me.interpreter.instance.exports.set_asp(asp+24);
hp=copied.hp;
hp_free=copied.hp_free;
......
......@@ -172,8 +172,6 @@ struct label *enter_label(char *label_name) {
if (r==0) {
if (label_node_p->label_node_label_p->label_module_n>=0 && label_node_p->label_node_label_p->label_module_n!=module_n) {
if (label_node_p->label_node_label_p->label_offset<0) {
label_node_p->label_node_label_p->label_module_n = -1;
return label_node_p->label_node_label_p;
} else {
struct label *new_label_p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment