Code scanning method, code migration method and related devices

A technology of code and source code, applied in the field of code scanning, can solve the problems that cannot meet the requirements of C/C++ code migration, and the intermediate files cannot provide effective macro list information, etc.

Pending Publication Date: 2022-06-21
HUAWEI TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The intermediate file obtained in this way cannot provide complete valid macro list information and conditionally compiled code block information, resulting in the intermediate file not being able to meet the migration requirements of C / C++ code between different CPU architectures

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code scanning method, code migration method and related devices
  • Code scanning method, code migration method and related devices
  • Code scanning method, code migration method and related devices

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The embodiments of the present application provide a code scanning method, a code migration method, and a related device, which can scan source code, accurately identify all valid macros and conditional compilation code blocks, and efficiently identify code segments that need to be migrated And give accurate code porting advice.

[0031] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "corresponding to", and any variations thereof, are intended to cover non-exclusive inclusion, eg, a process, me...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides a code scanning method, a code migration method and related devices. According to the method, source codes can be scanned, all effective macro and condition compilation code blocks can be accurately identified, code segments needing to be migrated are efficiently identified, and accurate code transplantation suggestions are given.

Description

technical field [0001] The embodiments of the present application relate to the field of computer technologies, and in particular, to a code scanning method, a code migration method, and related apparatuses. Background technique [0002] Code Migration is the movement of programming code from one system to another. Programming code refers to program code written in a programming language (eg, C language, C++ language, Java language, Python language, etc.). [0003] At present, C / C++ code generally includes system macros (Macro) and conditional compilation related to a central processing unit (Central Processing Unit, CPU) architecture. In the process of code migration, these CPU architecture-related macros increase the difficulty of code migration between different CPU architectures. [0004] Specifically, the existing standard C / C++ preprocessor directly expands the macro definition in the process of processing the C / C++ source code, selects only valid code block informat...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/76G06F8/41
CPCG06F8/76G06F8/433
Inventor 刘继周张汝涛
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products