コード例 #1
0
 public TryBlockInfo(int handlerOffset, VariableScope scope, TryBlockInfo outerBlock)
 {
     Contract.Requires(handlerOffset > 0);
     Contract.Requires(scope != null);
     HandlerOffset = handlerOffset;
     Scope         = scope;
     OuterBlock    = outerBlock;
 }
コード例 #2
0
 internal void LeaveTry()
 {
     if (_currentTryBlock == null)
     {
         throw new IllegalOpCodeException(OpCode.LeaveTry.ToString());
     }
     _currentTryBlock = _currentTryBlock.OuterBlock;
     CodeReader.Seek(CodeReader.ReadInteger());
 }
コード例 #3
0
 internal bool TryHandle(ExceptionObject exception)
 {
     Contract.Requires(exception != null);
     if (_currentTryBlock == null)
     {
         return(false);
     }
     LocalScope = _currentTryBlock.Scope;
     CodeReader.Seek(_currentTryBlock.HandlerOffset);
     _currentTryBlock = _currentTryBlock.OuterBlock;
     _evalStack.Push(exception.ThrownValue);
     _evalStack.Push((JSNumberValue)1);
     return(true);
 }
コード例 #4
0
 internal void EnterTry()
 {
     _currentTryBlock = new TryBlockInfo(CodeReader.ReadInteger(), LocalScope, _currentTryBlock);
 }