projects
/
cacao.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90ac05f
)
Fixes PR125.
author
Michael Starzinger
<michi@complang.tuwien.ac.at>
Mon, 23 Mar 2009 23:58:04 +0000
(
00:58
+0100)
committer
Michael Starzinger
<michi@complang.tuwien.ac.at>
Mon, 23 Mar 2009 23:58:04 +0000
(
00:58
+0100)
* src/vm/method.cpp (method_load): Ignore access flags for clinit methods.
src/vm/method.cpp
patch
|
blob
|
history
diff --git
a/src/vm/method.cpp
b/src/vm/method.cpp
index 6389a4f86b9d727792fd11b731fbdf6e51982d95..4a166020146d006377d38f33694cbeffd02b347e 100644
(file)
--- a/
src/vm/method.cpp
+++ b/
src/vm/method.cpp
@@
-201,7
+201,15
@@
bool method_load(classbuffer *cb, methodinfo *m, descriptor_pool *descpool)
}
}
#endif /* ENABLE_VERIFIER */
-
+
+ /* Ignore flags for class initializer according to section 4.6
+ of "The Java Virtual Machine Specification, 2nd Edition" (see PR125). */
+
+ if (m->name == utf_clinit) {
+ m->flags &= ACC_STRICT;
+ m->flags |= ACC_STATIC;
+ }
+
if (!(m->flags & ACC_STATIC))
argcount++; /* count the 'this' argument */