(WyilFile context, QualifiedName name, Type.Callable signature, CallStack frame, RValue... args)
| 186 | } |
| 187 | |
| 188 | private boolean execute(WyilFile context, QualifiedName name, Type.Callable signature, CallStack frame, RValue... args) throws IOException { |
| 189 | // FIXME: approach for constructing stack frame inefficient! |
| 190 | // |
| 191 | try { |
| 192 | interpreter.execute(name, signature, frame, args); |
| 193 | // |
| 194 | return true; |
| 195 | } catch (Interpreter.RuntimeError e) { |
| 196 | // FIXME: there is a known problem here because the stack frame will produce the |
| 197 | // current values for the parameters, not their actual values on entry. The |
| 198 | // easiest way to fix this is to prevent assignments to parameters!! |
| 199 | // |
| 200 | // Extract stack frame information |
| 201 | StackFrame[] errorframe = e.getFrame().toStackFrame(); |
| 202 | // Add appropriate syntax error to the syntactic item where the error arose. |
| 203 | ErrorMessages.syntaxError(e.getElement(), e.getErrorCode(), errorframe); |
| 204 | // Done |
| 205 | return false; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | private boolean check(Decl.Type t, ExtendedContext context) { |
| 210 | Runtime runtime = Runtime.getRuntime(); |
no test coverage detected