[svn:parrot] r39979 - in branches/tt761_keys_revamp/src: . ops pmc string

bacek at svn.parrot.org bacek at svn.parrot.org
Fri Jul 10 21:37:16 UTC 2009


Author: bacek
Date: Fri Jul 10 21:37:14 2009
New Revision: 39979
URL: https://trac.parrot.org/parrot/changeset/39979

Log:
Bah

Modified:
   branches/tt761_keys_revamp/src/hash.c
   branches/tt761_keys_revamp/src/ops/object.ops
   branches/tt761_keys_revamp/src/ops/pmc.ops
   branches/tt761_keys_revamp/src/pmc/class.pmc
   branches/tt761_keys_revamp/src/pmc/default.pmc
   branches/tt761_keys_revamp/src/pmc/parrotlibrary.pmc
   branches/tt761_keys_revamp/src/string/api.c

Modified: branches/tt761_keys_revamp/src/hash.c
==============================================================================
--- branches/tt761_keys_revamp/src/hash.c	Fri Jul 10 14:56:27 2009	(r39978)
+++ branches/tt761_keys_revamp/src/hash.c	Fri Jul 10 21:37:14 2009	(r39979)
@@ -724,6 +724,8 @@
     const UINTVAL old_nb   = N_BUCKETS(old_size);
     size_t        offset, i, new_loc;
 
+    Parrot_block_GC_mark(interp);
+
     /*
        allocate some less buckets
        e.g. 3 buckets, 4 pointers:
@@ -816,6 +818,7 @@
         hash->free_list = b;
     }
 
+    Parrot_unblock_GC_mark(interp);
 }
 
 
@@ -1303,6 +1306,8 @@
     const UINTVAL hashval = (hash->hash_val)(interp, key, hash->seed);
     HashBucket   *bucket  = hash->bi[hashval & hash->mask];
 
+    Parrot_block_GC_mark(interp);
+
     while (bucket) {
         /* store hash_val or not */
         if ((hash->compare)(interp, key, bucket->key) == 0)
@@ -1339,6 +1344,8 @@
         hash->bi[hashval & hash->mask] = bucket;
     }
 
+    Parrot_unblock_GC_mark(interp);
+
     return bucket;
 }
 

Modified: branches/tt761_keys_revamp/src/ops/object.ops
==============================================================================
--- branches/tt761_keys_revamp/src/ops/object.ops	Fri Jul 10 14:56:27 2009	(r39978)
+++ branches/tt761_keys_revamp/src/ops/object.ops	Fri Jul 10 21:37:14 2009	(r39979)
@@ -70,7 +70,7 @@
     else {
       dest = Parrot_ex_throw_from_op_args(interp, next,
           EXCEPTION_METHOD_NOT_FOUND,
-          "Method '%Ss' not found for invocant of class '%Ss'", meth,
+          "2 Method '%Ss' not found for invocant of class '%Ss'", meth,
           VTABLE_get_string(interp, _class));
     }
   }
@@ -107,7 +107,7 @@
 
   if (PMC_IS_NULL(method_pmc)) {
     dest = Parrot_ex_throw_from_op_args(interp, next, EXCEPTION_METHOD_NOT_FOUND,
-        "Method '%Ss' not found for invocant of class '%Ss'", meth,
+        "3 Method '%Ss' not found for invocant of class '%Ss'", meth,
         VTABLE_get_string(interp, VTABLE_get_class(interp, object)));
   }
   else {
@@ -141,7 +141,7 @@
 
   if (PMC_IS_NULL(method_pmc)) {
     dest = Parrot_ex_throw_from_op_args(interp, next, EXCEPTION_METHOD_NOT_FOUND,
-        "Method '%Ss' not found for invocant of class '%Ss'", meth,
+        "4 Method '%Ss' not found for invocant of class '%Ss'", meth,
         VTABLE_get_string(interp, VTABLE_get_class(interp, object)));
   }
   else {

Modified: branches/tt761_keys_revamp/src/ops/pmc.ops
==============================================================================
--- branches/tt761_keys_revamp/src/ops/pmc.ops	Fri Jul 10 14:56:27 2009	(r39978)
+++ branches/tt761_keys_revamp/src/ops/pmc.ops	Fri Jul 10 21:37:14 2009	(r39979)
@@ -234,7 +234,7 @@
     if (PMC_IS_NULL($1) || !VTABLE_defined(interp, $1)) {
         opcode_t *dest = Parrot_ex_throw_from_op_args(interp, resume,
             EXCEPTION_METHOD_NOT_FOUND,
-            "Method '%Ss' not found for invocant of class '%Ss'", $3,
+            "1 Method '%Ss' not found for invocant of class '%Ss'", $3,
             VTABLE_get_string(interp, VTABLE_get_class(interp, $2)));
         goto ADDRESS(dest);
     }

Modified: branches/tt761_keys_revamp/src/pmc/class.pmc
==============================================================================
--- branches/tt761_keys_revamp/src/pmc/class.pmc	Fri Jul 10 14:56:27 2009	(r39978)
+++ branches/tt761_keys_revamp/src/pmc/class.pmc	Fri Jul 10 21:37:14 2009	(r39979)
@@ -496,7 +496,7 @@
         _class->resolve_method  = pmc_new(interp, enum_class_ResizablePMCArray);
 
         _class->vtable_overrides = pmc_new(interp, enum_class_Hash);
-        _class->parent_overrides = constant_pmc_new(interp, enum_class_Hash);
+        _class->parent_overrides = pmc_new(interp, enum_class_Hash);
 
         /* We put ourself on the all parents list. */
         VTABLE_push_pmc(interp, _class->all_parents, SELF);

Modified: branches/tt761_keys_revamp/src/pmc/default.pmc
==============================================================================
--- branches/tt761_keys_revamp/src/pmc/default.pmc	Fri Jul 10 14:56:27 2009	(r39978)
+++ branches/tt761_keys_revamp/src/pmc/default.pmc	Fri Jul 10 21:37:14 2009	(r39979)
@@ -234,6 +234,7 @@
     PMC_metadata(self) = prop = pmc_new(interp, enum_class_Hash);
     GC_WRITE_BARRIER(interp, self, NULL, prop);
     propagate_std_props(interp, self, prop);
+    PObj_is_special_PMC_SET(self);
     return prop;
 }
 

Modified: branches/tt761_keys_revamp/src/pmc/parrotlibrary.pmc
==============================================================================
--- branches/tt761_keys_revamp/src/pmc/parrotlibrary.pmc	Fri Jul 10 14:56:27 2009	(r39978)
+++ branches/tt761_keys_revamp/src/pmc/parrotlibrary.pmc	Fri Jul 10 21:37:14 2009	(r39979)
@@ -50,6 +50,7 @@
             mem_allocate_zeroed_typed(Parrot_ParrotLibrary_attributes);
         PMC_data(SELF) = attrs;
         PObj_active_destroy_SET(SELF);
+        PObj_is_special_PMC_SET(SELF);
     }
 
 /*

Modified: branches/tt761_keys_revamp/src/string/api.c
==============================================================================
--- branches/tt761_keys_revamp/src/string/api.c	Fri Jul 10 14:56:27 2009	(r39978)
+++ branches/tt761_keys_revamp/src/string/api.c	Fri Jul 10 21:37:14 2009	(r39979)
@@ -683,10 +683,10 @@
 
     s = Parrot_str_new_init(interp, buffer, strlen(buffer),
                        PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
-                       PObj_external_FLAG|PObj_constant_FLAG);
+                       PObj_constant_FLAG);
 
     parrot_hash_put(interp, cstring_cache,
-        PARROT_const_cast(char *, buffer), (void *)s);
+        PARROT_const_cast(char *, s->strstart), (void *)s);
 
     return s;
 }


More information about the parrot-commits mailing list