hg: mlvm/mlvm/hotspot: cpindex: clean out MethodComparator
Stephen Bannasch
stephen.bannasch at deanbrook.org
Sun May 30 10:32:16 PDT 2010
now getting errors applying meth-ldc-6939203.patch
cpindex-6957080 which came out after I last built Friday is being applied before meth-ldc-6939203 and they are both trying to
replace this line in bytecode.cpp:
return stdc == Bytecodes::_ldc ? get_index_u1(stdc) : get_index_u2(stdc);
meth-ldc-6939203:
Changeset: b8971823a6e4
Author: jrose
Date: 2010-05-24 19:32 -0700
URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/b8971823a6e4
meth: make ldc work for sparc
! meth-ldc-6939203.patch
cpindex-6957080.patch:
Changeset: c4c888714efc
Author: jrose
Date: 2010-05-28 18:50 -0700
URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/c4c888714efc
cpindex: clean out MethodComparator
+ cpindex-6957080.patch
! series
This is what I get running: sh patches/make/each-patch-repo.sh "hg qpush -a"
+ (cd sources/hotspot; hg qpush -a)
applying post-6939930-adjust.patch
applying indy-sparc-6829193.patch
applying meth-ing-6939134.patch
applying meth-bcp-6939196.patch
applying indy-c1-sparc-6930772.patch
applying indy-c2-sparc-6934104.patch
applying cpindex-6939207.patch
applying cpindex-6956164.patch
applying cpindex-6957004.patch
applying cpindex-6957080.patch
applying meth-ldc-6939203.patch
patching file src/share/vm/interpreter/bytecode.cpp
Hunk #1 FAILED at 210
1 out of 1 hunks FAILED -- saving rejects to file src/share/vm/interpreter/bytecode.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh meth-ldc-6939203.patch
*** Exit status 2.
----
file: bytecode.cpp.rej
--- bytecode.cpp
+++ bytecode.cpp
@@ -211,11 +211,33 @@
}
-// Implementation of Bytecodes loac constant
+// Implementation of Bytecodes load constant
+
+int Bytecode_loadconstant::raw_index() const {
+ Bytecodes::Code rawc = code();
+ if (rawc != Bytecodes::_wide)
+ return _bcp->get_index_u1(rawc);
+ rawc = Bytecodes::code_at(_bcp->addr_at(1));
+ return _bcp->get_index_u2(rawc, true);
+}
int Bytecode_loadconstant::index() const {
- Bytecodes::Code stdc = Bytecodes::java_code(code());
- return stdc == Bytecodes::_ldc ? get_index_u1(stdc) : get_index_u2(stdc);
+ int index = raw_index();
+ if (has_cache_index()) {
+ return _method->constants()->cache()->entry_at(index)->constant_pool_index();
+ }
+ return index;
+}
+
+oop Bytecode_loadconstant::resolve_constant(TRAPS) const {
+ assert(_method.not_null(), "must supply method to resolve constant");
+ int index = raw_index();
+ constantPoolOop constants = _method->constants();
+ if (has_cache_index()) {
+ return constants->resolve_cached_constant_at(index, THREAD);
+ } else {
+ return constants->resolve_constant_at(index, THREAD);
+ }
}
//------------------------------------------------------------------------------
More information about the mlvm-dev
mailing list