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

Method super_new

output/java8/1.4.15/Interpreter.java:460–476  ·  view source on GitHub ↗
(InstanceScope scope, String name, int nargs)

Source from the content-addressed store, hash-verified

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