Bool32 TestFontProtocol(void) { #ifdef _USE_LEO_ int32_t name; int i; //,j; int nClust; int numCourier,nC; FILE *fp; LeoFieldSetup fs={0}; RecRaster rec; RecObject ro={0}; LeoPageSetup ps={0}; int jj; if( _access("c:\\met.ini",0)==-1 ) return FALSE; nClust=FONGetClustCount(); set_alphabet(alphabet1, alpha_str); LEOSetPlatform(586); fs.nStyle = LS_PRINT; memcpy(fs.AlphaTable,alphabet1,256); LEOSetupField(&fs); CTB_unlink("CLUST2"); fp=fopen(".\\clu_met.pro","wt"); for(i=0,nC=numCourier=0;i<nClust;i++) { for(jj=0;jj<3;jj++) { name=0; FONGetClusterAsBW(&name,i,jj*25,&rec); CTB_AddRecRaster("CLUST2", &rec,decode_ASCII_to_[name][0]); memset(&ro,0,sizeof(RecObject)); memcpy(&ro.recData.recRaster,&rec,REC_MAX_RASTER_SIZE); ps.nIdPage=-1; ro.recData.lwStatus=0; LEOSetupPage(&ps); fprintf(fp,"Nclu=%d(%d) let=%c tresh=%d%s\n",i,i*3+jj, name, jj,jj?"":"(default)" ); LEORecogPrintChar(&ro); print_method(fp,&ro.recResults," leo : ",1); LEORecogPrnMethod( &ro , REC_METHOD_MSK, 1); print_method(fp,&ro.recResults," msk : ",0); LEORecogCharDebug( &ro ); print_method(fp,&ro.recResults," evn+3x5 : ",1); } // end treshold fprintf(fp,"\n"); } // end clusters fclose(fp); #endif return TRUE; }
static void print_defmethod_constituent(struct defmethod_constituent *c, int depth) { printf("%sdefine method\n", indent(depth)); if (c->tlf) print_method(c->tlf, depth+1); else print_method(c->method, depth+1); printf("%send define method\n", indent(depth)); }
static void print_defclass_constituent(struct defclass_constituent *c, int depth) { static char *alloc[] = {"instance", "class", "each-subclass", "constant", "virtual"}; struct superclass *super; struct slot_spec *slot; struct initarg_spec *initarg; struct inherited_spec *inherited; printf("%sdefine class\n", indent(depth)); printf("%sname: %s\n", indent(depth+1), c->name->symbol->name); if (c->tlf1) { printf("%sphase 1:\n", indent(depth+1)); print_method(c->tlf1, depth+2); printf("%sphase 2:\n", indent(depth+1)); print_method(c->tlf2, depth+2); } else { printf("%ssupers:\n", indent(depth+1)); for (super = c->supers; super != NULL; super = super->next) print_expr(super->expr, depth+2); printf("%sslots:\n", indent(depth+1)); for (slot = c->slots; slot != NULL; slot = slot->next) { printf("%s%s slot, %s allocation\n", indent(depth+2), slot->name ? (char*)slot->name->symbol->name : "anonymous", alloc[(int)slot->alloc]); if (slot->type) { printf("%stype:\n", indent(depth+2)); print_expr(slot->type, depth+3); } print_plist(slot->plist, depth+2); } printf("%sinitialization arguments:\n", indent(depth+1)); for (initarg = c->initargs; initarg != NULL; initarg = initarg->next) { printf("%s%s%s initarg\n", indent(depth+2), initarg->keyword->name, initarg->required ? " required " : ""); print_plist(initarg->plist, depth+2); } printf("%sinherited slots:\n", indent(depth+1)); for (inherited = c->inheriteds; inherited != NULL; inherited = inherited->next) { printf("%s%s inherited slot\n", indent(depth+2), inherited->name->symbol->name); print_plist(inherited->plist, depth+2); } } printf("%send define class\n", indent(depth)); }
void print_classfile(classfile* c, FILE* out){ fprintf(out, "Magic: %x\n", c->magic); fprintf(out, "Minor: %x\n", c->minor_version); fprintf(out, "Major: %x\n", c->major_version); fprintf(out, "Constant Pool Count: %d\n", c->constant_pool_count); for(int i = 0; i < c->constant_pool_count-1; i++){ fprintf(out, "\t%d\t", i + 1); print_constant(c->constant_pool[i], out); fprintf(out, "\n"); } fprintf(out, "Access Flags: %x\n", c->access_flags); fprintf(out, "This class index: %x\n", c->this_class); fprintf(out, "Super class index: %x\n", c->super_class); fprintf(out, "Interface count: %x\n", c->interfaces_count); fprintf(out, "Fields count: %x\n", c->fields_count); for(int i = 0; i < c->fields_count; i++){ print_field(c, c->fields[i], out); } fprintf(out, "Methods count: %x\n", c->methods_count); for(int i = 0; i < c->methods_count; i++){ print_method(c, c->methods[i], out); } fprintf(out, "Attributes count: %x\n", c->attributes_count); for(int i = 0; i < c->attributes_count; i++){ print_attribute(c, c->attributes[i], out); } }
void print_cls_directives(Output& out, const PreClass* cls) { print_cls_enum_ty(out, cls); print_cls_used_traits(out, cls); for (auto& c : cls->allConstants()) print_constant(out, &c); for (auto& p : cls->allProperties()) print_property(out, &p); for (auto* m : cls->allMethods()) print_method(out, m); }
void IdealGraphPrinter::print_inline_tree(InlineTree *tree) { if (tree == NULL) return; ciMethod *method = tree->method(); print_method(tree->method(), tree->caller_bci(), tree); }
static void print_defvar_constituent(struct defvar_constituent *c, int depth) { printf("%sdefine variable\n", indent(depth)); print_bindings(c->bindings, depth+1); if (c->tlf) { printf("%sinitializer\n", indent(depth)); print_method(c->tlf, depth+1); } printf("%send define variable\n", indent(depth)); }
void print_selected(outputStream* str, int indent) const { assert(has_target(), "Should be called otherwise"); streamIndentor si(str, indent * 2); str->indent().print("Selected method: "); print_method(str, _selected_target); Klass* method_holder = _selected_target->method_holder(); if (!method_holder->is_interface()) { tty->print(" : in superclass"); } str->cr(); }
static void print_local_constituent(struct local_constituent *c, int depth) { struct method *method; printf("%slocal\n", indent(depth)); for (method = c->methods; method != NULL; method = method->next_local) print_method(method, depth+1); printf("%sbody\n", indent(depth)); print_body(c->body, depth+1); printf("%send local\n", indent(depth)); }
static void print_methods(compile_t* c, reachable_type_t* t, printbuf_t* buf) { size_t i = HASHMAP_BEGIN; reachable_method_name_t* n; while((n = reachable_method_names_next(&t->methods, &i)) != NULL) { size_t j = HASHMAP_BEGIN; reachable_method_t* m; while((m = reachable_methods_next(&n->r_methods, &j)) != NULL) print_method(c, buf, t, n->name, m->typeargs); } }
static void print_defgeneric_constituent(struct defgeneric_constituent *c, int depth) { printf("%sdefine generic\n", indent(depth)); printf("%sname: %s\n", indent(depth+1), c->name->symbol->name); print_param_list(c->params, depth+1); print_return_type_list(c->rettypes, depth+1); print_plist(c->plist, depth+1); if (c->tlf) { printf("%ssignature generator\n", indent(depth)); print_method(c->tlf, depth+1); } printf("%send define generic\n", indent(depth)); }
void print_sig_on(outputStream* str, Symbol* signature, int indent) const { streamIndentor si(str, indent * 2); str->indent().print_cr("Logical Method %s:", signature->as_C_string()); streamIndentor si2(str); for (int i = 0; i < _members.length(); ++i) { str->indent(); print_method(str, _members.at(i).first); if (_members.at(i).second == DISQUALIFIED) { str->print(" (disqualified)"); } str->cr(); } if (_selected_target != NULL) { print_selected(str, 1); } }
static void print_defdomain_constituent(struct defdomain_constituent *c, int depth) { int i; struct argument *arg; printf("%sdefine sealed domain\n", indent(depth)); printf("%sname: %s\n", indent(depth+1), c->name->symbol->name); if (c->types) { for (i = 0, arg = c->types; arg != NULL; i++, arg = arg->next) { printf("%stype %d\n", indent(depth+1), i); print_expr(arg->expr, depth+2); } } if (c->tlf) { printf("%stl method\n", indent(depth)); print_method(c->tlf, depth+1); } printf("%send define generic\n", indent(depth)); }
static void print_tlf_constituent(struct tlf_constituent *c, int depth) { printf("%stop level form\n", indent(depth)); print_method(c->form, depth+1); printf("%send top level form\n", indent(depth)); }
static void print_method_expr(struct method_expr *e, int depth) { print_method(e->method, depth); }