From 1b68e903a564c90ff6eff4d854a15e44bfa9342b Mon Sep 17 00:00:00 2001 From: nyash-codex Date: Sat, 1 Nov 2025 17:24:45 +0900 Subject: [PATCH] =?UTF-8?q?smokes(self):=20Hako=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=82=92=20static=20box=20Main=20{=20method=20main()=20}=20?= =?UTF-8?q?=E5=BD=A2=E5=BC=8F=E3=81=AB=E7=B5=B1=E4=B8=80=EF=BC=88parser?= =?UTF-8?q?=E4=BA=92=E6=8F=9B=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v2/profiles/quick/core/binop/self_param_binop_vm.sh | 4 ++-- .../v2/profiles/quick/core/branch/self_param_branch_vm.sh | 2 +- .../v2/profiles/quick/core/compare/self_param_compare_vm.sh | 2 +- .../v2/profiles/quick/core/const/self_param_const_vm.sh | 4 ++-- .../smokes/v2/profiles/quick/core/jump/self_param_jump_vm.sh | 2 +- tools/smokes/v2/profiles/quick/core/phi/self_param_phi_vm.sh | 4 ++-- tools/smokes/v2/profiles/quick/core/ret/self_param_ret_vm.sh | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/smokes/v2/profiles/quick/core/binop/self_param_binop_vm.sh b/tools/smokes/v2/profiles/quick/core/binop/self_param_binop_vm.sh index b85ca024..9610920a 100644 --- a/tools/smokes/v2/profiles/quick/core/binop/self_param_binop_vm.sh +++ b/tools/smokes/v2/profiles/quick/core/binop/self_param_binop_vm.sh @@ -10,8 +10,8 @@ preflight_plugins || exit 2 test_self_param_binop() { local src=' using "lang/src/llvm_ir/instructions/binop.hako" as BinOpInst -box Main { - static method main() { +static box Main { + method main() { local s = new BinOpInst.LLVMBinOpInstructionBox().lower_binop("+", 1, 2, 3) if s.contains("\"op\":\"binop\"") && s.contains("\"operation\":\"+\"") { print(1) } else { print(0) } } diff --git a/tools/smokes/v2/profiles/quick/core/branch/self_param_branch_vm.sh b/tools/smokes/v2/profiles/quick/core/branch/self_param_branch_vm.sh index 19a380ee..be0c5bbd 100644 --- a/tools/smokes/v2/profiles/quick/core/branch/self_param_branch_vm.sh +++ b/tools/smokes/v2/profiles/quick/core/branch/self_param_branch_vm.sh @@ -10,7 +10,7 @@ preflight_plugins || exit 2 test_self_param_branch() { local src=' using "lang/src/llvm_ir/instructions/branch.hako" as B -box Main { static method main() { +static box Main { method main() { local s = new B.LLVMBranchInstructionBox().lower_branch(3, 1, 2) if s.contains("\"op\":\"branch\"") && s.contains("\"then\":1") { print(1) } else { print(0) } } } diff --git a/tools/smokes/v2/profiles/quick/core/compare/self_param_compare_vm.sh b/tools/smokes/v2/profiles/quick/core/compare/self_param_compare_vm.sh index 495b6908..f33992c4 100644 --- a/tools/smokes/v2/profiles/quick/core/compare/self_param_compare_vm.sh +++ b/tools/smokes/v2/profiles/quick/core/compare/self_param_compare_vm.sh @@ -10,7 +10,7 @@ preflight_plugins || exit 2 test_self_param_compare() { local src=' using "lang/src/llvm_ir/instructions/compare.hako" as C -box Main { static method main() { +static box Main { method main() { local s = new C.LLVMCompareInstructionBox().lower_compare("<", 1, 2, 3) if s.contains("\"op\":\"compare\"") && s.contains("\"operation\":\"<\"") { print(1) } else { print(0) } } } diff --git a/tools/smokes/v2/profiles/quick/core/const/self_param_const_vm.sh b/tools/smokes/v2/profiles/quick/core/const/self_param_const_vm.sh index af117ef7..584847a0 100644 --- a/tools/smokes/v2/profiles/quick/core/const/self_param_const_vm.sh +++ b/tools/smokes/v2/profiles/quick/core/const/self_param_const_vm.sh @@ -10,8 +10,8 @@ preflight_plugins || exit 2 test_self_param_const() { local src=' using "lang/src/llvm_ir/instructions/const.hako" as ConstInst -box Main { - static method main() { +static box Main { + method main() { local v = new MapBox(); v.set("type","i64"); v.set("value",42) local s = new ConstInst.LLVMConstInstructionBox().lower_const(1, v) if s.contains("\"op\":\"const\"") && s.contains("\"i64\"") { print(1) } else { print(0) } diff --git a/tools/smokes/v2/profiles/quick/core/jump/self_param_jump_vm.sh b/tools/smokes/v2/profiles/quick/core/jump/self_param_jump_vm.sh index 4c639be8..8e401f8d 100644 --- a/tools/smokes/v2/profiles/quick/core/jump/self_param_jump_vm.sh +++ b/tools/smokes/v2/profiles/quick/core/jump/self_param_jump_vm.sh @@ -10,7 +10,7 @@ preflight_plugins || exit 2 test_self_param_jump() { local src=' using "lang/src/llvm_ir/instructions/jump.hako" as J -box Main { static method main() { +static box Main { method main() { local s = new J.LLVMJumpInstructionBox().lower_jump(5) if s.contains("\"op\":\"jump\"") && s.contains("\"target\":5") { print(1) } else { print(0) } } } diff --git a/tools/smokes/v2/profiles/quick/core/phi/self_param_phi_vm.sh b/tools/smokes/v2/profiles/quick/core/phi/self_param_phi_vm.sh index 714e47b0..35f9a638 100644 --- a/tools/smokes/v2/profiles/quick/core/phi/self_param_phi_vm.sh +++ b/tools/smokes/v2/profiles/quick/core/phi/self_param_phi_vm.sh @@ -10,8 +10,8 @@ preflight_plugins || exit 2 test_self_param_phi() { local src=' using "lang/src/llvm_ir/instructions/phi.hako" as PhiInst -box Main { - static method main() { +static box Main { + method main() { local incoming = new ArrayBox() local item = new MapBox(); item.set("value", 1); item.set("block", 0); incoming.push(item) local phi = new PhiInst.LLVMPhiInstructionBox().lower_phi(5, incoming) diff --git a/tools/smokes/v2/profiles/quick/core/ret/self_param_ret_vm.sh b/tools/smokes/v2/profiles/quick/core/ret/self_param_ret_vm.sh index f3bebd34..dfe7b515 100644 --- a/tools/smokes/v2/profiles/quick/core/ret/self_param_ret_vm.sh +++ b/tools/smokes/v2/profiles/quick/core/ret/self_param_ret_vm.sh @@ -10,7 +10,7 @@ preflight_plugins || exit 2 test_self_param_ret() { local src=' using "lang/src/llvm_ir/instructions/ret.hako" as R -box Main { static method main() { +static box Main { method main() { local s = new R.LLVMRetInstructionBox().lower_return(7) if s.contains("\"op\":\"ret\"") && s.contains("\"value\":7") { print(1) } else { print(0) } } }