src/Zone.h
changeset 251 ca99a81745fe
parent 250 0998a43cc155
child 263 ba85a47ee414
     1.1 --- a/src/Zone.h	Sat Dec 29 00:55:38 2012 -0800
     1.2 +++ b/src/Zone.h	Tue Jan 01 15:34:07 2013 -0800
     1.3 @@ -38,6 +38,7 @@
     1.4  class ArrayMap;
     1.5  class Exception;
     1.6  class NativeTable;
     1.7 +class PackageCache;
     1.8  
     1.9  class Zone
    1.10  {
    1.11 @@ -54,6 +55,7 @@
    1.12      StringPool *symbols_;
    1.13      GlobalRoots *globalRoots_;
    1.14      NativeTable *nativeTable_;
    1.15 +    PackageCache *packages_;
    1.16  
    1.17      // Root list.
    1.18      Local<Object> *lastLocalRoot_;
    1.19 @@ -129,6 +131,9 @@
    1.20      NativeTable *nativeTable() {
    1.21          return nativeTable_;
    1.22      }
    1.23 +    PackageCache *packages() {
    1.24 +        return packages_;
    1.25 +    }
    1.26  
    1.27      String *makeSymbol(const char *string, size_t length);
    1.28      String *makeSymbol(const char *string);
    1.29 @@ -150,6 +155,10 @@
    1.30      void setPublicFunctionListener(Ke::IPublicFunctionListener *listener);
    1.31      void registerPublic(Handle<Function> fun);
    1.32      void unregisterPublic(Handle<Function> fun);
    1.33 +
    1.34 +    // Helpers that report OOM.
    1.35 +    void *malloc(size_t size);
    1.36 +    void *realloc(void *ptr, size_t size);
    1.37  };
    1.38  
    1.39  // In a multi-threaded system, this would be a TLS variable.