split opcode to nasal_opcode.h

This commit is contained in:
ValKmjolnir
2023-04-04 00:29:17 +08:00
parent 4e17de909a
commit 3852ce23a3
5 changed files with 231 additions and 205 deletions
+3 -1
View File
@@ -2,6 +2,7 @@
#include "nasal_import.h"
#include "nasal_err.h"
#include "nasal_opcode.h"
#include "nasal_vm.h"
#include <algorithm>
@@ -115,10 +116,11 @@ void debugger::stepinfo() {
std::cout<<"next bytecode:\n";
begin=(pc>>3)==0?0:((pc>>3)<<3);
end=(1+(pc>>3))<<3;
codestream::set(cnum,cstr,files);
for(u32 i=begin;i<end && bytecode[i].op!=op_exit;++i) {
std::cout
<<(i==pc?back_white:reset)<<(i==pc?"--> ":" ")
<<codestream(bytecode[i],i,cnum,cstr,files)
<<codestream(bytecode[i],i)
<<reset<<"\n";
}
stackinfo(10);