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

Method super_new

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

Source from the content-addressed store, hash-verified

454 // TODO: refactor to remove dup'd code
455
456 void super_new(InstanceScope scope, String name, int nargs) {
457 final ST self = scope.st;
458 ST st = null;
459 CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
460 if ( imported==null ) {
461 errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE, name);
462 st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
463 }
464 else {
465 st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name);
466 st.groupThatCreatedThisInstance = group;
467 }
468 // get n args and store into st's attr list
469 storeArgs(scope, nargs, st);
470 sp -= nargs;
471 operands[++sp] = st;
472 }
473
474 void super_new(InstanceScope scope, String name, Map<String, Object> attrs) {
475 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