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

Method super_new

output/java/1.4.19/Interpreter.java:499–515  ·  view source on GitHub ↗
(InstanceScope scope, String name, int nargs)

Source from the content-addressed store, hash-verified

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