OSDN Git Service

webcpuの高速化と描画処理の実装変更(直接bmpに描画するようになった。)
[chnosproject/AI004.git] / webcpu / instrbas.js
index ccd51c2..ebf62f6 100644 (file)
@@ -19,11 +19,11 @@ WebCPU_Instruction.prototype = {
        },
        execute: function(env){
                //printXXXはデバッグ用
-               if(this.printSourceRegister){
+               if(this.isEnabledPrintSourceRegister && this.printSourceRegister){
                        this.printSourceRegister(env);
                }
                this.instruction(env);
-               if(this.printDestinationRegister){
+               if(this.isEnabledPrintDestinationRegister && this.printDestinationRegister){
                        this.printDestinationRegister(env);
                }
        },
@@ -72,6 +72,8 @@ WebCPU_Instruction.prototype = {
                return parseSignedInt32(argBinStr.substr(baseIndex + offset * 2, bytes * 2), 16);
        },
        //
+       isEnabledPrintSourceRegister: true,
+       isEnabledPrintDestinationRegister: true,
        printSourceRegister: null,
        printDestinationRegister: null,
 }