void map_enumeration::add_obj(oop obj) { assert(graph_maps->member(obj->map()->enclosing_mapOop()), "map should be known"); if (!graph_maps->find(obj->map()->enclosing_mapOop())) { if (obj->is_block()) { // TO BE FIXED WHEN THE SIC IS BETTER TO KILL BLOCK OOPS WHEN // A SCOPE TREMINATE. 3/31/93 LB. // Clone and kill the copy to avoid the problem. obj = obj->clone(); blockOop(obj)->kill_block(); } graph_maps->update(obj->map()->enclosing_mapOop(), obj); } }
void findNMethodsFor(oop b) { // for debugging if (!b->is_block()) { lprintf("(warning: not a block)\n"); } map_to_find = b->map()->enclosing_mapOop(); Memory->code->nmethods_do(findBlkFn); }
FSelfScope::FSelfScope(bool d, MethodLookupKey *key, oop method) : FScope(d) { _key = key; _method = method; method_map = (methodMap *) method->map(); fint codeLength = method_map->length_codes(); fint slotsLength = method_map->length_slots(); args = new LocationList(slotsLength); locals = new LocationList(slotsLength); exprStack = new LocationList(codeLength); blocks = new BlockLocationList(codeLength); nlrPoints = new LabelList(codeLength + 1); nlrPoints->append(NULL); bool got_one; method_map->branch_targets(got_one, &branchTargetFlags); if (got_one) { branchTargets = new LabelList(branchTargetFlags->length()); for ( int32 i = 0, n = branchTargetFlags->length(); i < n; ++i) branchTargets->nthPut(i, new Label(theCodeGen->a.printing, NULL), true); } else { branchTargets = NULL; } initializedBlockLocations = NULL; frequentPreemption = theCompiler->generateDebugCode; // If doing consistent stack alloc for branches, must also // be sure to copy fixed values when pushing -- dmu allowPrimitivesToAlterExpressionStack = theCompiler->generateDebugCode; memoizeAllBlockZaps = theCompiler->generateDebugCode || got_one; initBlocksInPrologue = got_one; // VM expects to be able to create memoized blocks and put them in // locations pointed to by debugging info. // Since VM gets block locs from expr stack debug info, we // must create all "memoized" blocks. createMemoizedBlocks = theCompiler->generateDebugCode; branchTargetExprStack = new LocationList(codeLength); allocs = new RegisterState(slotsLength + codeLength); _scopeID = 0; scopeDescs = theCodeGen->scopeDescs; foundLoop = false; need_epilogue = true; }