Bug 849302 - Allow rooting of IonCode objects. r=terrence

This commit is contained in:
Kannan Vijayan 2013-03-09 11:02:51 -05:00
Родитель 6d21fc6e27
Коммит 273a41dfae
3 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -27,6 +27,7 @@
#include "jsgcinlines.h" #include "jsgcinlines.h"
#include "jsobjinlines.h" #include "jsobjinlines.h"
#include "ion/IonCode.h"
#ifdef MOZ_VALGRIND #ifdef MOZ_VALGRIND
# include <valgrind/memcheck.h> # include <valgrind/memcheck.h>
@ -60,6 +61,7 @@ MarkExactStackRoot(JSTracer *trc, Rooted<void*> *rooter, ThingRootKind kind)
case THING_ROOT_BASE_SHAPE: MarkBaseShapeRoot(trc, (BaseShape **)addr, "exact-baseshape"); break; case THING_ROOT_BASE_SHAPE: MarkBaseShapeRoot(trc, (BaseShape **)addr, "exact-baseshape"); break;
case THING_ROOT_TYPE: MarkTypeRoot(trc, (types::Type *)addr, "exact-type"); break; case THING_ROOT_TYPE: MarkTypeRoot(trc, (types::Type *)addr, "exact-type"); break;
case THING_ROOT_TYPE_OBJECT: MarkTypeObjectRoot(trc, (types::TypeObject **)addr, "exact-typeobject"); break; case THING_ROOT_TYPE_OBJECT: MarkTypeObjectRoot(trc, (types::TypeObject **)addr, "exact-typeobject"); break;
case THING_ROOT_ION_CODE: MarkIonCodeRoot(trc, (ion::IonCode **)addr, "exact-ioncode"); break;
case THING_ROOT_VALUE: MarkValueRoot(trc, (Value *)addr, "exact-value"); break; case THING_ROOT_VALUE: MarkValueRoot(trc, (Value *)addr, "exact-value"); break;
case THING_ROOT_ID: MarkIdRoot(trc, (jsid *)addr, "exact-id"); break; case THING_ROOT_ID: MarkIdRoot(trc, (jsid *)addr, "exact-id"); break;
case THING_ROOT_PROPERTY_ID: MarkIdRoot(trc, &((js::PropertyId *)addr)->asId(), "exact-propertyid"); break; case THING_ROOT_PROPERTY_ID: MarkIdRoot(trc, &((js::PropertyId *)addr)->asId(), "exact-propertyid"); break;

Просмотреть файл

@ -134,6 +134,7 @@ class IonCode : public gc::Cell
static void readBarrier(IonCode *code); static void readBarrier(IonCode *code);
static void writeBarrierPre(IonCode *code); static void writeBarrierPre(IonCode *code);
static void writeBarrierPost(IonCode *code, void *addr); static void writeBarrierPost(IonCode *code, void *addr);
static inline ThingRootKind rootKind() { return THING_ROOT_ION_CODE; }
}; };
class SnapshotWriter; class SnapshotWriter;

Просмотреть файл

@ -228,6 +228,7 @@ enum ThingRootKind
THING_ROOT_BASE_SHAPE, THING_ROOT_BASE_SHAPE,
THING_ROOT_TYPE_OBJECT, THING_ROOT_TYPE_OBJECT,
THING_ROOT_STRING, THING_ROOT_STRING,
THING_ROOT_ION_CODE,
THING_ROOT_SCRIPT, THING_ROOT_SCRIPT,
THING_ROOT_ID, THING_ROOT_ID,
THING_ROOT_PROPERTY_ID, THING_ROOT_PROPERTY_ID,