| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 part of fletch.session; | 5 part of fletch.session; |
| 6 | 6 |
| 7 class StackFrame { | 7 class StackFrame { |
| 8 final int functionId; | 8 final int functionId; |
| 9 final int bytecodePointer; | 9 final int bytecodePointer; |
| 10 final FletchCompiler compiler; | 10 final FletchCompiler compiler; |
| 11 final Session session; | 11 final Session session; |
| 12 final bool isBelowMain; | 12 final bool isBelowMain; |
| 13 final bool isInternal; | 13 final bool isInternal; |
| 14 | 14 |
| 15 StackFrame(int functionId, this.bytecodePointer, FletchCompiler compiler, | 15 StackFrame(int functionId, this.bytecodePointer, FletchCompiler compiler, |
| 16 this.session, this.isBelowMain) | 16 this.session, this.isBelowMain) |
| 17 : this.functionId = functionId, | 17 : this.functionId = functionId, |
| 18 this.compiler = compiler, | 18 this.compiler = compiler, |
| 19 isInternal = | 19 isInternal = |
| 20 compiler.lookupCompiledFunction(functionId).isParameterStub; | 20 compiler.lookupFletchFunctionBuilder(functionId).isParameterStub; |
| 21 | 21 |
| 22 String invokeString(Bytecode bytecode) { | 22 String invokeString(Bytecode bytecode) { |
| 23 if (bytecode is InvokeMethod) { | 23 if (bytecode is InvokeMethod) { |
| 24 String name = | 24 String name = |
| 25 compiler.lookupFunctionNameBySelector(bytecode.uint32Argument0); | 25 compiler.lookupFunctionNameBySelector(bytecode.uint32Argument0); |
| 26 return ' ($name)'; | 26 return ' ($name)'; |
| 27 } | 27 } |
| 28 return ''; | 28 return ''; |
| 29 } | 29 } |
| 30 | 30 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 | 176 |
| 177 int stepBytecodePointer(SourceLocation location) { | 177 int stepBytecodePointer(SourceLocation location) { |
| 178 return stackFrames[0].stepBytecodePointer(location); | 178 return stackFrames[0].stepBytecodePointer(location); |
| 179 } | 179 } |
| 180 | 180 |
| 181 int get bytecodePointer => stackFrames[0].bytecodePointer; | 181 int get bytecodePointer => stackFrames[0].bytecodePointer; |
| 182 | 182 |
| 183 int get methodId => stackFrames[0].functionId; | 183 int get methodId => stackFrames[0].functionId; |
| 184 } | 184 } |
| OLD | NEW |