return &hdr->frames[++thread->orbstack_top];
}
-
- u32 IDSpace::rlookup(Object *obj)
+
+ ObjectHdr *IDSpace::get_local_hdr(Object *obj)
{
-#if 0
- ObjectHdr *hdr = idtree.find(obj);
+ ObjectHdr *hdr = *rmap.lookup(obj->id);
+ if (hdr)
+ return hdr;
- if (!hdr)
- return 0;
+ int id = alloc.alloc();
+ ObjectPtr *ptr = &table.lookup(id, true)->ptr;
+
+ ptr->id = id;
+ ptr->flags = 0;
+ ptr->Pointer = 1;
+ ptr->object = obj;
+
+ *rmap.lookup(id, true) = ptr;
+ return ptr;
+ }
+
+ Object *IDSpace::newobj(Mem::ProcAddrSpace *aspace, uintptr_t entry)
+ {
+ int id = alloc.alloc();
+ Object *obj = &table.lookup(id, true)->obj;
+
+ obj->id = id;
+ obj->flags = 0;
+ obj->aspace = aspace;
+ obj->entry = entry;
- return hdr->id;
-#endif
- return 0;
+ return obj;
}
-}
-extern "C" void invoke_method(u32 objid, u32 methid, ParamInfoBlock *user_pib,
- ulong ret_pc)
-{
- ParamInfoBlock pib = Arch::copyin(user_pib);
- CallFrame *frame = new_frame(curthread);
-
- frame->object = objid;
- frame->method = methid;
- frame->caller_user_pib = user_pib;
- frame->ret_pc = ret_pc;
-
- printf("invoke_method: frame %p object %x method %x pib %p ret %lx\n",
- frame, frame->object, frame->method, frame->caller_user_pib,
- frame->ret_pc);
-
+ void invoke_method(ParamInfoBlock *user_pib, uintptr_t &stack)
+ {
+ ParamInfoBlock pib = Arch::copyin(user_pib);
+ CallFrame *frame = new_frame(curthread);
+
+// if (pib->objlist_len == 0)
+
+
+// frame->object = objid;
+ frame->caller_user_pib = user_pib;
+// frame->ret_pc = ret_pc;
+
+ printf("invoke_method: frame %p pib %p ret %lx\n",
+ frame, frame->caller_user_pib,
+ frame->ret_pc);
+
+
+ }
+ uintptr_t return_from_method(uintptr_t &exptr, size_t &exlen)
+ {
+ return 0;
+ }
}