Patent ID: 11914978
Assignee: ZHEJIANG DAHUA TECHNOLOGY CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A system for code optimization, comprising:
at least one storage medium including a set of instructions; and
at least one processor in communication with the at least one storage medium, wherein when executing the set of instructions, the at least one processor is directed to cause the system to:
generate, based on a first macro of a user code, an assembly code corresponding to the user code, wherein the first macro includes one or more parameters relating to one or more branch codes, and the assembly code includes one or more assembly branch codes corresponding to the one or more branch codes and one or more jump codes corresponding to the one or more assembly branch codes;
obtain, based on a second macro of the user code, target information for identifying an execution condition of the one or more branch codes; and
determine, based on the assembly code and the target information, a compiled user code, wherein
when being executed, the compiled user code calls, based on the target information, a procedure to determine a value of the execution condition, wherein the procedure is configured to modify an execution flow of the compiled user code, and
at least one or more jump codes include a code segment generated based on the first macro and a jump instruction, the jump instruction being configured to cause the compiled user code to jump to a corresponding assembly branch code of the one or more assembly branch codes based on the target information.