MCPcopy Create free account
hub / github.com/antlr/codebuff / super_new

Method super_new

output/java/1.4.12/Interpreter.java:490–506  ·  view source on GitHub ↗
(InstanceScope scope, String name, int nargs)

Source from the content-addressed store, hash-verified

488 // TODO: refactor to remove dup'd code
489
490 void super_new(InstanceScope scope, String name, int nargs) {
491 final ST self = scope.st;
492 ST st = null;
493 CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
494 if ( imported==null ) {
495 errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE, name);
496 st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
497 }
498 else {
499 st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name);
500 st.groupThatCreatedThisInstance = group;
501 }
502 // get n args and store into st's attr list
503 storeArgs(scope, nargs, st);
504 sp -= nargs;
505 operands[++sp] = st;
506 }
507
508 void super_new(InstanceScope scope, String name, Map<String, Object> attrs) {
509 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