From 753b90a81168857f9cfb53e3162305fe5338a5d6 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 17 Jul 2011 19:48:28 -0600 Subject: [PATCH] request an object mask when allocating a singleton Singletons may have embedded object references, and if they are allocated at fixed memory locations (e.g. if they are larger than 64KB), they must have object masks so the garbage collector knows were to find said references. --- src/type-generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/type-generator.cpp b/src/type-generator.cpp index d6d8adf313..626573af8e 100644 --- a/src/type-generator.cpp +++ b/src/type-generator.cpp @@ -1911,7 +1911,7 @@ writeConstructors(Output* out, Object* declarations) out->write(")\n{\n"); - bool hasObjectMask = false; + bool hasObjectMask = strcmp(typeName(o), "singleton") == 0; for (MemberIterator it(o); it.hasMore();) { Object* m = it.next(); if (m->type == Object::Scalar