--- a/hotspot/src/share/vm/runtime/frame.cpp Tue Jan 05 13:05:58 2010 +0100
+++ b/hotspot/src/share/vm/runtime/frame.cpp Tue Jan 05 15:21:25 2010 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -769,9 +769,9 @@
class InterpretedArgumentOopFinder: public SignatureInfo {
private:
- OopClosure* _f; // Closure to invoke
- int _offset; // TOS-relative offset, decremented with each argument
- bool _is_static; // true if the callee is a static method
+ OopClosure* _f; // Closure to invoke
+ int _offset; // TOS-relative offset, decremented with each argument
+ bool _has_receiver; // true if the callee has a receiver
frame* _fr;
void set(int size, BasicType type) {
@@ -786,9 +786,9 @@
}
public:
- InterpretedArgumentOopFinder(symbolHandle signature, bool is_static, frame* fr, OopClosure* f) : SignatureInfo(signature) {
+ InterpretedArgumentOopFinder(symbolHandle signature, bool has_receiver, frame* fr, OopClosure* f) : SignatureInfo(signature), _has_receiver(has_receiver) {
// compute size of arguments
- int args_size = ArgumentSizeComputer(signature).size() + (is_static ? 0 : 1);
+ int args_size = ArgumentSizeComputer(signature).size() + (has_receiver ? 1 : 0);
assert(!fr->is_interpreted_frame() ||
args_size <= fr->interpreter_frame_expression_stack_size(),
"args cannot be on stack anymore");
@@ -796,11 +796,10 @@
_f = f;
_fr = fr;
_offset = args_size;
- _is_static = is_static;
}
void oops_do() {
- if (!_is_static) {
+ if (_has_receiver) {
--_offset;
oop_offset_do();
}
@@ -912,7 +911,7 @@
int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals();
symbolHandle signature;
- bool is_static = false;
+ bool has_receiver = false;
// Process a callee's arguments if we are at a call site
// (i.e., if we are at an invoke bytecode)
@@ -922,7 +921,7 @@
Bytecode_invoke *call = Bytecode_invoke_at_check(m, bci);
if (call != NULL) {
signature = symbolHandle(thread, call->signature());
- is_static = call->is_invokestatic();
+ has_receiver = call->has_receiver();
if (map->include_argument_oops() &&
interpreter_frame_expression_stack_size() > 0) {
ResourceMark rm(thread); // is this right ???
@@ -936,7 +935,7 @@
// code in the interpreter calls a blocking runtime
// routine which can cause this code to be executed).
// (was bug gri 7/27/98)
- oops_interpreted_arguments_do(signature, is_static, f);
+ oops_interpreted_arguments_do(signature, has_receiver, f);
}
}
}
@@ -950,7 +949,7 @@
mask = &oopmap_mask;
#endif // ASSERT
oops_interpreted_locals_do(f, max_locals, mask);
- oops_interpreted_expressions_do(f, signature, is_static,
+ oops_interpreted_expressions_do(f, signature, has_receiver,
m->max_stack(),
max_locals, mask);
} else {
@@ -992,7 +991,7 @@
void frame::oops_interpreted_expressions_do(OopClosure *f,
symbolHandle signature,
- bool is_static,
+ bool has_receiver,
int max_stack,
int max_locals,
InterpreterOopMap *mask) {
@@ -1005,7 +1004,7 @@
// arguments in callee's locals.
int args_size = 0;
if (!signature.is_null()) {
- args_size = ArgumentSizeComputer(signature).size() + (is_static ? 0 : 1);
+ args_size = ArgumentSizeComputer(signature).size() + (has_receiver ? 1 : 0);
}
intptr_t *tos_addr = interpreter_frame_tos_at(args_size);
@@ -1038,8 +1037,8 @@
}
}
-void frame::oops_interpreted_arguments_do(symbolHandle signature, bool is_static, OopClosure* f) {
- InterpretedArgumentOopFinder finder(signature, is_static, this, f);
+void frame::oops_interpreted_arguments_do(symbolHandle signature, bool has_receiver, OopClosure* f) {
+ InterpretedArgumentOopFinder finder(signature, has_receiver, this, f);
finder.oops_do();
}
@@ -1066,8 +1065,8 @@
class CompiledArgumentOopFinder: public SignatureInfo {
protected:
OopClosure* _f;
- int _offset; // the current offset, incremented with each argument
- bool _is_static; // true if the callee is a static method
+ int _offset; // the current offset, incremented with each argument
+ bool _has_receiver; // true if the callee has a receiver
frame _fr;
RegisterMap* _reg_map;
int _arg_size;
@@ -1087,24 +1086,24 @@
}
public:
- CompiledArgumentOopFinder(symbolHandle signature, bool is_static, OopClosure* f, frame fr, const RegisterMap* reg_map)
+ CompiledArgumentOopFinder(symbolHandle signature, bool has_receiver, OopClosure* f, frame fr, const RegisterMap* reg_map)
: SignatureInfo(signature) {
// initialize CompiledArgumentOopFinder
_f = f;
_offset = 0;
- _is_static = is_static;
+ _has_receiver = has_receiver;
_fr = fr;
_reg_map = (RegisterMap*)reg_map;
- _arg_size = ArgumentSizeComputer(signature).size() + (is_static ? 0 : 1);
+ _arg_size = ArgumentSizeComputer(signature).size() + (has_receiver ? 1 : 0);
int arg_size;
- _regs = SharedRuntime::find_callee_arguments(signature(), is_static, &arg_size);
+ _regs = SharedRuntime::find_callee_arguments(signature(), has_receiver, &arg_size);
assert(arg_size == _arg_size, "wrong arg size");
}
void oops_do() {
- if (!_is_static) {
+ if (_has_receiver) {
handle_oop_offset();
_offset++;
}
@@ -1112,9 +1111,9 @@
}
};
-void frame::oops_compiled_arguments_do(symbolHandle signature, bool is_static, const RegisterMap* reg_map, OopClosure* f) {
+void frame::oops_compiled_arguments_do(symbolHandle signature, bool has_receiver, const RegisterMap* reg_map, OopClosure* f) {
ResourceMark rm;
- CompiledArgumentOopFinder finder(signature, is_static, f, *this, reg_map);
+ CompiledArgumentOopFinder finder(signature, has_receiver, f, *this, reg_map);
finder.oops_do();
}