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

Method super_new

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

Source from the content-addressed store, hash-verified

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