Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Strange behaviour in Make object?

From: media:quazart at: 13-Nov-2001 9:10

Exactly, this applies to ALL objects, not just view. Since view is object built, then it follows the same rules as any other object... I think I've understood what happens and it seems as if they store a vector list. This is an array of offsets from the base object address which in turn point to other areas in memory. each position is fixed in order to make this system speedy. Especially since most compilers/assemblers have instructions to calculate offset resolution in one opcode (usually one machine instruction). The amiga's library system is built almost exactly like this. It would be consistent with Carl, and why change something that works well and fast!? In rebol, I guess they build this vector list the first time the object is defined and then just link to it everytime. Then, when a new object is cloned and the template changes, I guess they just allocate a new vector list with new fields APPENDED... this would make any cloned objects completely safe to use with "parent" objects this also looks like the Amiga library system which had two modes... the first one returned the same data segement everytime and thus all applications SHARED the same data, and another one where every call to open library returned a NEW data segment but with the same vector jumplist... this second mode looks almost like a direct translation to rebol objects... AS usual, these are just my observations... not explicit RT answers... hope this makes sense to all... -MAx