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