[svn:parrot] r48922 - in branches/hash_inlined_func: runtime/parrot/library src src/gc src/pmc
luben at svn.parrot.org
luben at svn.parrot.org
Fri Sep 10 22:13:54 UTC 2010
Author: luben
Date: Fri Sep 10 22:13:54 2010
New Revision: 48922
URL: https://trac.parrot.org/parrot/changeset/48922
Log:
Track master
Modified:
branches/hash_inlined_func/runtime/parrot/library/P6object.pir
branches/hash_inlined_func/src/gc/system.c
branches/hash_inlined_func/src/namespace.c
branches/hash_inlined_func/src/pmc/nativepccmethod.pmc
branches/hash_inlined_func/src/pmc/object.pmc
Modified: branches/hash_inlined_func/runtime/parrot/library/P6object.pir
==============================================================================
--- branches/hash_inlined_func/runtime/parrot/library/P6object.pir Fri Sep 10 21:59:53 2010 (r48921)
+++ branches/hash_inlined_func/runtime/parrot/library/P6object.pir Fri Sep 10 22:13:54 2010 (r48922)
@@ -260,6 +260,9 @@
.local pmc methodpmc
methodname = shift methoditer
methodpmc = methods[methodname]
+ # don't add NativePCCMethods
+ $I0 = isa methodpmc, 'NativePCCMethod'
+ if $I0 goto method_loop
# don't add NCI methods (they don't work)
$I0 = isa methodpmc, 'NCI'
if $I0 goto method_loop
Modified: branches/hash_inlined_func/src/gc/system.c
==============================================================================
--- branches/hash_inlined_func/src/gc/system.c Fri Sep 10 21:59:53 2010 (r48921)
+++ branches/hash_inlined_func/src/gc/system.c Fri Sep 10 22:13:54 2010 (r48922)
@@ -453,8 +453,8 @@
prefix = mask & buffer_min;
for (cur_var_ptr = hi_var_ptr;
- (ptrdiff_t)cur_var_ptr < (ptrdiff_t)lo_var_ptr;
- cur_var_ptr = (size_t)((ptrdiff_t)cur_var_ptr + sizeof (void *))) {
+ (ptrdiff_t)cur_var_ptr < (ptrdiff_t)lo_var_ptr;
+ cur_var_ptr = (size_t)((ptrdiff_t)cur_var_ptr + sizeof (void *))) {
const size_t ptr = *(size_t *)cur_var_ptr;
/* Do a quick approximate range check by bit-masking */
@@ -463,14 +463,14 @@
* guaranteed to be live pmcs/buffers, and could very well have
* had their bufstart/vtable destroyed due to the linked list of
* free headers... */
- if ((pmc_min <= ptr) && (ptr < pmc_max) && is_pmc_ptr(mem_pools, (void *)ptr)) {
- Parrot_gc_mark_PObj_alive(interp, (PObj *)ptr);
+ if ((pmc_min <= ptr)
+ && (ptr < pmc_max)
+ && is_pmc_ptr(mem_pools, (void *)ptr)) {
+ Parrot_gc_mark_PMC_alive(interp, (PMC *)ptr);
}
- else if ((buffer_min <= ptr) && (ptr < buffer_max) &&
- is_buffer_ptr(mem_pools, (void *)ptr)) {
- /* ...and since Parrot_gc_mark_PObj_alive doesn't care about bufstart, it
- * doesn't really matter if it sets a flag */
- Parrot_gc_mark_PObj_alive(interp, (PObj *)ptr);
+ else if ((buffer_min <= ptr) && (ptr < buffer_max)
+ && is_buffer_ptr(mem_pools, (void *)ptr)) {
+ Parrot_gc_mark_STRING_alive(interp, (STRING *)ptr);
}
}
}
Modified: branches/hash_inlined_func/src/namespace.c
==============================================================================
--- branches/hash_inlined_func/src/namespace.c Fri Sep 10 21:59:53 2010 (r48921)
+++ branches/hash_inlined_func/src/namespace.c Fri Sep 10 22:13:54 2010 (r48922)
@@ -203,12 +203,12 @@
{
ASSERT_ARGS(internal_ns_keyed)
- if (VTABLE_isa(interp, pmc_key, CONST_STRING(interp, "String"))) {
+ if (PMC_IS_TYPE(pmc_key, Key))
+ return internal_ns_keyed_key(interp, base_ns, pmc_key, flags);
+ else if (VTABLE_isa(interp, pmc_key, CONST_STRING(interp, "String"))) {
STRING * const str_key = VTABLE_get_string(interp, pmc_key);
return internal_ns_keyed_str(interp, base_ns, str_key, flags);
}
- else if (PMC_IS_TYPE(pmc_key, Key))
- return internal_ns_keyed_key(interp, base_ns, pmc_key, flags);
else {
/* array of strings */
STRING * const isans = CONST_STRING(interp, "NameSpace");
Modified: branches/hash_inlined_func/src/pmc/nativepccmethod.pmc
==============================================================================
--- branches/hash_inlined_func/src/pmc/nativepccmethod.pmc Fri Sep 10 21:59:53 2010 (r48921)
+++ branches/hash_inlined_func/src/pmc/nativepccmethod.pmc Fri Sep 10 22:13:54 2010 (r48922)
@@ -20,7 +20,7 @@
/* HEADERIZER HFILE: none */
-pmclass NativePCCMethod auto_attrs {
+pmclass NativePCCMethod auto_attrs provides invokable {
ATTR STRING *signature;
ATTR void *func;
Modified: branches/hash_inlined_func/src/pmc/object.pmc
==============================================================================
--- branches/hash_inlined_func/src/pmc/object.pmc Fri Sep 10 21:59:53 2010 (r48921)
+++ branches/hash_inlined_func/src/pmc/object.pmc Fri Sep 10 22:13:54 2010 (r48922)
@@ -677,10 +677,11 @@
*/
VTABLE INTVAL isa(STRING *classname) {
- if (SUPER(classname))
+ if (SELF->vtable->whoami == classname
+ || Parrot_str_equal(INTERP, SELF->vtable->whoami, classname))
return 1;
else {
- PMC * _class = VTABLE_get_class(INTERP, SELF);
+ PMC *_class = PARROT_OBJECT(SELF)->_class;
return VTABLE_isa(INTERP, _class, classname);
}
}
More information about the parrot-commits
mailing list