private DebuggerCallSite getCallSite(int index) { RecordArray.Record record = callSiteMapping.get(index); int type = record.get(2); int method = record.get(3); switch (type) { case DebuggerCallSite.NONE: return null; case DebuggerCallSite.STATIC: return new DebuggerStaticCallSite(getExactMethod(method)); case DebuggerCallSite.VIRTUAL: return new DebuggerVirtualCallSite(getExactMethod(method)); default: throw new AssertionError("Unrecognized call site type: " + type); } }
@Override public void visit(DebuggerStaticCallSite callSite) { for (GeneratedLocation loc : debugInfo.getMethodEntrances(callSite.getMethod())) { loc = debugInfo.getStatementLocation(loc); locations.add(new JavaScriptLocation(script, loc.getLine(), loc.getColumn())); } } }
@Override public void visit(DebuggerStaticCallSite callSite) { for (GeneratedLocation loc : debugInfo.getMethodEntrances(callSite.getMethod())) { loc = debugInfo.getStatementLocation(loc); locations.add(new JavaScriptLocation(script, loc.getLine(), loc.getColumn())); } } }
private DebuggerCallSite getCallSite(int index) { RecordArray.Record record = callSiteMapping.get(index); int type = record.get(2); int method = record.get(3); switch (type) { case DebuggerCallSite.NONE: return null; case DebuggerCallSite.STATIC: return new DebuggerStaticCallSite(getExactMethod(method)); case DebuggerCallSite.VIRTUAL: return new DebuggerVirtualCallSite(getExactMethod(method)); default: throw new AssertionError("Unrecognized call site type: " + type); } }