WO2022166410A1 - 非同名符号的函数跳转方法、装置及计算机可读存储介质 - Google Patents

非同名符号的函数跳转方法、装置及计算机可读存储介质 Download PDF

Info

Publication number
WO2022166410A1
WO2022166410A1 PCT/CN2021/137695 CN2021137695W WO2022166410A1 WO 2022166410 A1 WO2022166410 A1 WO 2022166410A1 CN 2021137695 W CN2021137695 W CN 2021137695W WO 2022166410 A1 WO2022166410 A1 WO 2022166410A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
pairing
name
information
jumping
Prior art date
Application number
PCT/CN2021/137695
Other languages
English (en)
French (fr)
Inventor
肖剑
李华兵
刘金华
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022166410A1 publication Critical patent/WO2022166410A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/423Preprocessors

Definitions

  • the present application relates to the field of computers, and in particular, to a method, device and computer-readable storage medium for function jumping with non-identical symbols.
  • Code jumping is one of the most commonly used functions in the software development process. It refers to the process of jumping from one code fragment (such as a function, class, variable, method, etc.) to another code fragment.
  • the usage location of the function jumps directly to the definition location of the function, or you can find all the code fragments that use the function from the definition location of the function.
  • the function of code jumping can facilitate developers to better understand the code and speed up the development efficiency.
  • IDE Integrated Development Environment, Integrated Development Environment
  • IDE integrates the code writing function, analysis function, compilation function, debugging function and other integrated development software service suite.
  • IDE helps developers simplify the software development process by providing tools and various performances. Based on this, developers mostly use IDE to complete software development.
  • the jumping technology in the existing IDE cannot realize the jumping of symbols with different names.
  • the method of manual search can only be used, which hinders the development efficiency.
  • the embodiments of the present application show a method, an apparatus, and a computer-readable storage medium for function jumping with symbols with different names.
  • an embodiment of the present application provides a method for jumping functions of symbols with different names, including:
  • the function information includes the name of the opposite end function, and the name of the opposite end function is the function of the opposite end function that has a jump relationship with the pairing function name;
  • function information in response to the jump instruction of the pairing function, function information is automatically searched, and the function information includes the name of the opposite end function, and the name of the opposite end function is the name of the opposite end function that has a jump relationship with the pairing function. function name. Then, add a hyperlink to the pairing function with the peer function name as a parameter. The function jump can be triggered by clicking on the hyperlink, and the reference corresponding to the name of the peer function can be found out. In this implementation manner, automatic jumping can be realized even between functions with symbols with different names, which improves the efficiency of software development to a certain extent.
  • the step of searching for the function information of the pairing function includes:
  • the pairing label is parsed to obtain function information, where the pairing label includes a preset identifier, and the preset identifier is used to mark that the pairing function has a jumpable opposite end function.
  • a pairing label is added to the comment information of a function with a jump relationship, and the pairing label has a preset format so that the pairing label can be identified.
  • the annotation information includes paired tags
  • only the paired tags can be parsed, and the amount of data processing is small.
  • a prompt message will pop up, and the prompt message is used to remind the developer that the pairing function does not have a matching pair. end function.
  • a pairing label is added to the comment information of a function with a jump relationship, and the pairing label has a preset format so that the pairing label can be identified.
  • the comment information does not contain a pairing label, a prompt message will pop up, and the pop-up prompt message can serve as a prompt for the developer.
  • the pairing tag further includes a first identifier, and the first identifier is used to mark the opposite end function as a transmit-side function or a receive-side function.
  • adding a first identifier for marking the pairing function as the transmitting side or the receiving side in the pairing label can limit the scope of the opposite end function.
  • the pairing tag further includes a second identifier.
  • adding a second identifier to the pairing tag can further limit the scope of the peer function.
  • the method further includes:
  • the identification document includes function information and a device name
  • the candidate device is a device that implements mutual communication with the device paired with the function
  • Hyperlinks are added to the pairing function, each of the hyperlinks corresponding to an identified document.
  • one identification document is configured for each type/each candidate device, and then multiple hyperlinks are configured for the pairing function, and each of the hyperlinks corresponds to one identification document.
  • the developer selects the candidate device to be jumped to, by clicking the hyperlink corresponding to the candidate device, the reference corresponding to the name of the peer function can be searched in the candidate device. In the above process, it is no longer necessary to locate the candidate device to be jumped from the result of the global search.
  • the step of finding the reference corresponding to the peer function name is specifically:
  • a reference corresponding to the peer function name is searched in the code module corresponding to the target device name, where the target device name is the device name corresponding to the triggered hyperlink.
  • each candidate corresponds to a hyperlink.
  • the developer selects the candidate device to be jumped to, the developer can search for the corresponding device in the candidate device by clicking the hyperlink corresponding to the candidate device.
  • an embodiment of the present application provides a function jumping device for symbols with different names, including:
  • the information processing module is used for searching the function information of the pairing function in response to the jump instruction of the pairing function, the function information includes the name of the opposite end function, and the name of the opposite end function has a jump relationship with the pairing function
  • a link adding module configured to add a hyperlink to the pairing function, the hyperlink taking the name of the opposite end function as a parameter
  • a reference search module configured to search for a reference corresponding to the peer function name in response to triggering the hyperlink.
  • the information processing module in response to the jump instruction of the pairing function, automatically searches for function information, where the function information includes the name of the opposite end function, and the name of the opposite end function is the pair that has a jump relationship with the pairing function. The function name of the end function. Then, the link adding module adds a hyperlink to the pairing function by taking the peer function name as a parameter. When the card clicks on the hyperlink to trigger the jump of the function, the reference search module finds out the reference corresponding to the name of the opposite end function. In this implementation manner, automatic jumping can be realized even between functions with symbols with different names, which improves the efficiency of software development to a certain extent.
  • the information processing module includes:
  • a parsing submodule configured to parse the paired label if the annotation information includes a paired label to obtain function information.
  • a pairing label is pre-added to the annotation information of the function with a jump relationship, and the pairing label has a preset format, so that the pairing label can be identified.
  • the traversal submodule can directly identify the paired tags in the annotation information, and in the case that the annotation information includes the paired tags, the parsing submodule can only parse the paired tags, and the data processing amount is small.
  • the parsing submodule is also used to pop up prompt information if the annotation information does not contain a pairing tag, and the prompt information is used to remind the developer of the The pairing function described above has no matching counterpart function.
  • the parsing sub-module pops up prompt information, and the pop-up prompt information can serve as a prompt for the developer.
  • the pairing tag further includes a first identifier, and the first identifier is used to mark the opposite end function as a transmit-side function or a receive-side function.
  • adding a first identifier for marking the pairing function as the transmitting side or the receiving side in the pairing label can limit the scope of the opposite end function.
  • the pairing label further includes a second identifier.
  • adding a second identifier to the pairing tag can further limit the scope of the peer function.
  • the information processing module is further configured to: configure an identification document for the candidate device, the identification document includes function information and a device name, and the The candidate device is a device that implements mutual communication with the device of the pairing function;
  • Hyperlinks are added to the pairing function, each of the hyperlinks corresponding to an identified document.
  • the information processing module configures one identification document for each type/each candidate device, and then configures a plurality of hyperlinks for the pairing function, and each of the hyperlinks corresponds to an identification document.
  • the developer selects the candidate device to be jumped to, by clicking the hyperlink corresponding to the candidate device, the reference corresponding to the name of the peer function can be searched in the candidate device. In the above process, it is no longer necessary to locate the candidate device to be jumped from the result of the global search.
  • the reference search module is further configured to search for the reference corresponding to the peer function name in the code module corresponding to the target device name, so
  • the target device name is the device name corresponding to the triggered hyperlink including:
  • a selection submodule for selecting the target device, the target device being an alternative device corresponding to the name of the target device;
  • the search submodule is used to search for the reference corresponding to the name of the peer function in the code loaded by the target device.
  • each candidate corresponds to a hyperlink.
  • the developer selects the candidate device to be jumped to, the developer can search for the corresponding device in the candidate device by clicking the hyperlink corresponding to the candidate device.
  • an embodiment of the present application provides a computer system, where the computer system includes a processor and a memory, the memory is used for storing a computer program, and the processor is used for executing the computer program to achieve the implementation as provided by the embodiments of the present application the described method.
  • function information in response to the jump instruction of the pairing function, function information is automatically searched, and the function information includes the name of the opposite end function, and the name of the opposite end function is the name of the opposite end function that has a jump relationship with the pairing function. function name. Then, add a hyperlink to the pairing function with the peer function name as a parameter. The function jump can be triggered by clicking on the hyperlink, and the reference corresponding to the name of the peer function can be found out. In this implementation manner, automatic jumping can be realized even between functions with symbols with different names, which improves the efficiency of software development to a certain extent.
  • an embodiment of the present application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and the computer program is used by a processor to implement the method provided by the embodiment of the present application .
  • function information in response to the jump instruction of the pairing function, function information is automatically searched, and the function information includes the name of the opposite end function, and the name of the opposite end function is the name of the opposite end function that has a jump relationship with the pairing function. function name. Then, add a hyperlink to the pairing function with the peer function name as a parameter. The function jump can be triggered by clicking on the hyperlink, and the reference corresponding to the peer function name can be found out. In this implementation manner, automatic jumping can be realized even between functions with symbols with different names, which improves the efficiency of software development to a certain extent.
  • FIG. 1 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for jumping functions of symbols with different names provided according to a feasible embodiment
  • FIG. 3 is a flowchart of searching function information of pairing functions provided according to a feasible embodiment
  • FIG. 4 is a schematic diagram of a device display interface
  • FIG. 5 is a schematic structural diagram of a function jumping device for symbols with different names provided according to a feasible embodiment.
  • FIG. 1 is a schematic structural diagram of a device 100 .
  • the device 100 may include an application layer, an operating system 102, and a hardware layer 103.
  • the application layer includes one or more application programs 101
  • the operating system 102 includes a kernel 104
  • the hardware layer 103 includes a processor 106, a memory 105, and a communication interface 107.
  • the operating system 102 is system software for managing hardware and software resources.
  • the processor 106 is the control center of the device 100, connecting various components of the device 100 using various interfaces and buses.
  • the processor 106 may include one or more processing units, or physical cores, eg, the processor 106 in FIG. 1 includes core 0 and core 1 .
  • the processor 106 may also include registers that may be used to store addresses of functions of the core 104 .
  • the processor 106 may be a central processing unit (Central Processing Unit, CPU), and the processor 106 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) ), off-the-shelf programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor 106 may be any conventional processor or the like.
  • a computer program is stored in the memory 105 .
  • the processor 106 is configured to execute a computer program in the memory 105 so as to implement the functions defined by the computer program.
  • the memory 105 is a non-volatile storage medium, and generally includes internal memory and external memory. Memory includes, but is not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), or cache (cache). External memory includes but is not limited to flash memory, hard disk, optical disk, universal serial bus (universal serial bus, USB) disk, etc. Computer programs are usually stored in external memory, and the processor loads the program from the external memory into the internal memory before executing the computer program.
  • the memory 105 may be independent and connected to the processor 106 through a bus; the memory 105 and the processor 106 may also be integrated into a chip subsystem.
  • the communication interface 107 uses transceiver means such as a transceiver to enable communication between the execution device 100 and other devices or a communication network.
  • the device 100 may be a physical device, such as a server or a terminal device.
  • the end device may be a handheld device with wireless connectivity, or other processing device connected to a wireless modem.
  • it can be a mobile phone, a computer, a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), a wearable device and an e-book reader (e-bookreader), etc.; It can be a portable, pocket-sized, hand-held, computer built-in or vehicle mounted mobile device.
  • Code jumping is one of the most commonly used functions in the software development process. It refers to the process of jumping from one code fragment (such as a function, class, variable, method, etc.) to another code fragment. The usage location of the function jumps directly to the definition location of the function, or you can find all the code fragments that use the function from the definition location of the function. The function of code jumping can facilitate developers to better understand the code and speed up the development efficiency.
  • the code jump function In the process of writing code in the IDE, implementing the code jump function requires that the current location code and the jumped code have symbols with the same name (symbols can include functions/interfaces/classes). For example, the jumping of functions is jumping from the function declaration in the interface. Go to the jump to the interface implementing the function of the same name.
  • the jumping technology in the existing IDE cannot realize the jumping of non-identical symbol functions.
  • manual search can only be used, which hinders the development efficiency.
  • FIG. 2 is a flowchart of a method for jumping functions with symbols with different names according to a feasible embodiment. As can be seen from the figure, the methods include:
  • Step S201 searches for function information of the pairing function in response to the jump instruction of the pairing function, where the function information includes the name of the opposite end function, and the name of the opposite end function is the function name of the opposite end function that has a jump relationship with the pairing function.
  • the function involved in this embodiment refers to a program or code that can be directly referenced by another program or code.
  • a larger program should generally be divided into several modules, each of which is used to implement a specific function. All high-level languages have the concept of subroutines, and subroutines are used to implement the functions of modules.
  • the role of a subroutine is composed of a main function and several functions. Jump from the main function to other functions, and other functions can also jump to each other.
  • the solution provided by this embodiment marks in advance a plurality of functions that need to realize the function of jumping. function, so that functions with different symbols of the same name can jump to each other.
  • function pairs multiple functions that need to implement the jump function can be collectively referred to as function pairs.
  • function pairs the function corresponding to the position where the cursor stays can be referred to as a pairing function, and the function that has a jump relationship with the pairing function can be referred to as a pairing function.
  • peer function the pairing function and the peer function are equivalent concepts.
  • a function pair it includes two functions: a function named sendMsg and a function named subscribeMsg.
  • the function named sendMsg is predetermined as a pairing function
  • the function named subscribeMsg is the peer function
  • the function named subscribeMsg is predetermined as a pairing function
  • the function named sendMsg is the peer function.
  • This embodiment only exemplarily introduces a case where a function pair includes two functions. In the actual application process, the number of functions included in the function pair can be configured according to requirements, and the applicant does not make too many restrictions here. .
  • the specific labeling process may be: adding information such as labels or symbols that can generate function information to the annotation information of the function with a jump relationship, wherein the function information at least includes the name of the opposite end function that has a jump relationship with the function.
  • the function with the function name sendMsg and the function with the function name subscribeMsg are a function pair with a jump relationship
  • the function information of the function with the function name sendMsg at least includes subscribeMsg.
  • the function information of a function may include a peer function name; in some feasible embodiments In this exemplary embodiment, the function information of a function may contain multiple peer function names.
  • each function is configured with comment information corresponding to the function.
  • the comment information is helpful for the reading and understanding of the function.
  • the comment information can include descriptive files, such as: the content of the function, the function of the function, and the relationship between the function and other files. Relationships, modification dates of functions, etc.
  • the annotation information further includes information such as labels or symbols that can generate function information. .
  • the function information can be obtained by directly parsing the annotation information.
  • an AST abtract syntax code, abstract syntax tree
  • the parsing process can be as follows: (1) lexical analysis scanner, which decomposes the comment information composed of characters into meaningful code blocks, which are collectively referred to as lexical units. (2) Generate an AST tree. This process is to convert the lexical unit stream into a tree composed of element nesting that represents the program syntax structure. This tree is called an abstract syntax tree, and then the function information is searched in the AST tree.
  • the implementation manner of searching the function information in the AST tree may adopt the information searching method commonly used in the art, and the applicant does not limit it too much here.
  • an embodiment of the present application provides an implementation method for finding function information of a pairing function.
  • Flow chart of function information methods include:
  • a pairing tag that can parse out the function information can be added to the annotation information.
  • the pairing labels have a preset format so that the pairing function can be identified in the annotation information.
  • a preset identifier is added to the pairing tag.
  • the style of the preset logo is not limited.
  • the preset identifier can be @pair
  • the corresponding pairing tag can be: ⁇ @pair packageName.className#methodName ⁇ .
  • the comment information contains a pairing label, it means that the pairing function has a counterpart function with a jump relationship with it.
  • the pairing label can be parsed to obtain the function information. Hyperlinks are then configured for paired functions based on the function information.
  • the AST tool can be used to parse the paired tags, and the specific parsing process can refer to the parsing process of the annotation information above, which will not be repeated here.
  • the comment information does not contain a pairing function, it means that the pairing function does not have a peer function that has a jump relationship with it.
  • a prompt can be displayed on the UI (User Interface) interface of the device.
  • the prompt information is used to remind the developer that the pairing function does not have a matching counterpart function.
  • This embodiment does not limit the display manner of the prompt information, and any display manner that can have the effect of prompting the developer can be applied to the solutions shown in this application.
  • the prompt information may be displayed on the UI interface in the form of a prompt window.
  • This embodiment merely illustrates two implementations of searching for the function information of the pairing function.
  • the implementation of searching for the function information of the pairing function may be, but not limited to, the above two manners.
  • S202 adds a hyperlink to the pairing function, and the hyperlink takes the name of the opposite end function as a parameter;
  • the hyperlink refers to the connection relationship from the pairing function to the opposite end function.
  • the parameters of the hyperlink at least include the href attribute, wherein the Href attribute is used to indicate the opposite end function, and the name of the opposite end function is used as the href attribute in this application.
  • the parameters of the hyperlink can also include a title attribute, and the title attribute can set some introductory information for the hyperlink. When the mouse moves over the hyperlink with the title attribute set, the content of the title attribute value will be displayed ;
  • the parameters of the hyperlink may further include a target attribute for controlling the position where the link function is opened.
  • the parameters of the hyperlink may also include other attributes, which are not listed by the applicant here.
  • S203 in response to the triggering of the hyperlink, searches for a reference corresponding to the name of the peer function.
  • the above solution is applicable to a phone device, and the phone device may include: an information processing module, a link adding module, and a reference finding module.
  • the cursor stays at FeatureAbility.sendmsg on line 6 of phone/sender.js, and the developer triggers the jump instruction of the pairing function.
  • the message processing module determines that phone/sender.js is a FeatureAbility.sendMsg function.
  • the information processing module obtains the annotation information corresponding to the FeatureAbility.sendmsg function; it is determined that the annotation information obtained in the FeatureAbility.sendmsg contains the ⁇ @pair FeatureAbility#subscribeMsg ⁇ pairing label; the information processing module parses the pairing label and obtains the function information of the pairing function at the current position , the function information contains the peer function name FeatureAbility#subscribeMsg.
  • the link adding module adds a hyperlink to the pairing function, and the hyperlink takes the name of the counterpart function as a parameter, and the hyperlink can be displayed in the form of a floating layer window.
  • the reference search module stores in the memory all references of the computer program search function named FeatureAbility#subscribeMsg, and each reference has a corresponding file path and a corresponding line number and column number.
  • the reference found is line 6 in receiver.js.
  • function information is automatically invoked in response to the jump instruction of the pairing function, where the function information includes the name of the opposite end function, and the name of the opposite end function is the opposite end that has a jump relationship with the pairing function The function name of the function. Then, add a hyperlink to the pairing function with the peer function name as a parameter. The function jump can be triggered by clicking on the hyperlink, and the reference corresponding to the name of the peer function can be found out. In this implementation manner, automatic jumping can be realized even between functions with symbols with different names, which improves the efficiency of software development to a certain extent.
  • the pairing tag may further include a first identifier, and the first identifier is used to mark the pairing function as a transmitting-side function or a receiving-side function.
  • the first identifier is used to mark the peer function as the transmitting side or the receiving side, and may be send/receive, publish/subscribe, and so on.
  • adding a first identifier for marking the pairing function as the transmitting side or the receiving side in the pairing label can further limit the scope of the opposite end function.
  • the pairing tag of the pairing function is ⁇ @pair FeatureAbility.sendMsg ⁇ .
  • the reference search module searches out all the references corresponding to the function names sendMsg on the send side and the receive side.
  • the function information of the pairing function is ⁇ @pair FeatureAbility.sendMsg send ⁇ , and in response to triggering the hyperlink, the reference search module searches out all the references corresponding to the function name sendMsg on the send side. It can be seen that adding the first identifier for marking the pairing function as the transmitting side or the receiving side in the pairing label can limit the scope of the opposite end function.
  • scopeName.className can be used to limit the scope of functions.
  • scopeName has different meanings.
  • scopeName represents the package name
  • scopeName is the command space name
  • className is the class name
  • methodName is the function name.
  • the pairing tag further includes a second identifier, and the second identifier is used to indicate that cross-device search is supported during the reference search process. If the pairing function supports cross-device jumping, the pairing tag further includes the second identifier.
  • the second identifier is used to indicate that cross-device search is supported in the search process of the reference.
  • the style of the second logo is not limited in this embodiment.
  • the second identifier may be cross.
  • the pairing label of the pairing function can be ⁇ @pair FeatureAbility.sendMsg send ⁇ ; if the current pairing function supports cross-device search, the pairing label of the pairing function can be ⁇ @pair FeatureAbility.sendMsg send, cross ⁇ .
  • adding a second identifier to the pairing tag can further limit the scope of the peer function.
  • the pairing tag of the pairing function is ⁇ @pair FeatureAbility.sendMsg ⁇ .
  • the reference search module searches all the references corresponding to the locally stored function name sendMsg.
  • the function information of the pairing function is ⁇ @pair FeatureAbility.sendMsg cross ⁇ , and in response to triggering the hyperlink, all references corresponding to the global function name sendMsg of the reference lookup module are found, wherein the global includes: The functions stored by the device currently operated by the developer and the functions stored by the device that can communicate with the device currently operated by the developer. It can be seen that adding a second identifier to the pairing tag can further limit the scope of the opposite end function.
  • the method further includes: configuring an identification file for the candidate device, the identification file includes the function information and the device name, and the standby device
  • the selected device is a device that communicates with the device of the pairing function; hyperlinks are added to the pairing function, and each hyperlink corresponds to an identification document.
  • an identification document is configured for the candidate device, and the identification document includes function information and device name.
  • the identification document may be [tv](command: goToPeer(tv, receive, FeatureAbility#subscribeMsg, cross)), where tv is the device name, (receive, FeatureAbility#subscribeMsg, cross) for function information.
  • one identification document may be configured for each candidate device.
  • the alternative devices that the currently operating device can connect to are tv1, tv2 and watch.
  • Three identification documents can be configured for three candidate devices, respectively: [tv1](command:goToPeer(tv1, receive, FeatureAbility#subscribeMsg, cross)); [tv2](command: goToPeer(tv2, receive, FeatureAbility# subscribeMsg, cross)); [watch](command: goToPeer(watch, receive, FeatureAbility#subscribeMsg, cross)).
  • one identification document may be configured for each type of candidate device.
  • the candidate devices that the currently operating device can connect to are tv1, tv2 and watch.
  • Two identification documents can be configured for two types of candidate devices, namely: [tv](command: goToPeer(tv, receive, FeatureAbility#subscribeMsg, cross)); [watch](command: goToPeer(watch, receive, FeatureAbility# subscribeMsg, cross)).
  • the step of finding the reference corresponding to the name of the peer function is specifically:
  • a reference corresponding to the peer function name is searched in the code module corresponding to the target device name, where the target device name is the device name corresponding to the triggered hyperlink.
  • the code module is used for the code loaded in the device used by the recorder.
  • each candidate corresponds to a hyperlink.
  • the developer clicks the hyperlink corresponding to the candidate device, so that the reference search module can be found in the candidate device. Find the reference corresponding to the name of the peer function. In the above process, it is no longer necessary to locate the candidate device to be jumped from the result of the global search.
  • the above solution is applicable to a phone device, and the phone device may include: an information processing module, a link adding module, and a reference search module.
  • the phone device may include: an information processing module, a link adding module, and a reference search module.
  • the information processing module obtains the annotation information corresponding to the FeatureAbility.sendmsg function; make sure that the obtained FeatureAbility.sendmsg annotation information has a pairing tag of ⁇ @pair FeatureAbility#subscribeMsg receive cross-device ⁇ .
  • the information processing module parses the pairing tag and obtains the function information of the pairing function corresponding to the current position: (1)
  • the pairing function name is: FeatureAbility#subscribeMsg, (2)
  • the receive identification pairing function is located as a parameter, and the identification document is: [tv] (command:goToPeer(tv,receive,FeatureAbility#subscribeMsg,cross)),[watch](command:goToPeer(watch,receive,FeatureAbility#subscribeMsg,cross)); the link add module adds a custom command for each device A hyperlink that takes the identifying document as a parameter.
  • the hyperlink can be displayed on the UI interface, and the display effect can be seen in Figure 4:
  • the reference lookup module can be obtained
  • the function to be jumped to is FeatureAbility#subscribeMsg, and the function stored in the device memory whose device type is tv.
  • the reference search module searches for all references of FeatureAbility#subscribeMsg in the memory of the device corresponding to the tv device type. Each reference has a corresponding file path and corresponding line number and column number. In this embodiment, it will be obtained in tv/receiver.js Line 6.
  • the display interface of the UI interface switches to line 6 in the receiver.js function, thus completing the jump from FeatureAbility.sendMsg in line 6 of sender.js of phone to line 6 of receiver.js of tv.
  • FIG. 5 is a schematic diagram of a function jumping device for symbols with different names according to a feasible embodiment, including:
  • a code editor 401 configured to receive a jump instruction of the pairing function
  • the information processing module 402 is configured to, in response to the jump instruction of the pairing function, look up the function information of the pairing function, where the function information includes the name of the opposite end function, and the name of the opposite end function is to have a jump with the pairing function The function name of the opposite function of the relationship;
  • a link adding module 403 configured to add a hyperlink to the pairing function, the hyperlink taking the name of the opposite end function as a parameter;
  • the command processing module 404 is configured to call the reference search module in response to the triggering of the hyperlink;
  • the reference search module 405 is configured to search for the reference corresponding to the peer function name in response to triggering the hyperlink.
  • the information processing module in response to the jump instruction of the pairing function, automatically searches for function information, where the function information includes a peer function name, and the peer function name is a pair that has a jump relationship with the pairing function. The function name of the end function. Then, the link adding module adds a hyperlink to the pairing function by taking the peer function name as a parameter. When the card clicks on the hyperlink to trigger the jump of the function, the reference search module finds out the reference corresponding to the name of the opposite end function. In this implementation manner, automatic jumping can be realized even between functions with symbols with different names, which improves the efficiency of software development to a certain extent.
  • the information processing module includes:
  • a parsing submodule configured to parse the paired label if the annotation information includes a paired label to obtain function information.
  • a pairing label is pre-added to the annotation information of the function with a jump relationship, and the pairing label has a preset format so that the pairing label can be identified.
  • the traversal submodule can directly identify the paired tags in the annotation information, and in the case that the annotation information includes the paired tags, the parsing submodule can only parse the paired tags, and the data processing amount is small.
  • the parsing submodule is further configured to pop up prompt information if the annotation information does not contain a pairing tag, the prompt information is used to remind the developer that the pairing function does not have a matching peer function .
  • the parsing sub-module pops up prompt information, and the pop-up prompt information can serve as a prompt for the developer.
  • the pairing tag further includes a first identifier, and the first identifier is used to mark the opposite end function as a transmit-side function or a receive-side function.
  • adding a first identifier for marking the pairing function as the transmitting side or the receiving side in the pairing label can limit the scope of the opposite end function.
  • the pairing tag further includes a second identifier.
  • adding a second identifier to the pairing tag can further limit the scope of the peer function.
  • the information processing module is further configured to: configure an identification document for the candidate device, where the identification document includes function information and a device name, and the candidate device is implemented by a device with a pairing function devices that communicate with each other;
  • Hyperlinks are added to the pairing function, each of the hyperlinks corresponding to an identified document.
  • the information processing module configures one identification document for each type/each candidate device, and then configures a plurality of hyperlinks for the pairing function, each of which corresponds to an identification document.
  • the developer selects an alternative device to be jumped to, by clicking the hyperlink corresponding to the alternative device, the reference corresponding to the name of the peer function can be searched in the alternative device. In the above process, it is no longer necessary to locate the candidate device to be jumped from the result of the global search.
  • the reference search module is further configured to search for the reference corresponding to the peer function name in the code module corresponding to the target device name, where the target device name is the triggered hyperfunction The device name corresponding to the link.
  • each candidate corresponds to a hyperlink.
  • the developer selects the candidate device to be jumped to, the developer can click the hyperlink corresponding to the candidate device to search for the corresponding device in the candidate device.
  • the reference corresponding to the terminal function name in the above process, it is not necessary to locate the candidate device to be jumped from the result of the global search.
  • An embodiment of the present application provides a computer system, where the computer system includes a processor and a memory, where the memory is used to store a computer program, and the processor is used to execute the computer program to implement the methods provided by the embodiments of the present application. method.
  • Embodiments of the present application further provide a computer storage medium, where the computer storage medium includes computer instructions, when the computer instructions run on the electronic device, the electronic device causes the electronic device to perform various functions or steps performed by the electronic device in the above method embodiments.
  • Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, enables the computer to perform each function or step performed by the electronic device in the above method embodiments.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art, or all or part of the technical solutions, which are stored in a storage medium. , including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Abstract

本申请实施例提供一种非同名符号的函数跳转方法、装置及计算机可读存储介质,所述方法响应于配对函数的跳转指令,自动查找函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有调用关系的对端函数的函数名称。而后,以所述对端函数名称作为参数为所述配对函数添加超链接。可以通过点击超链触发函数的跳转,查找出所述对端函数名称对应的引用。本申请实施例提供的方案,即使是在非同名符号的函数之间也可以实现自动跳转,在一定程度上提升了软件开发的效率。

Description

非同名符号的函数跳转方法、装置及计算机可读存储介质
本申请要求于2021年2月2日提交到国家知识产权局、申请号为202110143762.7、发明名称为“非同名符号的函数跳转方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,尤其涉及一种非同名符号的函数跳转方法、装置及计算机可读存储介质。
背景技术
代码跳转是软件开发过程中最常使用的功能之一,是指从一个代码片段(如函数、类、变量、方法等)跳转到另一个代码片段的过程,以函数为例,可以从函数的使用位置直接跳转到函数的定义位置,也可以从函数的定义位置查找所有使用该函数的代码片段。代码跳转的功能可以方便开发者更好的理解代码,加快开发效率。
IDE(Integrated Development Environment,集成开发环境),它集成了代码编写功能、分析功能、编译功能、调试功能等一体化的开发软件服务套。IDE通过提供工具和各种性能来帮助开发者简化软件开发过程,基于此,开发者多采用IDE完成软件的开发。
在使用IDE中编写代码过程中,实现代码跳转功能需要当前位置代码和被跳转代码拥有同名符号(所述符号可以包括函数/接口/类),例如,函数的跳转是从接口中函数声明跳转到接口实现类同名函数的跳转。
现有的IDE中的跳转技术无法实现非同名符号的跳转,当需要在互相关联的不同名函数间跳转时,只能采用手工查找的方式,阻碍开发效率。
发明内容
为了解决现有技术存在的问题,本申请实施例示出非同名符号的函数跳转方法、装置及计算机可读存储介质。
第一方面,本申请实施例提供一种非同名符号的函数跳转方法,包括:
响应于配对函数的跳转指令,查找所述配对函数的函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称;
为所述配对函数添加超链接,所述超链接以所述对端函数名称作为参数;
响应于对所述超链接的触发,查找所述对端函数名称对应的引用。
本实现方式中,响应于配对函数的跳转指令,自动查找函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称。而后,以所述对端函数名称作为参数为所述配对函数添加超链接。可以通过点击超链触发函数的跳转,查找出所述对端函数名称对应的引用。本实现方式,即使是在非同名符号的函数之间也可以实现自动跳转,在一定程度上提升了软件开发的效率。
结合第一方面,在第一方面第一种可能的实现方式中,所述查找所述配对函数的函数信息的步骤包括:
遍历所述配对函数的注释信息;
如果所述注释信息包含配对标签,则解析所述配对标签,得到函数信息,所述配对标签包括预置标识,所述预置标识用于标注所述配对函数存在可跳转的对端函数。
本实现方式中,为具有跳转关系的函数的注释信息中添加配对标签,所述配对标签具有预置格式,以使得配对标签可以被识别。基于此本方式中,在注释信息包含配对标签的情况下,可以仅对配对标签进行解析,数据处理量较少。
结合第一方面,在第一方面第二种可能的实现方式中,如果所述注释信息不包含配对标签,则弹出提示信息,所述提示信息用于提醒开发者所述配对函数没有匹配的对端函数。
本实现方式中,为具有跳转关系的函数的注释信息中添加配对标签,所述配对标签具有预置格式,以使得配对标签可以被识别。基于此本方式中,在注释信息不包含配对标签的情况下,弹出提示信息,弹出的提示信息可以对开发者起到提示的作用。
结合第一方面,在第一方面第三种可能的实现方式中,所述配对标签还包括第一标识,所述第一标识用于标注所述对端函数为发射侧函数或接收侧函数。
本实现方式中,在配对标签中添加用于标注配对函数为发射侧或接收侧的第一标识,可以限定对端函数的范围。
结合第一方面,在第一方面第四种可能的实现方式中,如果所述配对函数支持跨设备调用,所述配对标签还包括第二标识。
本实现方式中,在配对标签中添加第二标识,可以进一步限定对端函数的范围。
结合第一方面,在第一方面第五种可能的实现方式中,在查找所述配对函数的函数信息的步骤之后,所述方法还包括:
为备选设备配置一个标识文档,所述标识文档包括函数信息和设备名称,所述备选设备为与配对函数的设备实现相互通信的设备;
为所述配对函数添加超链接,每个所述超链接对应一个标识文档。
本实现方式中,为每类/每个备选设备配置一个标识文档,而后为配对函数配置多个超链接,每个所述超链接对应一个标识文档。当开发者选择要跳转的备选设备时,通过点击该备选设备对应的超链接,便可以在该备选设备内查找对端函数名称对应的引用。在上述过程中,不需要再从全局搜索的结果定位出要跳转的备选设备。
结合第一方面,在第一方面第六种可能的实现方式中,响应于对所述超链接的触发,查找所述对端函数名称对应的引用的步骤具体为:
响应于对所述超链接的触发,在目标设备名称对应的代码模块中查找所述对端函数名称对应的引用,所述目标设备名称为被触发的超链接对应的设备名称。
本实现方式中,每个备选对应一个超链接,当开发者选择要跳转的备选设备时,开发者通过点击该备选设备对应的超链接,便可以在该备选设备内查找对端函数名称对应的引用,在上述过程中,不需要再从全局搜索的结果定位出要跳转的备选设备。
第二方面,本申请实施例提供一种非同名符号的函数跳转装置,包括:
信息处理模块,用于响应于配对函数的跳转指令,查找所述配对函数的函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称;
链接添加模块,用于为所述配对函数添加超链接,所述超链接以所述对端函数名称作为参数;
引用查找模块,用于响应于对所述超链接的触发,查找所述对端函数名称对应的引用。
本实现方式中,响应于配对函数的跳转指令,信息处理模块自动查找函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称。而后,链接添加模块以所述对端函数名称作为参数为所述配对函数添加超链接。卡发着点击超链触发函数的跳转时,引用查找模块查找出所述对端函数名称对应的引用。本实现方式,即使是在非同名符号的函数之间也可以实现自动跳转,在一定程度上提升了软件开发的效率。
结合第一方面,在第二方面第一种可能的实现方式中,所述信息处理模块包括:
遍历子模块,用于遍历所述配对函数的注释信息;
解析子模块,用于如果所述注释信息包含配对标签,则解析所述配对标签,得到函数信息。
本实现方式中,预先为具有跳转关系的函数的注释信息中添加配对标签,所述配对标签具有预置格式,以使得配对标签可以被识别。基于此本方式中,遍历子模块可以直接在注释信息中识别配对标签,在注释信息包含配对标签的情况下,解析子模块可以仅对配对标签进行解析,数据处理量较少。
结合第一方面,在第二方面第二种可能的实现方式中,解析子模块,还用于如果所述注释信息不包含配对标签,则弹出提示信息,所述提示信息用于提醒开发者所述配对函数没有匹配的对端函数。
本实现方式中,在注释信息不包含配对标签的情况下,解析子模块弹出提示信息,弹出的提示信息可以对开发者起到提示的作用。
结合第一方面,在第二方面第三种可能的实现方式中,所述配对标签还包括第一标识,所述第一标识用于标注所述对端函数为发射侧函数或接收侧函数。
本实现方式中,在配对标签中添加用于标注配对函数为发射侧或接收侧的第一标识,可以限定对端函数的范围。
结合第一方面,在第二方面第四种可能的实现方式中,如果所述配对函数支持跨设备跳转,所述配对标签还包括第二标识。
本实现方式中,在配对标签中添加第二标识,可以进一步限定对端函数的范围。
结合第一方面,在第二方面第五种可能的实现方式中,所述信息处理模块,还用于:为备选设备配置一个标识文档,所述标识文档包括函数信息和设备名称,所述备选设备为与配对函数的设备实现相互通信的设备;
为所述配对函数添加超链接,每个所述超链接对应一个标识文档。
本实现方式中,信息处理模块为每类/每个备选设备配置一个标识文档,而后为配对函数配置多个超链接,每个所述超链接对应一个标识文档。当开发者选择要跳转的备选设备时,通过点击该备选设备对应的超链接,便可以在该备选设备内查找对端函数名称对应的引用。在上述过程中,不需要再从全局搜索的结果定位出要跳转的备选设备。
结合第一方面,在第二方面第六种可能的实现方式中,所述引用查找模块,还用于在所述目标设备名称对应的代码模块中查找所述对端函数名称对应的引用,所述目标设备名称为被触发的超链接对应的设备名称包括:
调用子模块,用于响应于对所述超链接的触发,调用目标设备名称,所述目标设备名称为被触发的超链接对应的设备名称;
选取子模块,用于选取所述目标设备,所述目标设备为目标设备名称对应的备选设备;
查找子模块,用于在所述目标设备加载的代码中,查找所述对端函数名称对应的引用。
本实现方式中,每个备选对应一个超链接,当开发者选择要跳转的备选设备时,开发者通过点击该备选设备对应的超链接,便可以在该备选设备内查找对端函数名称对应的引用,在上述过程中,不需要再从全局搜索的结果定位出要跳转的备选设备。
第三方面,本申请实施例提供一种计算机系统,所述计算机系统包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于执行所述计算机程序实现如本申请实施例提供的所述的方法。
本实现方式中,响应于配对函数的跳转指令,自动查找函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称。而后,以所述对端函数名称作为参数为所述配对函数添加超链接。可以通过点击超链触发函数的跳转,查找出所述对端函数名称对应的引用。本实现方式,即使是在非同名符号的函数之间也可以实现自动跳转,在一定程度上提升了软件开发的效率。
第四方面,本申请实施例提供一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储计算机程序,所述计算机程序被处理器用于实现如本申请实施例提供的方法。
本实现方式中,响应于配对函数的跳转指令,自动查找函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称。而后,以所述对端函数名称作为参数为所述配对函数添加超链接。可以通过点击超链触发函数的跳转,查找出所述对端函数名称对应的引用。本实现方式,即使是在非同名符号的函数之间也可以实现自动跳转,在一定程度上提升了软件开发的效率。
附图说明
图1为本申请实施例提供的设备的结构示意图;
图2为根据一可行性实施例提供的非同名符号的函数跳转方法的流程图;
图3为根据一可行性实施例提供的查找配对函数的函数信息的流程图;
图4为设备显示界面的示意图;
图5为根据一可行性实施例提供的非同名符号的函数跳转装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行详细描述,显然,所描述的实施例是本申请的一部分实施例,而不是全部实施例。
本申请实施例中所涉及的多个,是指两个或两个以上。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
图1为设备100的结构示意图。设备100可包括应用层、操作系统102和硬件层103,应用层包括一个或多个应用程序101,操作系统102包括内核104,硬件层103包括处理器106、存储器105和通信接口107,操作系统102是用于管理硬件与软件资源的系统软件。
处理器106是设备100的控制中心,利用各种接口和总线连接设备100的各个部件。在一些实施例中,处理器106可包括一个或多个处理单元,或称为物理核,例如图1中处理器106包括核0和核1。处理器106还可以包括寄存器,寄存器可用于存储内核104的函数的地址。处理器106可以是中央处理单元(Central Processing Unit,CPU),该处理器106还可以是 其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器106也可以是任何常规的处理器等。
存储器105中存储有计算机程序。处理器106被配置用于执行存储器105中的计算机程序,从而实现该计算机程序定义的功能。存储器105为非易失性存储介质,一般包括内存和外存。内存包括但不限于随机存取存储器(Random Access Memory,RAM),只读存储器(Read-Only Memory,ROM),或高速缓存(cache)等。外存包括但不限于闪存(flashmemory)、硬盘、光盘、通用串行总线(universal serial bus,USB)盘等。计算机程序通常被存储在外存上,处理器在执行计算机程序前会将该程序从外存加载到内存。存储器105可以是独立的,通过总线与处理器106相连接;存储器105也可以和处理器106集成到一个芯片子系统。
通信接口107使用例如收发器一类的收发装置,来实现执行设备100与其他设备或通信网络之间的通信。
在一种实现方式中,设备100可以为物理设备,例如服务器或终端设备。终端设备可以是具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。例如,可以为移动电话、计算机、平板电脑、个人数码助理(personal digital assistant,PDA)、移动互联网设备(mobile Internet device,MID)、可穿戴设备和电子书阅读器(e-bookreader)等;也可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动设备。
软件开发是根据用户要求建造出软件系统或者系统中的软件部分的过程。软件开发是一项包括需求捕捉、需求分析、设计、实现和测试的系统工程。代码跳转是软件开发过程中最常使用的功能之一,是指从一个代码片段(如函数、类、变量、方法等)跳转到另一个代码片段的过程,以函数为例,可以从函数的使用位置直接跳转到函数的定义位置,也可以从函数的定义位置查找所有使用该函数的代码片段。代码跳转的功能可以方便开发者更好的理解代码,加快开发效率。
在使用IDE中编写代码过程中,实现代码跳转功能需要当前位置代码和被跳转代码拥有同名符号(符号可以包括函数/接口/类),例如,函数的跳转是从接口中函数声明跳转到接口实现类同名函数的跳转。
现有的IDE中的跳转技术无法实现非同名符号函数的跳转,当需要在互相关联的不同名函数间跳转时,只能采用手工查找的方式,阻碍开发效率。
基于上述技术问题,本申请实施例提供一种非同名符号的函数跳转方法,具体的,可以参阅图2;图2为根据一可行性实施例提供的非同名符号的函数跳转方法的流程图,从图中可以看出方法包括:
步骤S201响应于配对函数的跳转指令,查找配对函数的函数信息,函数信息包括对端函数名称,对端函数名称为与配对函数具有跳转关系的对端函数的函数名称。
本实施例中涉及的函数是指一段可以直接被另一段程序或代码引用的程序或代码。一个较大的程序一般应分为若干个模块,每一个模块用来实现一个特定的功能。所有的高级语言中都有子程序这个概念,用子程序实现模块的功能。在C语言中,子程序的作用是由一个主函数和若干个函数构成。由主函数跳转至其他函数,其他函数也可以互相跳转。
实现函数跳转功能需要当前位置函数和被跳转函数拥有同名符号。举例说明,函数名为sendMsg的函数和函数名为sendMsg的函数属于同名函数,因此,函数名为sendMsg的函数 与函数名为sendMsg的函数可以相互跳转。
为了实现非同名符号的函数之间的跳转,本实施例提供的方案预先将具有需要实现跳转功能的多个函数进行标注,被标注的函数可以是同名符号函数,也可以为非同名符号函数,以得非同名符号的函数之间可以相互的跳转。
本申请中需要实现跳转功能的多个函数,可以统称为函数对,在函数对中,光标停留位置对应的函数可以称之为配对函数,与配对函数具有跳转关系的函数可以称之为对端函数。值得注意的是,本实施例提供的方案中,配对函数和对端函数是一个相当于的概念。举例说明,对于一个函数对而言包括两个函数分别为函数名为sendMsg的函数和函数名为subscribeMsg的函数,如果预先确定函数名为sendMsg的函数为配对函数,那么函数名为subscribeMsg的函数即为对端函数;如果预先确定函数名为subscribeMsg的函数为配对函数,那么函数名为sendMsg的函数即为对端函数。本实施例仅是示例性的介绍了一种函数对中包含两个函数的情况,在实际应的过程中可以根据需求配置函数对中包含函数的数量,在此申请人不做过多的限定。
具体的标注过程可以为;分别为具有跳转关系的函数的注释信息中添加可以生成函数信息的标签或符号等信息,其中,函数信息至少包括与该函数具有跳转关系的对端函数名称。举例说明,函数名为sendMsg的函数和函数名为subscribeMsg的函数为具有跳转关系的函数对,函数名为sendMsg的函数的函数信息至少包括subscribeMsg。
值得注意的是,本实施例中并不对函数信息中包含对端函数名称的个数作以限定,在一些可行性实施例中一个函数的函数信息中可以包含一个对端函数名称;在一些可行性实施例中一个函数的函数信息中可以包含多个对端函数名称。
查找配对函数的函数信息的实现方式有多种;
例如,可以直接在配对函数的注释信息中查找函数信息,然后查找到的函数信息。
具体的,每个函数均配置有该函数对应的注释信息,注释信息有助于对函数的阅读理解,注释信息可以包括说明性文件,如:函数的内容、函数的功能、函数与其它文件的关系、函数的修改日期等。本实施例示出的方案中,注释信息中还包括可以生成函数信息的标签或符号等信息。。
在一可行性实施例中,可以直接解析注释信息得到函数信息。
具体的实现过程为:初始时注释信息以源代码的形式存在,需要将注释信息解析成计算机可读形式的代码。在一可行性实施例中,可以采用AST(abstract syntax code,抽象语法树)工具将注释信息解析成计算机可读形式的代码。解析过程可以为:(1)词法分析scanner,这个过程会将由字符组成的注释信息分解成有意义的代码块,这些代码块统称为词法单元。(2)生成AST树,这个过程是将词法单元流转换成一个由元素嵌套所组成的代表了程序语法结构的树,这个树被称为抽象语法树,后续在AST树中查找函数信息。在AST树中查找函数信息的实现方式,可以采用本领域惯用的信息查找方式,在此申请人不做过多的限定。
再例如,为了降低设备的数据处理量,本申请实施例提供一种查找配对函数的函数信息的实现方式,具体的可以参阅图3,图3为根据一可行性实施例提供的查找配对函数的函数信息的流程图,方法包括:
S301遍历配对函数的注释信息;
S302判断注释信息是否含有配对标签;
设备中存储有成千上万的函数,并不是每个函数都存在可跳转的非同名符号函数,通常 需要对注释信息进行解析后才可以获知当前操作的配对函数的注释信息中是否含有函数信息,在注释信息的解析过程中会占用设备的计算量。
本实施例中,可以注释信息中添加可以解析出函数信息的配对标签。配对标签具有预置格式,以使得在注释信息中可以识别出配对函数。
配对标签格式有多种,凡是可以起到在注释信息中可以识别出配对函数的格式均可应用到本实施例示出的方案中。在一可行性实施例中,在配对标签中添加预置标识。本实施例中并不对预置标识的样式作限定。例如,预置标识可以为@pair,相应的配对标签可以为:{@pair packageName.className#methodName}。
S303如果注释信息包含配对函数,则解析配对标签,得到函数信息。
如果注释信息包含配对标签,说明配对函数存在与之具有跳转关系的对端函数,在此情况下,可以解析配对标签,得到函数信息。而后基于函数信息为配对函数配置超链接。
本实现方式中,可以采用AST工具解析配对标签,具体的解析过程可以参阅上述注释信息的解析过程,在此便不赘述。
S304如果注释信息不包含配对函数,则弹出提示信息,提示信息用于提醒开发者配对函数没有匹配的对端函数。
如果注释信息不包含配对函数,说明配对函数不存在与之具有跳转关系的对端函数,在此情况下为了起到提示作用,可以在设备的UI(User Interface,用户界面)界面上弹出提示信息,提示信息用于提醒开发者配对函数没有匹配的对端函数。本实施例并不对提示信息展示方式作以限定,凡是可以起到提示开发者效果的展示方式均可应用于本申请示出的方案。例如,在一可行性实施例中提示信息可以以提示窗口的形式展示在UI界面上。
本实施例仅是实例性的示出两种查找配对函数的函数信息的实现方式,在实际应用的过程中,查找配对函数的函数信息的实现方式可以是但不限于上述两种方式。
S202为配对函数添加超链接,超链接以对端函数名称作为参数;
本实施例中,超链接是指从配对函数指向对端函数的连接关系。超链接的参数至少包括href属性,其中,Href属性用于指示对端函数,本申请中以对端函数名称作为href属性。在一些可行性实施例中,超链接的参数还可包括title属性,title属性可以为超链接设置一些介绍信息,当鼠标移到设置了title属性的超链接上时,会显示title属性值的内容;在一些可行性实施例中,超链接的参数还可包括target属性用于控制链接函数打开的位置。在一些可行性实施例中超链接的参数还可以包括其他属性,在此申请人不一一列举。
S203响应于对超链接的触发,查找对端函数名称对应的引用。
下面结合具体的实例对本实施例示出的方案做进一步的说明:
在一可行性实施例中上述方案适用于phone设备,phone设备可以包括:信息处理模块、链接添加模块和引用查找模块。在软件开发时,光标停留在phone/sender.js的第6行FeatureAbility.sendmsg位置,开发者触发配对函数的跳转指令。信息处理模块确定phone/sender.js是一个FeatureAbility.sendMsg函数。信息处理模块获取FeatureAbility.sendmsg函数对应注释信息;确定获取到FeatureAbility.sendmsg注释信息中带有{@pair FeatureAbility#subscribeMsg}配对标签;信息处理模块解析此配对标签,得到当前位置的配对函数的函数信息,函数信息中包含对端函数名称为FeatureAbility#subscribeMsg。链接添加模块为配对函数添加超链接,超链接以对端函数名称作为参数,其中,超链接可以浮层窗口的形式进行展示。响应于开发者对超链接的触发,引用查找模块在存储器中存储有计算机程序 查找函数名为FeatureAbility#subscribeMsg的所有引用,每个引用都有对应文件路径和对应行号列号,本实施例中查找到的引用为receiver.js中第6行。
本实施例提供的方案,响应于配对函数的跳转指令,自动调用函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称。而后,以所述对端函数名称作为参数为所述配对函数添加超链接。可以通过点击超链触发函数的跳转,查找出所述对端函数名称对应的引用。本实现方式,即使是在非同名符号的函数之间也可以实现自动跳转,在一定程度上提升了软件开发的效率。
作为一可行性实施例,配对标签还可以包括第一标识,第一标识用于标注配对函数为发射侧函数或接收侧函数。
本实施例中,第一标识用于标注对端函数为发射侧或接收侧,可以为send/receive,publish/subscribe等。本实施例示出的技术方案在配对标签中添加用于标注配对函数为发射侧或接收侧的第一标识可以进一步限定对端函数的范围。
举例说明,在一可行性实施例中,配对函数的配对标签为{@pair FeatureAbility.sendMsg}。响应于对超链接的触发,引用查找模块将send端和receive端的函数名为sendMsg对应的引用全部查找出来。在一可行性实施例中,配对函数的函数信息为{@pair FeatureAbility.sendMsg send},响应于对超链接的触发,引用查找模块将send端的函数名为sendMsg对应的引用全部查找出来。可见在配对标签中添加用于标注配对函数为发射侧或接收侧的第一标识可以限定对端函数的范围。
在一些可行性实施例中,可以在配对标签中添加其它标识,以进一步限定对端函数的范围。举例说明,在一些可行性实施例中,可以使用scopeName.className限定函数范围,不同的语言中,scopeName有不同含义,在Java中,scopeName代表包名,在Javascript和C++中,scopeName为命令空间名称;className为类名,methodName为函数名。
作为一可行性实施例,配对标签还包括第二标识,第二标识用于指示在引用的查找过程中支持跨设备查找,如果配对函数支持跨设备跳转,配对标签还包括第二标识。
本实施例中,第二标识用于指示在引用的查找过程中支持跨设备查找。本实施例中并不对第二标识的样式作以限定。例如,在一可行性实施例中,第二标识可以为cross。举例说明,如果当前配对函数不支持跨设备查找,该配对函数的配对标签可以为{@pair FeatureAbility.sendMsg send};如果当前配对函数支持跨设备查找,该配对函数的配对标签可以为{@pair FeatureAbility.sendMsg send,cross}。
本实施例示出的技术方案在配对标签中添加第二标识可以进一步限定对端函数的范围。
举例说明,在一可行性实施例中,配对函数的配对标签为{@pair FeatureAbility.sendMsg}。响应于对超链接的触发,引用查找模块将本地存储的函数名为sendMsg对应的引用全部查找出来。在一可行性实施例中,配对函数的函数信息为{@pair FeatureAbility.sendMsg cross},响应于对超链接的触发,引用查找模块全局的函数名为sendMsg对应的引用全部查找出来,其中全局包括开发者当前操作的设备存储的函数和与开发者当前操作的设备可以进行相互通信的设备存储的函数。可见在配对标签中添加用于第二标识可以进一步限定对端函数的范围。
作为一可行性实施例,如果配对标签中包含第二标识,在查找配对函数的函数信息的步骤之后,方法还包括:为备选设备配置一个标识文档,标识文档包括函数信息和设备名称,备选设备为与配对函数的设备实现相互通信的设备;为配对函数添加超链接,每个超链接对应一个标识文档。
本申请实施例示出的方案中,为备选设备配置一个标识文档,标识文档包括函数信息和设备名称。例如,在一可行性实施例中,标识文档可以为[tv](command:goToPeer(tv,receive,FeatureAbility#subscribeMsg,cross)),其中,tv为设备名称,(receive,FeatureAbility#subscribeMsg,cross)为函数信息。
在一些可行性实施例中,可以为每个备选设备配置一个标识文档。举例说明,当前操作的设备可以连接的备选设备为tv1、tv2和watch。可以为3个备选设备配置3个标识文档,分别为:[tv1](command:goToPeer(tv1,receive,FeatureAbility#subscribeMsg,cross));[tv2](command:goToPeer(tv2,receive,FeatureAbility#subscribeMsg,cross));[watch](command:goToPeer(watch,receive,FeatureAbility#subscribeMsg,cross))。
在一些可行性实施例中,可以为每类备选设备配置一个标识文档。举例说明,在一可行性实施例中,当前操作的设备可以连接的备选设备为tv1、tv2和watch。可以为2类备选设备配置2个标识文档,分别为:[tv](command:goToPeer(tv,receive,FeatureAbility#subscribeMsg,cross));[watch](command:goToPeer(watch,receive,FeatureAbility#subscribeMsg,cross))。
值得注意的,本申请实施例仅是实例性的示出两种标识文档的配置方案,在实际应用的过程中标识文档的配置方案可以是但不限于上述两种。
作为一可行性实施例,如果配对标签中包含第二标识,响应于对超链接的触发,查找对端函数名称对应的引用的步骤具体为:
响应于对超链接的触发,在所述目标设备名称对应的代码模块中查找所述对端函数名称对应的引用,所述目标设备名称为被触发的超链接对应的设备名称。
其中,代码模块用于记录器对用的设备中加载的代码。
本实现方式中,每个备选对应一个超链接,当开发者选择要跳转的备选设备时,开发者通过点击该备选设备对应的超链接,以使得引用查找模块在该备选设备内查找对端函数名称对应的引用。在上述过程中,不需要再从全局搜索的结果定位出要跳转的备选设备。
下面结合具体的实例对本实施例示出的方案做进一步的说明:在一可行性实施例中,上述方案适用于phone设备,phone设备可以包括:信息处理模块、链接添加模块和引用查找模块。在软件开发时,光标停留在phone/sender.js的第6行FeatureAbility.sendmsg位置时,开发者触发配对函数的跳转指令。信息处理模块确定phone/sender.js是一个FeatureAbility.sendMsg函数。信息处理模块获取FeatureAbility.sendmsg函数对应注释信息;确定获取到FeatureAbility.sendmsg注释信息中带有{@pair FeatureAbility#subscribeMsg receive cross-device}配对标签。信息处理模块解析此配对标签,获取当前位置对应配对函数的函数信息:(1)配对函数名为:FeatureAbility#subscribeMsg,(2)receive标识配对函数位于作为参数,所述标识文档为:[tv](command:goToPeer(tv,receive,FeatureAbility#subscribeMsg,cross)),[watch](command:goToPeer(watch,receive,FeatureAbility#subscribeMsg,cross));链接添加模块为每个设备增加一个包含自定义命令超链接,所述超链接以标识文档作为参数。超链接可以显示在UI界面上,显示效果可以参阅图4:开发者当点击设备tv对应的超链接[tv](command:goToPeer(tv,receive,FeatureAbility#subscribeMsg,cross)),引用查找模块获取到需要跳转的函数为FeatureAbility#subscribeMsg,设备类型为tv的设备存储器内存储的函数。引用查找模块,在tv设备类型对应的设备的存储器中查找FeatureAbility#subscribeMsg的所有引用,每个引用都有对应文件路径和对应行号列号,本实施例中将会得到tv/receiver.js中第6行。UI界面的展示界面切换至receiver.js函数中的第6行,从而完成从phone的sender.js 第6行的FeatureAbility.sendMsg跳转到tv的receiver.js第6行。
本申请实施例提供一种非同名符号的函数跳转装置,具体的,可以参阅图5,图5为根据一可行性实施例示出的非同名符号的函数跳转装置的示意图,包括:
代码编辑器401,用于接收配对函数的跳转指令;
信息处理模块402,用于响应于配对函数的跳转指令,查找所述配对函数的函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称;
链接添加模块403,用于为所述配对函数添加超链接,所述超链接以所述对端函数名称作为参数;
命令处理模块404用于响应于对所述超链接的触发,调用引用查找模块;
引用查找模块405,用于响应于对所述超链接的触发,查找所述对端函数名称对应的引用。
本实现方式中,响应于配对函数的跳转指令,信息处理模块自动查找函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称。而后,链接添加模块以所述对端函数名称作为参数为所述配对函数添加超链接。卡发着点击超链触发函数的跳转时,引用查找模块查找出所述对端函数名称对应的引用。本实现方式,即使是在非同名符号的函数之间也可以实现自动跳转,在一定程度上提升了软件开发的效率。
在一种可能的实现方式中,所述信息处理模块包括:
遍历子模块,用于遍历所述配对函数的注释信息;
解析子模块,用于如果所述注释信息包含配对标签,则解析所述配对标签,得到函数信息。
本实现方式中,预先为具有跳转关系的函数的注释信息中添加配对标签,所述配对标签具有预置格式,以使得配对标签可以被识别。基于此本方式中,遍历子模块可以直接在注释信息中识别配对标签,在注释信息包含配对标签的情况下,解析子模块可以仅对配对标签进行解析,数据处理量较少。
在一种可能的实现方式中,解析子模块,还用于如果所述注释信息不包含配对标签,则弹出提示信息,所述提示信息用于提醒开发者所述配对函数没有匹配的对端函数。
本实现方式中,在注释信息不包含配对标签的情况下,解析子模块弹出提示信息,弹出的提示信息可以对开发者起到提示的作用。
在一种可能的实现方式中,所述配对标签还包括第一标识,所述第一标识用于标注所述对端函数为发射侧函数或接收侧函数。
本实现方式中,在配对标签中添加用于标注配对函数为发射侧或接收侧的第一标识,可以限定对端函数的范围。
在一种可能的实现方式中,如果所述配对函数支持跨设备跳转,所述配对标签还包括第二标识。
本实现方式中,在配对标签中添加第二标识,可以进一步限定对端函数的范围。
在一种可能的实现方式中所述信息处理模块,还用于:为备选设备配置一个标识文档,所述标识文档包括函数信息和设备名称,所述备选设备为与配对函数的设备实现相互通信的设备;
为所述配对函数添加超链接,每个所述超链接对应一个标识文档。
本实现方式中,信息处理模块为每类/每个备选设备配置一个标识文档,而后为配对函数配置多个超链接,每个所述超链接对应一个标识文档。当开发者选择要跳转的备选设备时,通过点击该备选设备对应的超链接,便可以在该备选设备内查找对端函数名称对应的引用。在上述过程中,不需要再从全局搜索的结果定位出要跳转的备选设备。
在一种可能的实现方式中,所述引用查找模块还用于,在所述目标设备名称对应的代码模块中查找所述对端函数名称对应的引用,所述目标设备名称为被触发的超链接对应的设备名称。
本实现方式中,每个备选对应一个超链接,当开发者选择要跳转的备选设备时,开发者通过点击该备选设备对应的超链接,便可以在该备选设备内查找对端函数名称对应的引用,在上述过程中,不需要再从全局搜索的结果定位出要跳转的备选设备。
本申请实施例提供一种计算机系统,所述计算机系统包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于执行所述计算机程序实现如本申请实施例提供的所述的方法。
本申请实施例还提供一种计算机存储介质,该计算机存储介质包括计算机指令,当计算机指令在上述电子设备上运行时,使得该电子设备执行上述方法实施例中电子设备执行的各个功能或者步骤。
本申请实施例还提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中电子设备执行的各个功能或者步骤。
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
容易理解的是,本领域技术人员在本申请提供的几个实施例的基础上,可以对本申请的实施例进行结合、拆分、重组等得到其他实施例,这些实施例均没有超出本申请的保护范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件 产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (16)

  1. 一种非同名符号的函数跳转方法,其特征在于,包括:
    响应于配对函数的跳转指令,查找所述配对函数的函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称;
    为所述配对函数添加超链接,所述超链接以所述对端函数名称作为参数;
    响应于对所述超链接的触发,查找所述对端函数名称对应的引用。
  2. 根据权利要求1所述的函数跳转方法,其特征在于,所述查找所述配对函数的函数信息的步骤包括:
    遍历所述配对函数的注释信息;
    如果所述注释信息包含配对标签,则解析所述配对标签,得到所述函数信息,所述配对标签以预置格式存在,以使得所述配对标签能够被识别。
  3. 根据权利要求2所述的函数跳转方法,其特征在于,如果所述注释信息不包含配对标签,则弹出提示信息,所述提示信息用于提醒开发者所述配对函数没有匹配的对端函数。
  4. 根据权利要求3所述的函数跳转方法,其特征在于,所述配对标签包括第一标识,所述第一标识用于标注所述对端函数为发射侧函数或接收侧函数。
  5. 根据权利要求4所述的函数跳转方法,其特征在于,如果所述配对函数支持跨设备跳转,所述配对标签还包括第二标识,所述第二标识用指示引用查找过程中支持跨设备查找。
  6. 根据权利要求5所述的函数跳转方法,其特征在于,在查找所述配对函数的函数信息的步骤之后,所述方法还包括:
    为备选设备配置一个标识文档,所述标识文档包括函数信息和设备名称,所述备选设备为与配对函数的设备实现相互通信的设备;
    为所述配对函数添加超链接,每个所述超链接对应一个标识文档。
  7. 根据权利要求6所述的函数跳转方法,其特征在于,响应于对所述超链接的触发,查找所述对端函数名称对应的引用的步骤具体为:
    响应于对所述超链接的触发,在目标设备名称对应的代码模块中查找所述对端函数名称对应的引用,所述目标设备名称为被触发的超链接对应的设备名称。
  8. 一种非同名符号的函数跳转装置,其特征在于,包括:
    信息处理模块,用于响应于配对函数的跳转指令,查找所述配对函数的函数信息,所述函数信息包括对端函数名称,所述对端函数名称为与所述配对函数具有跳转关系的对端函数的函数名称;
    链接添加模块,用于为所述配对函数添加超链接,所述超链接以所述对端函数名称作为参数;
    引用查找模块,用于响应于对所述超链接的触发,查找所述对端函数名称对应的引用。
  9. 根据权利要求8所述的函数跳转装置,其特征在于,所述信息处理模块包括:
    遍历子模块,用于遍历所述配对函数的注释信息;
    解析子模块,用于如果所述注释信息包含配对标签,则解析所述配对标签,得到函数信息,所述配对标签以预置格式存在,以使得所述配对标签能够被识别。
  10. 根据权利要求9所述的函数跳转装置,其特征在于,解析子模块,还用于如果所述注释信息不包含配对标签,则弹出提示信息,所述提示信息用于提醒开发者所述配对函数没有匹配的对端函数。
  11. 根据权利要求8所述的函数跳转装置,其特征在于,所述配对标签还包括第一标识,所述第一标识用于标注所述对端函数为发射侧函数或接收侧函数。
  12. 根据权利要求11所述的函数跳转装置,其特征在于,如果所述配对函数支持跨设备跳转,所述配对标签还包括第二标识,所述第二标识用指示引用查找过程中支持跨设备查找。
  13. 根据权利要求12所述的函数跳转装置,其特征在于,所述信息处理模块,还用于:
    为备选设备配置一个标识文档,所述标识文档包括函数信息和设备名称,所述备选设备为与配对函数的设备实现相互通信的设备;
    为所述配对函数添加超链接,每个所述超链接对应一个标识文档。
  14. 根据权利要求13所述的函数跳转装置,其特征在于,所述引用查找模块还用于:
    在目标设备名称对应的代码模块中查找所述对端函数名称对应的引用,所述目标设备名称为被触发的超链接对应的设备名称。
  15. 一种计算机系统,其特征在于,所述计算机系统包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于执行所述计算机程序实现如上述权利要求1-7任一项所述的方法。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储计算机程序,所述计算机程序被处理器用于实现如上述权利要求1-7任一项所述的方法。
PCT/CN2021/137695 2021-02-02 2021-12-14 非同名符号的函数跳转方法、装置及计算机可读存储介质 WO2022166410A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110143762.7 2021-02-02
CN202110143762.7A CN114840204A (zh) 2021-02-02 2021-02-02 非同名符号的函数跳转方法、装置及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2022166410A1 true WO2022166410A1 (zh) 2022-08-11

Family

ID=82561074

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/137695 WO2022166410A1 (zh) 2021-02-02 2021-12-14 非同名符号的函数跳转方法、装置及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN114840204A (zh)
WO (1) WO2022166410A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008054074A1 (en) * 2006-10-31 2008-05-08 Sk Telecom Co., Ltd. Terminal device having function of interfacing compilation libraries in heterogeneous languages, method of calling api, and method of creating compile function
CN103294457A (zh) * 2012-02-27 2013-09-11 百度在线网络技术(北京)有限公司 动态替换主程序中c/c++函数的方法及装置
CN106126235A (zh) * 2016-06-24 2016-11-16 中国科学院信息工程研究所 一种复用代码库构建方法、复用代码快速溯源方法及系统
CN110321118A (zh) * 2019-07-05 2019-10-11 深圳市智慧郎数码科技有限公司 函数代码的生成方法及相关设备
CN110362356A (zh) * 2018-04-09 2019-10-22 腾讯科技(深圳)有限公司 函数数据处理方法、装置、计算机设备和存储介质
CN112015491A (zh) * 2019-05-30 2020-12-01 华为技术有限公司 实现函数跳转的方法、装置及计算机存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008054074A1 (en) * 2006-10-31 2008-05-08 Sk Telecom Co., Ltd. Terminal device having function of interfacing compilation libraries in heterogeneous languages, method of calling api, and method of creating compile function
CN103294457A (zh) * 2012-02-27 2013-09-11 百度在线网络技术(北京)有限公司 动态替换主程序中c/c++函数的方法及装置
CN106126235A (zh) * 2016-06-24 2016-11-16 中国科学院信息工程研究所 一种复用代码库构建方法、复用代码快速溯源方法及系统
CN110362356A (zh) * 2018-04-09 2019-10-22 腾讯科技(深圳)有限公司 函数数据处理方法、装置、计算机设备和存储介质
CN112015491A (zh) * 2019-05-30 2020-12-01 华为技术有限公司 实现函数跳转的方法、装置及计算机存储介质
CN110321118A (zh) * 2019-07-05 2019-10-11 深圳市智慧郎数码科技有限公司 函数代码的生成方法及相关设备

Also Published As

Publication number Publication date
CN114840204A (zh) 2022-08-02

Similar Documents

Publication Publication Date Title
US11461111B2 (en) Method for running applets, and electronic device
US8959106B2 (en) Class loading using java data cartridges
CN109062563B (zh) 用于生成页面的方法和装置
US10599413B2 (en) Method and device for identifying file
WO2005086027A1 (en) Method, data processing device, computer program product and arrangement for processing electronic data
JP2023541186A (ja) 可視化ページレンダリング方法、装置、機器及び記憶媒体
CN108494762A (zh) 网页访问方法、装置及计算机可读存储介质、终端
CN111191171A (zh) 基于安卓的多Fragment加载方法、装置及电子设备
CN112527386B (zh) 应用程序发布方法及装置
CN113268245A (zh) 代码分析方法、装置及存储介质
CN108885544B (zh) 前端页面国际化处理方法、应用服务器及计算机可读存储介质
CN116107524B (zh) 低代码应用日志处理方法、介质、装置和计算设备
WO2022166410A1 (zh) 非同名符号的函数跳转方法、装置及计算机可读存储介质
US20130151945A1 (en) Processing Published and Subscribed Events
CN111666074B (zh) 一种web应用定制的方法、相关装置及系统
CN113127776A (zh) 面包屑路径生成方法、装置及终端设备
CN111158777A (zh) 组件调用方法、装置及计算机可读存储介质
WO2022247441A1 (zh) 日志文件的解析方法、装置、设备及存储介质
CN104217021A (zh) 阅读服务器、终端设备及其显示阅读内容的方法
CN114595449A (zh) 一种安全扫描方法及装置
KR20130103239A (ko) 번역 기능을 구비한 웹 브라우징 서비스 제공 방법, 서버 및 단말
JP2007193435A (ja) 情報処理端末、プログラム
CN111880778A (zh) 接口文档的生成方法、装置、电子设备及存储介质
CN113590088B (zh) 一种自动分析组件使用情况的方法、装置和电子设备
CN117763112A (zh) 代码处理方法、装置、介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21924403

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21924403

Country of ref document: EP

Kind code of ref document: A1