jitcraft/Modules.h
changeset 68 b40b0e18a918
parent 64 11c81eb30246
child 70 1aec996cde2d
     1.1 --- a/jitcraft/Modules.h	Mon Jul 09 22:25:52 2012 -0700
     1.2 +++ b/jitcraft/Modules.h	Tue Jul 10 02:11:13 2012 -0700
     1.3 @@ -28,6 +28,8 @@
     1.4  {
     1.5      Barriered<FixedArray> functions_;
     1.6      Barriered<FixedArray> publics_;
     1.7 +    Barriered<FixedArray> natives_;
     1.8 +    void *nativeIdentity_;
     1.9  
    1.10    public:
    1.11      static Module *New(Zone *zone, unsigned nfunctions);
    1.12 @@ -44,9 +46,23 @@
    1.13      FixedArray *publics() {
    1.14          return publics_;
    1.15      }
    1.16 +    FixedArray *natives() {
    1.17 +        return natives_;
    1.18 +    }
    1.19 +
    1.20      void setPublics(Handle<FixedArray> publics) {
    1.21          publics_ = publics;
    1.22      }
    1.23 +    void setNatives(Handle<FixedArray> natives) {
    1.24 +        natives_ = natives;
    1.25 +    }
    1.26 +
    1.27 +    void *nativeIdentity() {
    1.28 +        return nativeIdentity_;
    1.29 +    }
    1.30 +    void setNativeIdentity(void *identity) {
    1.31 +        nativeIdentity_ = identity;
    1.32 +    }
    1.33  
    1.34      // Begin GC Descriptor.
    1.35      static inline size_t offsetOfFunctions() {
    1.36 @@ -55,6 +71,9 @@
    1.37      static inline size_t offsetOfPublics() {
    1.38          return offsetof(Module, publics_);
    1.39      }
    1.40 +    static inline size_t offsetOfNatives() {
    1.41 +        return offsetof(Module, natives_);
    1.42 +    }
    1.43      // End GC Descriptor.
    1.44  
    1.45      static inline Module *cast(Object *obj) {