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

Method super_new

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

Source from the content-addressed store, hash-verified

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