[strongtalk] r176 committed - Merge in class instance variable fixes

1 view
Skip to first unread message

codesite...@google.com

unread,
Oct 10, 2009, 8:26:14 PM10/10/09
to strongta...@googlegroups.com
Revision: 176
Author: StephenLRees
Date: Sat Oct 10 17:23:44 2009
Log: Merge in class instance variable fixes
http://code.google.com/p/strongtalk/source/detail?r=176

Added:
/branches/gcc-linux/StrongtalkSource/ClassTest.dlt
/branches/gcc-linux/StrongtalkSource/base test.gr
/branches/gcc-linux/test/memory/memOopAllocationTests.cpp
Modified:
/branches/gcc-linux/StrongtalkSource/Class.dlt
/branches/gcc-linux/StrongtalkSource/ClassMirror.dlt
/branches/gcc-linux/StrongtalkSource/MixinDeclMirror.dlt
/branches/gcc-linux/StrongtalkSource/SourceHandler.dlt
/branches/gcc-linux/StrongtalkSource/world.gr
/branches/gcc-linux/test/memory/memOopKlassTests.cpp
/branches/gcc-linux/vm/interpreter/prettyPrinter.cpp
/branches/gcc-linux/vm/oops/klass.cpp
/branches/gcc-linux/vm/oops/klass.hpp
/branches/gcc-linux/vm/oops/memOopKlass.cpp
/branches/gcc-linux/vm/oops/memOopKlass.hpp

=======================================
--- /dev/null
+++ /branches/gcc-linux/StrongtalkSource/ClassTest.dlt Sat Oct 10 17:23:44
2009
@@ -0,0 +1,46 @@
+Delta define: #ClassTest as: (
+(Class subclassOf: 'TestCase' instanceVariables: '')) !
+
+(Delta mirrorFor: #ClassTest) revision: '$Revision:$'!
+
+(Delta mirrorFor: #ClassTest) group: 'base test'!
+
+(Delta mirrorFor: #ClassTest)
+comment:
+''!
+
+! (Delta mirrorFor: #ClassTest) methodsFor: 'fixture' !
+
+
+tearDown
+
+ self classFixture isNil
+ ifFalse: [(Mirror on: self classFixture) removeDefinitionIfFail: [:err|
self signalFailure: err]]! !
+
+! (Delta mirrorFor: #ClassTest) methodsFor: 'testing' !
+
+
+classFixture
+
+ ^Smalltalk at: self fixtureClassName ifAbsent: []!
+
+fixtureClassName
+
+ ^#ClassTestIvars123!
+
+testCreateClassWithInstanceAndClassInstanceVariables
+
+ |mirror|
+ self assert: self classFixture isNil.
+
+ Delta define: self fixtureClassName as: (
+ Class subclassOf: 'Object'
+ instanceVariables: 'one'
+ classInstanceVariables: 'two three').
+
+ self deny: self classFixture isNil.
+
+ mirror := Mirror on: self classFixture.
+ self assert: mirror classInstanceVariableString = 'two three'.
+ self assert: mirror instanceVariableString = 'one'! !
+
=======================================
--- /dev/null
+++ /branches/gcc-linux/StrongtalkSource/base test.gr Sat Oct 10 17:23:44
2009
@@ -0,0 +1,2 @@
+$Revision:$!
+Delta fileIn: 'ClassTest.dlt' !
=======================================
--- /dev/null
+++ /branches/gcc-linux/test/memory/memOopAllocationTests.cpp Sat Oct 10
17:23:44 2009
@@ -0,0 +1,39 @@
+# include "incls/_precompiled.incl"
+# include "incls/_klassOop.cpp.incl"
+#include "handle.hpp"
+#include "test.h"
+
+using namespace easyunit;
+
+extern "C" oop* eden_top;
+extern "C" oop* eden_end;
+
+DECLARE(MemOopAllocationTests)
+ klassOop theClass;
+ oop* oldEdenTop;
+END_DECLARE
+
+SETUP(MemOopAllocationTests) {
+ theClass = klassOop(Universe::find_global("Object"));
+ oldEdenTop = eden_top;
+}
+
+TEARDOWN(MemOopAllocationTests){
+ eden_top = oldEdenTop;
+ MarkSweep::collect();
+}
+
+TESTF(MemOopAllocationTests, allocateShouldFailWhenAllowedAndNoSpace) {
+ eden_top = eden_end;
+ ASSERT_EQUALS((int)NULL,
(int)(theClass->klass_part()->allocateObject(false)));
+}
+
+TESTF(MemOopAllocationTests, allocateShouldAllocateTenuredWhenRequired) {
+
ASSERT_TRUE(Universe::old_gen.contains(theClass->klass_part()->allocateObject(false,
true)));
+}
+
+TESTF(MemOopAllocationTests,
allocateShouldNotFailWhenNotAllowedAndNoSpace) {
+ eden_top = eden_end;
+ ASSERT_TRUE(Universe::new_gen.eden()->free() < 4 * oopSize);
+
ASSERT_TRUE(Universe::new_gen.contains(theClass->klass_part()->allocateObject(true)));
+}
=======================================
--- /branches/gcc-linux/StrongtalkSource/Class.dlt Sat Nov 1 12:10:49 2008
+++ /branches/gcc-linux/StrongtalkSource/Class.dlt Sat Oct 10 17:23:44 2009
@@ -26,9 +26,21 @@

subclassOf: superRef <Str> instanceVariables: instVarsString <Str> ^
<ClassMirror>
"Creation of a Delta class constructor"
+
+ ^self subclassOf: superRef
+ instanceVariables: instVarsString
+ classInstanceVariables: ''!
+
+subclassOf: superRef <Str>
+instanceVariables: instVarsString <Str>
+classInstanceVariables: classInstVarsString <Str> ^ <ClassMirror>
+ "Creation of a Delta class constructor"
| c <ClassMirror> |

-c := ClassMirror subclassOf: superRef instanceVariables: instVarsString.
+c := ClassMirror
+ subclassOf: superRef
+ instanceVariables: instVarsString
+ classInstanceVariables: classInstVarsString.
AbstractClassMirror flushSubclassHierarchyCache.
^c! !

=======================================
--- /branches/gcc-linux/StrongtalkSource/ClassMirror.dlt Sun Sep 13
14:52:44 2009
+++ /branches/gcc-linux/StrongtalkSource/ClassMirror.dlt Sat Oct 10
17:23:44 2009
@@ -30,7 +30,13 @@
^ClassVMMirror sort: cs!

subclassOf: s <Str> instanceVariables: instVars <Str> ^ <Instance>
- ^self new initializeSubclassOf: s instanceVariables: instVars! !
+ ^self new initializeSubclassOf: s instanceVariables: instVars!
+
+subclassOf: s <Str> instanceVariables: instVars <Str>
classInstanceVariables: classInstVars <Str> ^ <Instance>
+ ^self new
+ initializeSubclassOf: s
+ instanceVariables: instVars
+ classInstanceVariables: classInstVars! !

! (Delta mirrorFor: #ClassMirror) methodsFor: 'Unclassified' !

@@ -73,11 +79,16 @@
self mixin instanceVariableString isEmpty ifFalse: [
stream nextPutAll: ' instanceVariables: '.
stream nextPutAll: self mixin instanceVariableString asString
printString]]
- ifFalse: [
+ ifFalse: [|classInstVars|
stream nextPutAll: '(Class subclassOf: '.
stream nextPutAll: self mixin superclassTypeString asString printString.
stream nextPutAll: ' instanceVariables: '.
- stream nextPutAll: self mixin instanceVariableString asString
printString, ')'].
+ stream nextPutAll: self mixin instanceVariableString asString
printString.
+ classInstVars := self mixin classSide instanceVariableString.
+ classInstVars isEmpty
+ ifFalse: [stream nextPutAll: ' classInstanceVariables: '.
+ stream nextPutAll: self mixin classSide instanceVariableString
asString printString].
+ stream nextPutAll: ')'].

first := true.
classVarStr isEmpty ifFalse: [
@@ -113,6 +124,14 @@
self mixin branded: b.
!

+classInstanceVariableString
+
+ ^self mixin classSide instanceVariableString!
+
+classInstanceVariables: iv <Str>
+
+self mixin classSide instanceVariables: iv!
+
classProtocols: p <Str>

self mixin classProtocols: p!
@@ -287,6 +306,13 @@
self superclass: s.
self instanceVariables: instVars!

+initializeSubclassOf: s <Str> instanceVariables: instVars <Str>
classInstanceVariables: classInstVars <Str>
+
+ self initialize.
+ self superclass: s.
+ self instanceVariables: instVars.
+ self classInstanceVariables: classInstVars!
+
installed ^ <Boolean>
"Private"
^self mixin installed!
=======================================
--- /branches/gcc-linux/StrongtalkSource/MixinDeclMirror.dlt Sun Sep 13
14:52:44 2009
+++ /branches/gcc-linux/StrongtalkSource/MixinDeclMirror.dlt Sat Oct 10
17:23:44 2009
@@ -242,6 +242,7 @@
classVariables: self
classVariableString;
protocols: self
supportedProtocolString;
classProtocols: self classSide
supportedProtocolString.
+newBody classInstanceVariables: self classSide instanceVariableString.

self isAbstract ifTrue:[newBody abstract].
self extensionsAreSubtypes ifFalse:[newBody extensionsAreNotSubtypes].
=======================================
--- /branches/gcc-linux/StrongtalkSource/SourceHandler.dlt Sat Nov 1
12:10:49 2008
+++ /branches/gcc-linux/StrongtalkSource/SourceHandler.dlt Sat Oct 10
17:23:44 2009
@@ -639,10 +639,7 @@

indexDict ^ <Dictionary[Symbol,Cltn[Str]]>

- indexDict isNil ifTrue: [
- self indexDict: Dictionary[Symbol,Cltn[String]] new.
- self isPersistent ifTrue: [
- self parseIndexFile ] ].
+ self initIndexDict.
^indexDict!

indexDict: i <Dictionary[Symbol,Cltn[Str]]>
@@ -678,6 +675,13 @@
ifFalse: [ s ]
!

+initIndexDict ^ <Dictionary[Symbol,Cltn[Str]]>
+
+ indexDict isNil ifTrue: [
+ self indexDict: Dictionary[Symbol,Cltn[String]] new.
+ self isPersistent ifTrue: [
+ self parseIndexFile ] ]!
+
isMeta ^ <Boolean>

^self mirror isMeta!
@@ -808,6 +812,7 @@
storeIndexFile

| ws <CharOutputStream> |
+ self initIndexDict.
self makeBackupIndex.
BootStrapping
ifTrue: [ ws := self indexFile charOutputStream ]
=======================================
--- /branches/gcc-linux/StrongtalkSource/world.gr Mon Sep 28 16:51:43 2009
+++ /branches/gcc-linux/StrongtalkSource/world.gr Sat Oct 10 17:23:44 2009
@@ -212,6 +212,7 @@
Delta fileIn: 'Mixin.dlt' !
Delta fileIn: 'ClassMixin.dlt' !
Delta fileIn: 'ClassOutliner.dlt' !
+Delta fileIn: 'ClassTest.dlt' !
Delta fileIn: 'DeltaLocator.dlt' !
Delta fileIn: 'VarLocator.dlt' !
Delta fileIn: 'ClassVarLocator.dlt' !
=======================================
--- /branches/gcc-linux/test/memory/memOopKlassTests.cpp Sat Nov 1
12:10:49 2008
+++ /branches/gcc-linux/test/memory/memOopKlassTests.cpp Sat Oct 10
17:23:44 2009
@@ -1,5 +1,5 @@
# include "incls/_precompiled.incl"
-# include "incls/_memOopKlass.cpp.incl"
+# include "incls/_mixinOop.cpp.incl"
#include "handle.hpp"
#include "test.h"

@@ -11,29 +11,82 @@
DECLARE(MemOopKlassTests)
klassOop theClass;
oop* oldEdenTop;
+ mixinOop createMixin() {
+ PersistentHandle classMixinClass(Universe::find_global("ClassMixin"));
+ PersistentHandle
metaClassMixinClass(Universe::find_global("MetaClassMixin"));
+
+ PersistentHandle methods(oopFactory::new_objArray(0));
+ PersistentHandle ivars(oopFactory::new_objArray(0));
+ PersistentHandle classMethods(oopFactory::new_objArray(0));
+ PersistentHandle classIvars(oopFactory::new_objArray(0));
+ PersistentHandle classVars(oopFactory::new_objArray(0));
+
+ PersistentHandle
classMixin(classMixinClass.as_klassOop()->klass_part()->allocateObject());
+ PersistentHandle
metaClassMixin(metaClassMixinClass.as_klassOop()->klass_part()->allocateObject());
+
+ mixinOop klassMixin = mixinOop(classMixin.as_oop());
+ klassMixin->set_methods(objArrayOop(methods.as_oop()));
+ klassMixin->set_instVars(objArrayOop(ivars.as_oop()));
+ klassMixin->set_classVars(objArrayOop(classVars.as_oop()));
+ klassMixin->set_class_mixin(mixinOop(metaClassMixin.as_oop()));
+ klassMixin->set_installed(falseObj);
+
+ mixinOop metaKlassMixin = mixinOop(classMixin.as_oop());
+ metaKlassMixin->set_methods(objArrayOop(classMethods.as_oop()));
+ metaKlassMixin->set_instVars(objArrayOop(classIvars.as_oop()));
+ metaKlassMixin->set_classVars(objArrayOop(classVars.as_oop()));
+ metaKlassMixin->set_installed(falseObj);
+
+ return klassMixin;
+ }
END_DECLARE

SETUP(MemOopKlassTests) {
- theClass = klassOop(Universe::find_global("Object"));
- oldEdenTop = eden_top;
+ //theClass = klassOop(Universe::find_global("Object"));
+ //oldEdenTop = eden_top;
}

-TEARDOWN(MemOopKlassTests){
- eden_top = oldEdenTop;
- MarkSweep::collect();
+TEARDOWN(MemOopKlassTests) {
+ //eden_top = oldEdenTop;
+ //MarkSweep::collect();
}

-TESTF(MemOopKlassTests, allocateShouldFailWhenAllowedAndNoSpace) {
- eden_top = eden_end;
- ASSERT_EQUALS((int)NULL,
(int)(theClass->klass_part()->allocateObject(false)));
-}
-
-TESTF(MemOopKlassTests, allocateShouldAllocateTenuredWhenRequired) {
-
ASSERT_TRUE(Universe::old_gen.contains(theClass->klass_part()->allocateObject(false,
true)));
+TESTF(MemOopKlassTests,
createSubclassShouldCreateClassWithCorrectSuperForClassAndMeta) {
+ PersistentHandle kl(Universe::find_global("Class"));
+ PersistentHandle mk(Universe::find_global("Metaclass"));
+ PersistentHandle instSuper(Universe::find_global("Test"));
+ ASSERT_TRUE(kl.as_oop());
+
+ PersistentHandle classMixin(createMixin());
+
+ klassOop newKlass =
kl.as_klassOop()->klass_part()->create_subclass(mixinOop(classMixin.as_oop()),
+ instSuper.as_klassOop(), mk.as_klassOop(), Klass::mem_klass);
+
+ ASSERT_TRUE(newKlass);
+ ASSERT_TRUE(newKlass->klass_part()->superKlass() ==
instSuper.as_klassOop());
+ ASSERT_TRUE(newKlass->klass()->klass_part()->superKlass() ==
kl.as_klassOop());
+ ASSERT_TRUE(newKlass->klass()->klass() == mk.as_klassOop());
+ ASSERT_TRUE(newKlass->klass_part()->mixin() == classMixin.as_oop());
+ ASSERT_TRUE(newKlass->klass()->klass_part()->mixin() ==
mixinOop(classMixin.as_oop())->class_mixin());
}

-TESTF(MemOopKlassTests, allocateShouldNotFailWhenNotAllowedAndNoSpace) {
- eden_top = eden_end;
- ASSERT_TRUE(Universe::new_gen.eden()->free() < 4 * oopSize);
-
ASSERT_TRUE(Universe::new_gen.contains(theClass->klass_part()->allocateObject(true)));
-}
+TESTF(MemOopKlassTests,
oldCreateSubclassShouldCreateClassWithCorrectSuperForClassAndMeta) {
+ PersistentHandle kl(Universe::find_global("Class"));
+ PersistentHandle mk(Universe::find_global("Metaclass"));
+ PersistentHandle instSuper(Universe::find_global("Test"));
+ ASSERT_TRUE(kl.as_oop());
+
+ PersistentHandle classMixin(createMixin());
+
+ klassOop newKlass =
instSuper.as_klassOop()->klass_part()->create_subclass(mixinOop(classMixin.as_oop()),
Klass::mem_klass);
+
+ klassOop superClass = instSuper.as_klassOop();
+ mixinOop mixin = mixinOop(classMixin.as_oop());
+
+ ASSERT_TRUE(newKlass);
+ ASSERT_TRUE(newKlass->klass_part()->superKlass() == superClass);
+ ASSERT_TRUE(newKlass->klass()->klass_part()->superKlass() ==
superClass->klass());
+ ASSERT_TRUE(newKlass->klass()->klass() == superClass->klass()->klass());
+ ASSERT_TRUE(newKlass->klass_part()->mixin() == mixin);
+ ASSERT_TRUE(newKlass->klass()->klass_part()->mixin() ==
mixin->class_mixin());
+}
=======================================
--- /branches/gcc-linux/vm/interpreter/prettyPrinter.cpp Sat Sep 19
09:18:27 2009
+++ /branches/gcc-linux/vm/interpreter/prettyPrinter.cpp Sat Oct 10
17:23:44 2009
@@ -264,27 +264,31 @@
class scopeNode : public astNode {
protected:
methodOop _method;
- klassOop klass;
- int in;
+ klassOop klass;
+ int in;
int _hot_bci;
- int frame_index;
- deltaVFrame* _fr;
- ScopeDesc* _sd;
+ int frame_index;
+ deltaVFrame*_fr;
+ ScopeDesc* _sd;
+ scopeNode* parentScope;
+ scopeNode* innerScope;
public:
- scopeNode(deltaVFrame* fr, int index)
+ scopeNode(deltaVFrame* fr, int index, scopeNode* scope = NULL)
: astNode(0, NULL) {
frame_index = index;
_method = fr->method();
klass = fr->receiver()->klass();
- _hot_bci = fr->bci();
+ _hot_bci = scope ? -1 : fr->bci();
_fr = fr;
in = 0;
_sd = _fr->is_compiled_frame()
? ((compiledVFrame*) _fr)->scope()
: NULL;
+ innerScope = scope;
+ initParent();
}

- scopeNode(methodOop method, klassOop klass, int hot_bci)
+ scopeNode(methodOop method, klassOop klass, int hot_bci, scopeNode*
scope = NULL)
: astNode(0, NULL) {
_method = method;
this->klass = klass;
@@ -292,8 +296,14 @@
_fr = NULL;
in = 0;
_sd = NULL;
- }
-
+ innerScope = scope;
+ initParent();
+ }
+ void initParent() {
+ parentScope = _method->is_blockMethod()
+ ? new scopeNode(_method->parent(), klass, -1, this)
+ : parentScope = NULL;
+ }
deltaVFrame* fr() { return _fr; }
ScopeDesc* sd() const { return _sd; }

@@ -307,7 +317,13 @@

void context_allocated() { assert(is_context_allocated(), "just
checking"); }
bool is_context_allocated() { return
method()->allocatesInterpretedContext(); }
-
+ scopeNode* scopeFor(methodOop method) {
+ return innerScope && innerScope->isFor(method) ? innerScope : NULL;
+ }
+ bool isFor(methodOop method) {
+ return _method == method;
+ }
+ scopeNode* homeScope() { return parentScope ? parentScope->homeScope() :
this; }
char* param_string(int index, bool in_block = false) {
byteArrayOop res = find_parameter_name(method(), index);
if (in_block) {
@@ -1292,6 +1308,7 @@

// Forward declaration
astNode* generateForBlock(methodOop method, klassOop klass, int bci, int
numOfArgs);
+astNode* generate(scopeNode* scope);

class MethodPrettyPrinter : public MethodClosure {
private:
@@ -1330,7 +1347,11 @@

void allocate_closure(AllocationType type, int nofArgs, methodOop meth) {
if (type == tos_as_scope) _pop();
- _push(generateForBlock(meth, scope()->get_klass(), -1, nofArgs));
+ scopeNode* methodScope = _scope->scopeFor(meth);
+ if (methodScope)
+ _push(generate(methodScope));
+ else
+ _push(generateForBlock(meth, scope()->get_klass(), -1, nofArgs));
}
void allocate_context(int nofTemps, bool forMethod) {
scope()->context_allocated();
@@ -1605,7 +1626,9 @@


astNode* generateForActivation(deltaVFrame* fr, int index) {
- return generate(new scopeNode(fr, index));
+ scopeNode* scope = new scopeNode(fr, index);
+ scopeNode* toGenerate = scope->homeScope();
+ return generate(toGenerate);
}


=======================================
--- /branches/gcc-linux/vm/oops/klass.cpp Sun Jun 7 11:33:29 2009
+++ /branches/gcc-linux/vm/oops/klass.cpp Sat Oct 10 17:23:44 2009
@@ -97,11 +97,14 @@
return NULL;
}

-klassOop Klass::create_generic_class(klassOop super_class, mixinOop mixin,
int vtbl) {
+klassOop Klass::create_subclass(mixinOop mixin, klassOop instSuper,
klassOop metaClass, Format format) {
+ ShouldNotCallThis();
+ return NULL;
+}
+
+klassOop Klass::create_generic_class(klassOop superMetaClass, klassOop
superClass, klassOop metaMetaClass, mixinOop mixin, int vtbl) {
BlockScavenge bs;

- // Compute the class variables based on the instance side mixin class
variable names
-
assert(mixin->classVars()->is_objArray(), "checking
instance side class var names");
assert(mixin->class_mixin()->classVars()->is_objArray(), "checking class
side class var names");
assert(mixin->class_mixin()->classVars()->length() == 0, "checking class
side class var names");
@@ -115,12 +118,12 @@
}

// Meta class
- klassOop meta_klass =
klassOop(super_class->klass()->klass()->klass_part()->allocateObject());
+ klassOop meta_klass =
klassOop(metaMetaClass->klass_part()->allocateObject());
Klass* mk = meta_klass->klass_part();
mk->set_untagged_contents(false);
mk->set_classVars(class_vars);
mk->set_methods(oopFactory::new_objArray(0));
- mk->set_superKlass(super_class->klass());
+ mk->set_superKlass(superMetaClass);
mk->set_mixin(mixin->class_mixin());
mk->set_non_indexable_size(klassOopDesc::header_size() +
mk->number_of_instance_variables());
set_klassKlass_vtbl(mk);
@@ -131,13 +134,16 @@
k->set_untagged_contents(false);
k->set_classVars(class_vars);
k->set_methods(oopFactory::new_objArray(0));
- k->set_superKlass(super_class);
+ k->set_superKlass(superClass);
k->set_mixin(mixin);
k->set_vtbl_value(vtbl);
k->set_non_indexable_size(k->oop_header_size() +
k->number_of_instance_variables());

return klass;
}
+klassOop Klass::create_generic_class(klassOop super_class, mixinOop mixin,
int vtbl) {
+ return create_generic_class(super_class->klass(), super_class,
super_class->klass()->klass(), mixin, vtbl);
+}

symbolOop Klass::inst_var_name_at(int offset) const {
Klass* current_klass = (Klass*) this;
=======================================
--- /branches/gcc-linux/vm/oops/klass.hpp Sun Sep 13 14:52:44 2009
+++ /branches/gcc-linux/vm/oops/klass.hpp Sat Oct 10 17:23:44 2009
@@ -168,9 +168,12 @@

// creates invocation
virtual klassOop create_subclass(mixinOop mixin, Format format);
+ // create invocation (receiver as metaclass superclass)
+ virtual klassOop create_subclass(mixinOop mixin, klassOop instSuper,
klassOop metaClass, Format format);

protected:
static klassOop create_generic_class(klassOop super_class, mixinOop
mixin, int vtbl);
+ static klassOop create_generic_class(klassOop superMetaClass, klassOop
superClass, klassOop metaMetaClass, mixinOop mixin, int vtbl);

public:

=======================================
--- /branches/gcc-linux/vm/oops/memOopKlass.cpp Sat Nov 1 12:10:49 2008
+++ /branches/gcc-linux/vm/oops/memOopKlass.cpp Sat Oct 10 17:23:44 2009
@@ -112,6 +112,10 @@
return markSymbol(vmSymbols::not_indexable());
}

+klassOop memOopKlass::create_subclass(mixinOop mixin, klassOop instSuper,
klassOop metaClass, Format format) {
+ memOopKlass o;
+ return create_generic_class(as_klassOop(), instSuper, metaClass, mixin,
o.vtbl_value());
+}
klassOop memOopKlass::create_subclass(mixinOop mixin, Format format) {
assert(can_be_subclassed(), "must be able to subclass this");
if (format == mem_klass) return
memOopKlass::create_class(as_klassOop(), mixin);
@@ -136,7 +140,6 @@
memOopKlass o;
return create_generic_class(super_class, mixin, o.vtbl_value());
}
-
oop memOopKlass::oop_shallow_copy(oop obj, bool tenured) {
// Do not copy oddballs (nil, true, false)
if (obj == nilObj) return obj;
=======================================
--- /branches/gcc-linux/vm/oops/memOopKlass.hpp Sat Nov 1 12:10:49 2008
+++ /branches/gcc-linux/vm/oops/memOopKlass.hpp Sat Oct 10 17:23:44 2009
@@ -45,6 +45,7 @@

// invocation creation
klassOop create_subclass(mixinOop mixin, Format format);
+ klassOop create_subclass(mixinOop mixin, klassOop instSuper, klassOop
metaClass, Format format);

static klassOop create_class(klassOop super_class, mixinOop mixin);

Reply all
Reply to author
Forward
0 new messages