docs: 修改注释
This commit is contained in:
parent
d8c329ac94
commit
da997a54c7
@ -44,7 +44,7 @@ public class CallGenerator implements InstructionGenerator<CallInstruction> {
|
||||
/* 3. 发出 CALL 指令 */
|
||||
out.emitCall(ins.getFunctionName(), ins.getArguments().size());
|
||||
|
||||
/* -- 3.5 若被调用函数返回 void,则无需保存返回值 -- */
|
||||
/* 3.5 若被调用函数返回 void,则无需保存返回值 */
|
||||
String rt = GlobalFunctionTable.getReturnType(ins.getFunctionName());
|
||||
if ("void".equals(rt)) {
|
||||
return; // 直接结束,无 _STORE
|
||||
|
||||
@ -48,7 +48,7 @@ public final class GlobalFunctionTable {
|
||||
*/
|
||||
public static void register(String name, String returnType) {
|
||||
if (name == null || name.trim().isEmpty()) {
|
||||
throw new IllegalArgumentException("Function name must not be null or empty");
|
||||
throw new IllegalArgumentException("函数名不能为空或 null");
|
||||
}
|
||||
RETURN_TYPES.put(
|
||||
name,
|
||||
@ -69,7 +69,7 @@ public final class GlobalFunctionTable {
|
||||
*/
|
||||
public static String getReturnType(String name) {
|
||||
if (name == null || name.trim().isEmpty()) {
|
||||
throw new IllegalArgumentException("Function name must not be null or empty");
|
||||
throw new IllegalArgumentException("函数名不能为空或 null");
|
||||
}
|
||||
return RETURN_TYPES.get(name);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user