Prechádzať zdrojové kódy

* changed op2strtype to have a large enough string to hold the instruction and
use that type for wasm_op2str in itcpuwasm

git-svn-id: branches/wasm@46667 -

nickysn 5 rokov pred
rodič
commit
bd72084939

+ 1 - 1
compiler/wasm32/cpubase.pas

@@ -88,7 +88,7 @@ uses
       TWasmBasicType = (wbt_i32, wbt_i64, wbt_f32, wbt_f64);
 
       {# This should define the array of instructions as string }
-      op2strtable=array[tasmop] of string[8];
+      op2strtable=array[tasmop] of string[31];
 
     Const
       {# First value of opcode enumeration }

+ 1 - 1
compiler/wasm32/itcpuwasm.pas

@@ -29,7 +29,7 @@ interface
       cpubase,cgbase;
 
     const
-      wasm_op2str : array[tasmop] of string[31] = ( '<none>',
+      wasm_op2str : op2strtable = ( '<none>',
         // control flow
         'block', 'loop', 'br', 'br_if', 'br_table', 'if', 'else', 'end',
         'return', 'unreachable',