feat: Add VM instruction statistics and fix plugin TLV debugging
Major changes: - Add --vm-stats and --vm-stats-json CLI flags for VM instruction profiling - Implement instruction counting by opcode type with JSON output support - Add enhanced TLV debug logging with NYASH_DEBUG_PLUGIN=1 environment variable - Fix missing fields in CliConfig and ASTNode::BoxDeclaration for test compatibility - Improve plugin method call error messages with argument count/type details This enables MIR→VM conversion health checks and supports the Phase 8.6 VM optimization goals. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -71,6 +71,8 @@ fn test_mir_phase7_basic_nowait_await() {
|
||||
let ast = ASTNode::BoxDeclaration {
|
||||
name: "Main".to_string(),
|
||||
fields: vec![],
|
||||
public_fields: vec![],
|
||||
private_fields: vec![],
|
||||
methods: main_methods,
|
||||
constructors: HashMap::new(),
|
||||
init_fields: vec![],
|
||||
@ -228,6 +230,8 @@ fn test_mir_phase7_multiple_nowait_await() {
|
||||
let ast = ASTNode::BoxDeclaration {
|
||||
name: "Main".to_string(),
|
||||
fields: vec![],
|
||||
public_fields: vec![],
|
||||
private_fields: vec![],
|
||||
methods: main_methods,
|
||||
constructors: HashMap::new(),
|
||||
init_fields: vec![],
|
||||
@ -348,6 +352,8 @@ fn test_mir_phase7_nested_await() {
|
||||
let ast = ASTNode::BoxDeclaration {
|
||||
name: "Main".to_string(),
|
||||
fields: vec![],
|
||||
public_fields: vec![],
|
||||
private_fields: vec![],
|
||||
methods: main_methods,
|
||||
constructors: HashMap::new(),
|
||||
init_fields: vec![],
|
||||
@ -384,4 +390,4 @@ fn test_mir_phase7_nested_await() {
|
||||
|
||||
// Should return 10 (5 * 2)
|
||||
assert_eq!(final_value.to_string_box().value, "10");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user