MCPcopy Index your code
hub / github.com/antlr/codebuff / super_new

Method super_new

output/java8/1.4.17/Interpreter.java:462–478  ·  view source on GitHub ↗
(InstanceScope scope, String name, int nargs)

Source from the content-addressed store, hash-verified

460 // TODO: refactor to remove dup'd code
461
462 void super_new(InstanceScope scope, String name, int nargs) {
463 final ST self = scope.st;
464 ST st = null;
465 CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
466 if ( imported==null ) {
467 errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE, name);
468 st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
469 }
470 else {
471 st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name);
472 st.groupThatCreatedThisInstance = group;
473 }
474 // get n args and store into st's attr list
475 storeArgs(scope, nargs, st);
476 sp -= nargs;
477 operands[++sp] = st;
478 }
479
480 void super_new(InstanceScope scope, String name, Map<String, Object> attrs) {
481 final ST self = scope.st;

Callers 1

_execMethod · 0.95

Calls 5

storeArgsMethod · 0.95
runTimeErrorMethod · 0.65
getEmbeddedInstanceOfMethod · 0.45

Tested by

no test coverage detected