Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Research shows that in the existing scheme for compiling the code of the Flutter application, the obtained patch package is often required to be uploaded to an application store, so that a user downloads the patch package from the application store, and thus function repair or version update in the Flutter application is completed, the whole update process is relatively long, and the update efficiency is relatively low.
Based on the research, the present disclosure provides a code compiling method, a code running method, a code compiling apparatus, a code running apparatus, a computer device, and a storage medium. In the embodiment of the disclosure, after a to-be-processed Dart code file of a Flutter application is obtained, the to-be-processed Dart code file may be compiled, an intermediate compiled file in the compiling process of the to-be-processed Dart code file is obtained, and then the intermediate compiled file may be compiled according to a preset byte code format, so as to obtain and store a target byte code file, where the target byte code file may be sent to the Flutter application as a to-be-executed byte code, so that a Dart virtual machine in the Flutter application operates the to-be-executed byte code file through a Dart interpreter, thereby implementing a function corresponding to the to-be-executed byte code file, further shortening an update flow of the Flutter application, and improving update efficiency.
To facilitate understanding of the present embodiment, a code compiling and code running method disclosed in the embodiments of the present disclosure is first described in detail, and an execution subject of the code compiling and code running method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability. In some possible implementations, the code compiling, code running method may be implemented by a processor invoking computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a code compiling method provided in an embodiment of the present disclosure is a code compiling method applied to a server, where the server includes a Dart compiler, the method includes steps S101 to S105, where:
s101: acquiring a to-be-processed Dart code file of the Flutter application, wherein the to-be-processed Dart code file comprises a Dart code of a new function in the Flutter application, or comprises a Dart code of a to-be-repaired function in the Flutter application.
In the embodiment of the present disclosure, a to-be-processed Dart code file of the Flutter application needs to be obtained first. Here, in the case of repairing a function to be repaired in the Flutter application or developing a new function for the Flutter application, the obtained repair product or development product may be the Dart code file to be processed.
It should be understood that, since the compiling language of the Flutter application is the Dart language, a language adopted when the Flutter application is subjected to new function development or a function to be repaired is also the Dart language, and an obtained repair product or a development product is the Dart code file to be processed.
S103: and compiling the Dart code file to be processed, and acquiring an intermediate compiled file in the compiling process of the Dart code file to be processed.
In the embodiment of the present disclosure, after the to-be-processed Dart code file is obtained, the to-be-processed Dart code file may be compiled. In specific implementation, the Dart code file to be processed may be loaded into a Dart compiler, so that the Dart compiler identifies and compiles the Dart code file to be processed.
Here, the process of compiling the Dart code file to be processed by the Dart compiler is shown in fig. 2, where syntax analysis and lexical analysis may be performed on the Dart code file to be processed first to obtain an intermediate compiled file, and here, the process of syntax analysis and lexical analysis on the Dart code file to be processed is described below, and is not described herein again.
It should be understood that, as can be seen from fig. 2, after the Dart compiler performs intermediate optimization and instruction generation on the intermediate compiled file in sequence, the resulting compiled product is an AOT compiled file, which is a binary code associated with a processor type.
S105: and acquiring a preset byte code format, and compiling the intermediate compilation file according to the preset byte code format to obtain and store a target byte code file.
In this embodiment of the disclosure, as shown in fig. 2, the Dart compiler may compile the intermediate compiled file according to a preset byte code format to obtain a target byte code file, and store the target byte code file.
It should be understood that the intermediate compiled file may be compiled by the Dart compiler described above, thereby outputting the target bytecode file.
In the embodiment of the present disclosure, after the target bytecode file is obtained, the target bytecode file can be saved in a local file. In specific implementation, first, whether the target bytecode file is a bytecode file corresponding to a new function developed for the Flutter application is determined based on a function identifier of the target bytecode file, where the function identifier is used to indicate a function in the Flutter application corresponding to the target bytecode file.
When it is determined that the target function corresponding to the target bytecode file is not a new function based on the function identifier, it may be determined that the target function corresponding to the target bytecode file is based on the function identifier, and a first storage location corresponding to the target function in the local file is determined. Then, a second storage location for storing the target bytecode file can be determined based on the storage directory of the first storage location in the local file, and the target bytecode file can be saved in the local file based on the second storage location, wherein the second storage location is located under the storage directory of the first storage location.
In addition, when the second storage location contains the bytecode file of the other version of the target function, the bytecode file of the other version can be deleted in advance; then, the target byte code file is stored in the second storage position, and the storage space of the server can be cleaned through the processing mode, so that the waste of the storage space is avoided.
When the target function corresponding to the target bytecode file is determined to be a new function based on the function identifier, a first storage location of the target function may be determined in the local file of the server, for example, a first storage location may be allocated to the target bytecode file in the storage location of the local file of the server, and a second storage location corresponding to the target bytecode file may be determined based on the first storage location. The target bytecode file can then be saved to a local file based on the second storage location.
As can be seen from the above description, in the embodiment of the present disclosure, after the to-be-processed Dart code file of the Flutter application is obtained, the to-be-processed Dart code file may be compiled, and an intermediate compiled file in the compiling process of the to-be-processed Dart code file is obtained, and then the intermediate compiled file may be compiled according to a preset byte code format, so as to obtain and store a target byte code file, where the target byte code file may be sent to the Flutter application as the to-be-executed byte code, so that a Dart virtual machine in the Flutter application operates the to-be-executed byte code file through a Dart interpreter, thereby implementing a function corresponding to the to-be-executed byte code file, further shortening an update flow of the Flutter application, and improving update efficiency.
In an optional embodiment, in step S103, obtaining an intermediate compiled file in the compiling process of the to-be-processed Dart code file specifically includes the following processes:
and acquiring a dynamic link library file in the compiling process of the Dart code file to be processed, and determining the dynamic link library file as the intermediate compiled file.
In the embodiment of the present disclosure, as can be seen from fig. 2, after the Dart code file to be processed is obtained, the intermediate compiled file can be obtained by performing syntax analysis and lexical analysis on the Dart code file to be processed. In specific implementation, after performing syntax analysis and lexical analysis on the Dart code file to be processed, a dynamic link library file (i.e., a dill file) of the Dart code file to be processed may be obtained first, and then the dynamic link library file may be determined as an intermediate compiled file, where the dynamic link library file may be an intermediate compiled file (i.e., a kernel product).
In the embodiment of the present disclosure, firstly, the to-be-processed Dart code file needs to be parsed and lexical analyzed. Specifically, the parsing can be used to identify the word sequence of the Dart code in the Dart code file to be processed, and analyze whether the word sequence of the Dart code conforms to the syntax of the Dart language. In addition, the lexical analysis can be used for identifying the characters in the Dart code file to be processed and analyzing whether the characters in the Dart code file to be processed meet the requirements of the Dart code.
Here, in the case that the word sequence of the Dart code in the Dart code file to be processed does not conform to the syntax of the Dart language, or the characters in the Dart code file to be processed do not conform to the requirement of the Dart code, the Dart code in the Dart code file to be processed may be modified, so that the modified Dart code file to be processed can be normally compiled.
After the to-be-processed Dart code file is subjected to syntactic analysis and lexical analysis, the to-be-processed Dart code file can be compiled to obtain a dynamic link library file (i.e., dill file) of the to-be-processed Dart code file, and the dynamic link library file is determined as an intermediate compiled file.
As can be seen from the above description, by obtaining the dynamic link library file in the compiling process of the Dart code file to be processed, the dynamic link library file can be determined as an intermediate compiled file, so that the Dart compiler can compile the intermediate compiled file to obtain the target bytecode file.
In an optional embodiment, in step S105, obtaining a preset byte code format, and compiling the intermediate compilation file according to the preset byte code format to obtain and store a target byte code file, specifically including the following steps:
s1051: acquiring attribute information of each component in the intermediate compilation file; wherein the attribute information is used for indicating the byte code format matched with the corresponding component.
As can be seen from the above description, in the embodiment of the present disclosure, the to-be-processed Dart code file corresponds to a new function or a to-be-repaired function in a Flutter application, where the to-be-processed Dart code file includes Dart codes for implementing different types of instructions.
For example, the pending Dart code file may include Dart codes of various types of instructions such as data access, method call, type check, mathematical operation, memory allocation, content jump, and the like. Therefore, after the intermediate compiled file obtained by compiling the Dart code file to be processed is obtained, the intermediate compiled file may include various components for implementing different types of instructions. Here, the types of instructions that can be implemented by each component in the compiled file may be different, and thus, each component may correspond to different attribute information.
It should be understood that the type of the implemented instruction, the corresponding compiling rule, and the format of the bytecode converted according to the compiling rule, which are indicated by the different attribute information, should be different. Therefore, in the embodiment of the present disclosure, a matching bytecode format may be preset for each attribute information.
S1052: and compiling the intermediate compilation file based on the attribute information and the preset byte code format to obtain the target byte code file.
In the embodiment of the present disclosure, after determining the attribute information of each component in the intermediate compilation file, the predetermined bytecode format corresponding to each component may be determined based on the attribute information of each component. Then, based on the byte code format, the compiling rule of the component part can be determined; and converting each component into a preset byte code format based on the compiling rule so as to obtain a target byte code file corresponding to the intermediate compiling file.
According to the description, the preset byte code format is determined according to the attribute information of each component in the intermediate compilation file, and the intermediate compilation file is compiled according to the preset byte code format to obtain the target byte code file, so that the correctness of the determined target byte code file is ensured, and the normal operation of the target byte code file is ensured.
In an optional implementation manner, in the step S1052, the compiling the intermediate compiled file based on the attribute information and the preset bytecode format to obtain the target bytecode file, specifically including the following processes:
(1) determining a target bytecode format matched with the corresponding component in the bytecode formats based on the attribute information;
(2) and compiling the components according to the target byte code format to obtain the target byte code file.
In the embodiment of the present disclosure, a mapping relationship between different attribute information and corresponding bytecode formats may be established in advance through a table. Therefore, after determining the attribute information of the component in the intermediate compilation file, the mapping relationship can be obtained in the table. Then, a target bytecode format matching the component can be determined based on the mapping relationship. Then, the component can be compiled according to the target byte code format to obtain a target byte code file.
According to the description, the mapping relation between different attribute information and the corresponding byte code formats can be established, so that the target byte code format corresponding to the attribute information of the components in the intermediate compilation file can be directly determined according to the mapping relation, the efficiency of determining the target byte code format is improved, and the efficiency of converting the intermediate compilation file into the target byte code file is improved.
In an optional embodiment, the method further comprises the process of:
and after the target byte code file is stored, responding to a calling request of a user terminal to a target function corresponding to the target byte code file, and sending the target byte code file to the user terminal.
In the embodiment of the present disclosure, after detecting a call request of a user for the target function, the Flutter application may send an acquisition request of a target bytecode file for the target function to the server. After receiving the obtaining request, the server may determine a function identifier of a target function carried by the obtaining request, and determine a storage location of a target bytecode file of the target function in the local file based on the function identifier, thereby obtaining the target bytecode file based on the storage location, and returning the found target bytecode file to the Flutter application in response to the calling request.
It should be understood that, in the embodiment of the present disclosure, after detecting a call request of a user for an arbitrary function in the Flutter application, the Flutter application may first determine whether the function is a target function, and in a case that the function is the target function, may want the server to send an acquisition request of a target bytecode file of the target function.
Specifically, the target function may include an update identifier, and after a call request for any function in the Flutter application is detected, it may be determined whether the function includes the update identifier, and in a case that the function includes the update identifier, the function may be determined as the target function.
In another optional implementation manner, after the target bytecode file is saved, the target bytecode file can be directly sent to the Flutter application. In specific implementation, the function type of the target function corresponding to the target bytecode file may be determined first, where the function type of the function to be repaired may be a first type, and the function type of the new function may be a second type.
Under the condition that the function type of the target function is determined to be the second type, the target byte code file can be directly sent to the Flutter application, so that a user can experience the target function corresponding to the target byte code file. In addition, when the function type of the target function is determined to be the first type, a sending instruction for the target bytecode file may be detected, and after the sending instruction is detected, the target bytecode file may also be directly sent to the Flutter application.
According to the description, the target byte code file can be sent to the Flutter application in response to the acquisition request for the target byte code file, and the target byte code file can also be directly sent to the Flutter application, so that the scheme can be suitable for different types of target functions, and the application range of the scheme is widened.
In an alternative embodiment, as shown in fig. 2, a Dart compiler compiles a to-be-processed Dart code file, and the method includes steps S201 to S204. Wherein:
s201: acquiring a Dart code file to be processed;
s202: performing syntactic analysis and lexical analysis on the processed Dart code file to obtain an intermediate compiled file;
in the embodiment of the present disclosure, the syntax analysis and the lexical analysis are performed on the processed Dart code file as described in the embodiment corresponding to the step S103, which is not described herein again.
S203: acquiring a preset byte code format, and compiling the intermediate compilation file according to the preset byte code format to obtain and store a target byte code file;
in the embodiment of the present disclosure, first, attribute information of each component in an intermediate compiled file may be obtained, and the intermediate compiled file is compiled according to a preset bytecode format indicated by the attribute information, so as to obtain a target bytecode file. The specific process of compiling the intermediate compilation file is described in the above embodiment corresponding to step S105, and is not described herein again.
S204: and performing intermediate optimization and instruction generation on the intermediate compiled file to obtain the AOT compiled file.
As can be seen from the above description, in the embodiment of the present disclosure, after the to-be-processed Dart code file of the Flutter application is obtained, the to-be-processed Dart code file may be compiled, an intermediate compiled file in the compiling process of the to-be-processed Dart code file is obtained, and then the intermediate compiled file may be compiled according to the preset byte code format, so as to obtain and store the target byte code file. Here, the target bytecode file can be sent to the Flutter application as the to-be-executed bytecode, so that a Dart virtual machine in the Flutter application runs the to-be-executed bytecode file through a Dart interpreter, thereby implementing a function corresponding to the to-be-executed bytecode file, further shortening an update flow of the Flutter application, and improving update efficiency.
In addition, referring to fig. 3, a flowchart of a code running method provided in an embodiment of the present disclosure is applied to a Flutter application, where the method includes steps S301 to S303, where:
s301: acquiring a bytecode file to be executed, which is sent by a server; the bytecode file to be executed is a bytecode file obtained by a Dart compiler in the server after compiling by the code compiling method corresponding to fig. 1.
In this disclosure, a to-be-executed bytecode file sent by a server may be first obtained, where the to-be-executed bytecode file is the target bytecode file. Here, the bytecode file to be executed may be a target bytecode file returned by the server based on a call request initiated by the Flutter application, or may be a target bytecode file directly transmitted by the server.
After the to-be-executed bytecode file is acquired, the to-be-executed bytecode file can be stored in a local storage space of the terminal device installed with the Flutter application.
S303: and calling a Dart virtual machine in the Flutter application, and operating the bytecode file to be executed through a Dart interpreter in the Dart virtual machine so as to realize the function corresponding to the bytecode file to be executed in the Flutter application.
In the embodiment of the present disclosure, after a call request for a target function is detected, a to-be-executed bytecode file corresponding to the target function may be loaded to a Dart virtual machine, so that a Dart interpreter in the Dart virtual machine runs the to-be-executed bytecode file, thereby implementing a function corresponding to the to-be-executed bytecode file.
According to the above description, after the to-be-executed bytecode file sent by the acquisition server is obtained, the to-be-executed bytecode file can be run through the Dart virtual machine, so that the function corresponding to the to-be-executed bytecode file is realized, the updating process of the Flutter application is further shortened, and the updating efficiency is improved.
In an optional embodiment, in step S301, running the to-be-executed bytecode file through a Dart interpreter in the Dart virtual machine specifically includes the following processes:
(1) analyzing the byte code file to be executed to obtain an analysis result;
(2) extracting target byte code information from the analysis result, and loading the target byte code information in the Dart virtual machine;
(3) and operating the target bytecode information through the Dart interpreter.
In the embodiment of the present disclosure, the bytecode file to be executed may be parsed first, an executable bytecode file in the bytecode file to be executed is determined, and the executable bytecode file is determined as a parsing result.
After the parsing result is determined, the executable bytecode file included in the parsing result may be extracted to obtain target bytecode information in the executable bytecode file, where the target bytecode information may be information indicated by fields such as library, function, and field in the executable bytecode file.
After the target bytecode information is determined, the target bytecode information can be loaded into a Dart virtual machine, so that a Dart interpreter in the Dart virtual machine runs the target bytecode information, and thus, the function corresponding to the bytecode file to be executed is realized.
As can be seen from the above description, by extracting the target bytecode information in the bytecode file to be executed, the target bytecode information can be loaded into the Dart virtual machine, so that the Dart interpreter in the Dart virtual machine runs the bytecode file to be executed, thereby implementing the function corresponding to the bytecode file to be executed.
In summary, in the embodiment of the present disclosure, after a to-be-processed Dart code file of a Flutter application is obtained, the to-be-processed Dart code file may be compiled, an intermediate compiled file in a compiling process of the to-be-processed Dart code file is obtained, and then the intermediate compiled file may be compiled according to a preset byte code format, so as to obtain and store a target byte code file, where the target byte code file may be sent to the Flutter application as a to-be-executed byte code, so that a Dart virtual machine in the Flutter application operates the to-be-executed byte code file through a Dart interpreter, thereby implementing a function corresponding to the to-be-executed byte code file, further shortening an update process of the Flutter application, and improving update efficiency.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a code compiling device corresponding to the code compiling method is also provided in the embodiments of the present disclosure, and as the principle of solving the problem of the device in the embodiments of the present disclosure is similar to the code running method in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 4, a schematic diagram of a code compiling apparatus provided in an embodiment of the present disclosure is shown, where the apparatus includes: a first acquiring unit 41, a compiling unit 42, a second acquiring unit 43; wherein the content of the first and second substances,
a first obtaining unit 41, configured to obtain a Dart code file to be processed of a Flutter application, where the Dart code file to be processed includes a Dart code of a new function in the Flutter application, or includes a Dart code of a function to be repaired in the Flutter application;
the compiling unit 42 is configured to compile the to-be-processed Dart code file, and acquire an intermediate compiled file in a compiling process of the to-be-processed Dart code file;
a second obtaining unit 43, configured to obtain a preset byte code format, and compile the intermediate compilation file according to the preset byte code format, to obtain and store a target byte code file.
In the embodiment of the disclosure, after a to-be-processed Dart code file of a Flutter application is obtained, the to-be-processed Dart code file may be compiled, an intermediate compiled file in the compiling process of the to-be-processed Dart code file is obtained, and then the intermediate compiled file may be compiled according to a preset byte code format, so as to obtain and store a target byte code file, where the target byte code file may be sent to the Flutter application as a to-be-executed byte code, so that a Dart virtual machine in the Flutter application operates the to-be-executed byte code file through a Dart interpreter, thereby implementing a function corresponding to the to-be-executed byte code file, further shortening an update flow of the Flutter application, and improving update efficiency.
In a possible implementation, the second obtaining unit 43 is further configured to:
acquiring attribute information of each component in the intermediate compilation file; wherein the attribute information is used for indicating the byte code format matched with the corresponding component;
and compiling the intermediate compilation file based on the attribute information and the preset byte code format to obtain the target byte code file.
In a possible implementation, the second obtaining unit 43 is further configured to:
determining a target bytecode format matching with a corresponding component in the bytecode formats based on the attribute information;
and compiling the components according to the target byte code format to obtain the target byte code file.
In a possible embodiment, the compiling unit 42 is further configured to:
and acquiring a dynamic link library file in the compiling process of the Dart code file to be processed, and determining the dynamic link library file as the intermediate compiled file.
In one possible embodiment, the apparatus is further configured to:
and after the target byte code file is stored, responding to a call request of a user terminal for a target function corresponding to the target byte code file, and sending the target byte code file to the user terminal.
Referring to fig. 5, a schematic diagram of a code running apparatus provided in an embodiment of the present disclosure is shown, where the apparatus includes: a third acquiring unit 51 and a calling unit 52; wherein the content of the first and second substances,
a third obtaining unit 51, configured to obtain a bytecode file to be executed and sent by the server; wherein, the bytecode file to be executed is a bytecode file obtained after a Dart compiler in the server compiles by the code compiling method of any one of the above claims 1 to 5;
the calling unit 52 is configured to call a Dart virtual machine in the Flutter application, and run the bytecode file to be executed through a Dart interpreter in the Dart virtual machine, so as to implement a function corresponding to the bytecode file to be executed in the Flutter application.
In the embodiment of the disclosure, after the to-be-executed bytecode file sent by the acquisition server is acquired, the to-be-executed bytecode file can be run through the Dart virtual machine, so that a function corresponding to the to-be-executed bytecode file is realized, an update process of the Flutter application is further shortened, and the update efficiency is improved.
In a possible implementation, the third obtaining unit 51 is further configured to:
analyzing the byte code file to be executed to obtain an analysis result;
extracting target byte code information from the analysis result, and loading the target byte code information in the Dart virtual machine;
and running the target bytecode information through the Dart interpreter.
The description of the processing flow of each unit in the device and the interaction flow between each unit may refer to the related description in the above method embodiments, and will not be described in detail here.
Corresponding to the code compiling method in fig. 1, an embodiment of the present disclosure further provides a computer device 600, as shown in fig. 6, a schematic structural diagram of the computer device 600 provided for an embodiment of the present disclosure includes:
a processor 61, a memory 62, and a bus 63; the memory 62 is used for storing execution instructions and includes a memory 621 and an external memory 622; the memory 621 is also referred to as an internal memory, and is used for temporarily storing the operation data in the processor 61 and the data exchanged with the external memory 622 such as a hard disk, the processor 61 exchanges data with the external memory 622 through the memory 621, and when the computer device 600 operates, the processor 61 communicates with the memory 62 through the bus 63, so that the processor 61 executes the following instructions:
acquiring a to-be-processed Dart code file of the Flutter application, wherein the to-be-processed Dart code file comprises a Dart code of a new function in the Flutter application, or comprises a Dart code of a to-be-repaired function in the Flutter application;
compiling the Dart code file to be processed, and acquiring an intermediate compiled file in the compiling process of the Dart code file to be processed;
and acquiring a preset byte code format, and compiling the intermediate compilation file according to the preset byte code format to obtain and store a target byte code file.
Corresponding to the code running method in fig. 3, an embodiment of the present disclosure further provides a computer device 700, as shown in fig. 7, a schematic structural diagram of the computer device 700 provided for an embodiment of the present disclosure includes:
a processor 71, a memory 72, and a bus 73; the memory 72 is used for storing execution instructions and includes a memory 721 and an external memory 722; the memory 721 is also referred to as an internal memory, and is used for temporarily storing the operation data in the processor 71 and the data exchanged with the external memory 722 such as a hard disk, the processor 71 exchanges data with the external memory 722 through the memory 721, and when the computer device 700 is operated, the processor 71 communicates with the memory 72 through the bus 73, so that the processor 71 executes the following instructions:
acquiring a bytecode file to be executed, which is sent by a server; wherein, the bytecode file to be executed is a bytecode file obtained after a Dart compiler in the server compiles by the code compiling method of any one of the above claims 1 to 5;
and calling a Dart virtual machine in the Flutter application, and operating the bytecode file to be executed through a Dart interpreter in the Dart virtual machine so as to realize the function corresponding to the bytecode file to be executed in the Flutter application.
The embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the code compiling and code running methods described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute steps of the code compiling and code running method in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, but not to limit the technical solutions, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.