help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Adding data to OOPs


From: Lyndon Tremblay
Subject: [Help-smalltalk] Adding data to OOPs
Date: Sun, 04 Jul 2004 08:32:48 +0800

I would like to add one pointer before all OOP types...

I've thought of something like:

#define OBJ_HEADER \
  struct objc_class   *isa; \
  OOP  objSize; \
  OOP  objClass

And it should be alright from here, with mst_Object and gst_object_header
being sized somewhat correctly for GST memory management. As you can see it
is a Smalltalk <-> Objective-C bridge I developed, which I am moving almost
directly into GST for this project. Actually, it would be ince if objClass
was the first, and could transparently act as OOP class and ObjC Class...

Paolo if you are interested, the bridge currently works both ways. Here is a
list:
- A method implemented in a subclass in ObjC, is not supported.
- Class methods are not implemented.
- ObjC @interface declarations are required for calling methods to
Smalltalk.
- An efficient way of having all Smalltalk kernel classes within ObjC
dynamically and/or automatically is not completed. (ClassExporter is written
to export Smalltalk classes to ObjC... but not quite what I want)
- Very bad doesNotImplement recursion is possible =)
- [self error:] in ObjC returns to Smalltalk for reporting, but backtracing
is useless/not available here.

And other things I haven't worked on... Also planned is a file type merging
of .m .h and .st, with an Emacs mode.


--humasect





reply via email to

[Prev in Thread] Current Thread [Next in Thread]