C# 클래스 kOS.Safe.Compilation.OpcodeLabelReset

Most Opcode.Label fields are just string-ified numbers for their index position. But sometimes, when they are the entry point for a function call (from a lock expression), the label is an identifier string. When this is the case, then the mere position of the opcode within the program is not enough to store the label. Therefore, for import/export to an ML file, in this case the numeric label needs to be stored. It is done by creating a dummy opcode that is just a no-op instruction intended to be removed when the program is actually loaded into memory and run. It exists purely to store, as an argument, the label of the next opcode to follow it.
상속: Opcode
파일 보기 프로젝트 열기: KSP-KOS/KOS

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Execute ( ICpu cpu ) : void
OpcodeLabelReset ( string myLabel ) : System
PopulateFromMLFields ( List fields ) : void
ToString ( ) : string

보호된 메소드들

메소드 설명
OpcodeLabelReset ( ) : System

This variant of the constructor is just for ML file save/load to use.

메소드 상세

Execute() 공개 메소드

public Execute ( ICpu cpu ) : void
cpu ICpu
리턴 void

OpcodeLabelReset() 보호된 메소드

This variant of the constructor is just for ML file save/load to use.
protected OpcodeLabelReset ( ) : System
리턴 System

OpcodeLabelReset() 공개 메소드

public OpcodeLabelReset ( string myLabel ) : System
myLabel string
리턴 System

PopulateFromMLFields() 공개 메소드

public PopulateFromMLFields ( List fields ) : void
fields List
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string