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

Method super_new

output/java/1.4.14/Interpreter.java:493–509  ·  view source on GitHub ↗
(InstanceScope scope, String name, int nargs)

Source from the content-addressed store, hash-verified

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