C# 클래스 Microsoft.Scripting.Interpreter.GotoInstruction

This instruction implements a goto expression that can jump out of any expression. It pops values (arguments) from the evaluation stack that the expression tree nodes in between the goto expression and the target label node pushed and not consumed yet. A goto expression can jump into a node that evaluates arguments only if it carries a value and jumps right after the first argument (the carried value will be used as the first argument). Goto can jump into an arbitrary child of a BlockExpression since the block doesn’t accumulate values on evaluation stack as its child expressions are being evaluated. Goto needs to execute any finally blocks on the way to the target label. { f(1, 2, try { g(3, 4, try { goto L } finally { ... }, 6) } finally { ... }, 7, 8) L: ... } The goto expression here jumps to label L while having 4 items on evaluation stack (1, 2, 3 and 4). The jump needs to execute both finally blocks, the first one on stack level 4 the second one on stack level 2. So, it needs to jump the first finally block, pop 2 items from the stack, run second finally block and pop another 2 items from the stack and set instruction pointer to label L. Goto also needs to rethrow ThreadAbortException iff it jumps out of a catch handler and the current thread is in "abort requested" state.
상속: IndexedBranchInstruction
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

공개 메소드들

메소드 설명
Run ( InterpretedFrame frame ) : int

비공개 메소드들

메소드 설명
Create ( int labelIndex, bool hasResult, bool hasValue ) : GotoInstruction
GotoInstruction ( int targetIndex, bool hasResult, bool hasValue ) : System.Linq.Expressions

메소드 상세

Run() 공개 메소드

public Run ( InterpretedFrame frame ) : int
frame InterpretedFrame
리턴 int