Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Analyse Statement Summary

Analyse is a nonterminal, command statement that occurs only in command scripts. It initiates the code analysis phase of the translation process. This phase takes as input the intermediate code produced by the compiler and outputs an intermediate code that can be authored in the target language. Once completed each active code unit has two intermediate code representations stored in the virtual binary information file.

The attributes of the Analyse statement are as follows:

Attribute Description
Dialect This deprecated attribute specifies one of the three target language identifiers csh, vbn, or usr. It changes the system wide target language as selected and thus effects all further processing.
Project This attribute specifies the name of a previously compiled VBP project or ASP page. It restricts the analyzer to effect the specified component only. The use of this attribute should be limited to complex migrations where the order in which code units are processed must be controlled.

Though technically a nonterminal statement, the Analyse statement has no substatements at this time.

The script errors associated with the Analyse statement are as follows:

Error Description
1001 Encountered illegal ANALYSE directive %1d
1002 The Language dialect [%1d] is not supported.
1003 The Project [%1d] does not exist in storage area.
1004 The Component [%1d] is not a project.
1005 The Storage area does not contain any projects.

The analysis phase proceeds in the following steps. First, references to symbols with variant values are sought in the code to determine if their usage makes it possible to infer a stronger type for them. Most type inferences occur during this first step. Second, the code is reviewed and changes are made to make it compatible with the target .NET language. The actual changes made are different for C# versus VB.NET. Third, the argument passing logic is analysed. Argument types are cast to the appropriate types required by the parameters that they are passed to. Arguments that are passed ByRef are examined and where necessary temporaries are created to contain computed, constant, or NULL values that cannot be passed ByRef. Fourth, a final pass is made through the code units to make any final adjustments needed.
Table of Contents

  • No labels