hotspot/src/share/vm/compiler/oopMap.hpp

Print this page
rev 611 : Merge

*** 1,10 **** #ifdef USE_PRAGMA_IDENT_HDR #pragma ident "@(#)oopMap.hpp 1.81 07/09/28 10:23:19 JVM" #endif /* ! * Copyright 1998-2007 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,10 ---- #ifdef USE_PRAGMA_IDENT_HDR #pragma ident "@(#)oopMap.hpp 1.81 07/09/28 10:23:19 JVM" #endif /* ! * Copyright 1998-2008 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 47,57 **** void set_value(int value) { _value = value; } short _content_reg; public: // Constants ! enum { type_bits = 6, register_bits = BitsPerShort - type_bits }; enum { type_shift = 0, register_shift = type_bits }; --- 47,57 ---- void set_value(int value) { _value = value; } short _content_reg; public: // Constants ! enum { type_bits = 5, register_bits = BitsPerShort - type_bits }; enum { type_shift = 0, register_shift = type_bits };
*** 62,75 **** enum oop_types { // must fit in type_bits unused_value =0, // powers of 2, for masking OopMapStream oop_value = 1, value_value = 2, ! dead_value = 4, callee_saved_value = 8, ! derived_oop_value= 16, ! stack_obj = 32 }; // Constructors OopMapValue () { set_value(0); set_content_reg(VMRegImpl::Bad()); } OopMapValue (VMReg reg, oop_types t) { set_reg_type(reg,t); } OopMapValue (VMReg reg, oop_types t, VMReg reg2) { set_reg_type(reg,t); set_content_reg(reg2); } --- 62,74 ---- enum oop_types { // must fit in type_bits unused_value =0, // powers of 2, for masking OopMapStream oop_value = 1, value_value = 2, ! narrowoop_value = 4, callee_saved_value = 8, ! derived_oop_value= 16 }; // Constructors OopMapValue () { set_value(0); set_content_reg(VMRegImpl::Bad()); } OopMapValue (VMReg reg, oop_types t) { set_reg_type(reg,t); } OopMapValue (VMReg reg, oop_types t, VMReg reg2) { set_reg_type(reg,t); set_content_reg(reg2); }
*** 91,111 **** } // Querying bool is_oop() { return mask_bits(value(), type_mask_in_place) == oop_value; } bool is_value() { return mask_bits(value(), type_mask_in_place) == value_value; } ! bool is_dead() { return mask_bits(value(), type_mask_in_place) == dead_value; } bool is_callee_saved() { return mask_bits(value(), type_mask_in_place) == callee_saved_value; } bool is_derived_oop() { return mask_bits(value(), type_mask_in_place) == derived_oop_value; } - bool is_stack_obj() { return mask_bits(value(), type_mask_in_place) == stack_obj; } void set_oop() { set_value((value() & register_mask_in_place) | oop_value); } void set_value() { set_value((value() & register_mask_in_place) | value_value); } ! void set_dead() { set_value((value() & register_mask_in_place) | dead_value); } void set_callee_saved() { set_value((value() & register_mask_in_place) | callee_saved_value); } void set_derived_oop() { set_value((value() & register_mask_in_place) | derived_oop_value); } - void set_stack_obj() { set_value((value() & register_mask_in_place) | stack_obj); } VMReg reg() const { return VMRegImpl::as_VMReg(mask_bits(value(), register_mask_in_place) >> register_shift); } oop_types type() const { return (oop_types)mask_bits(value(), type_mask_in_place); } static bool legal_vm_reg_name(VMReg p) { --- 90,108 ---- } // Querying bool is_oop() { return mask_bits(value(), type_mask_in_place) == oop_value; } bool is_value() { return mask_bits(value(), type_mask_in_place) == value_value; } ! bool is_narrowoop() { return mask_bits(value(), type_mask_in_place) == narrowoop_value; } bool is_callee_saved() { return mask_bits(value(), type_mask_in_place) == callee_saved_value; } bool is_derived_oop() { return mask_bits(value(), type_mask_in_place) == derived_oop_value; } void set_oop() { set_value((value() & register_mask_in_place) | oop_value); } void set_value() { set_value((value() & register_mask_in_place) | value_value); } ! void set_narrowoop() { set_value((value() & register_mask_in_place) | narrowoop_value); } void set_callee_saved() { set_value((value() & register_mask_in_place) | callee_saved_value); } void set_derived_oop() { set_value((value() & register_mask_in_place) | derived_oop_value); } VMReg reg() const { return VMRegImpl::as_VMReg(mask_bits(value(), register_mask_in_place) >> register_shift); } oop_types type() const { return (oop_types)mask_bits(value(), type_mask_in_place); } static bool legal_vm_reg_name(VMReg p) {
*** 130,140 **** int stack_offset() { assert(is_stack_loc(), "must be stack location"); return reg()->reg2stack(); } ! void print( ) const PRODUCT_RETURN; }; class OopMap: public ResourceObj { friend class OopMapStream; --- 127,138 ---- int stack_offset() { assert(is_stack_loc(), "must be stack location"); return reg()->reg2stack(); } ! void print_on(outputStream* st) const; ! void print() const { print_on(tty); } }; class OopMap: public ResourceObj { friend class OopMapStream;
*** 176,189 **** // Construction // frame_size units are stack-slots (4 bytes) NOT intptr_t; we can name odd // slots to hold 4-byte values like ints and floats in the LP64 build. void set_oop ( VMReg local); void set_value( VMReg local); void set_dead ( VMReg local); void set_callee_saved( VMReg local, VMReg caller_machine_register ); void set_derived_oop ( VMReg local, VMReg derived_from_local_register ); - void set_stack_obj( VMReg local); void set_xxx(VMReg reg, OopMapValue::oop_types x, VMReg optional); int heap_size() const; void copy_to(address addr); OopMap* deep_copy(); --- 174,187 ---- // Construction // frame_size units are stack-slots (4 bytes) NOT intptr_t; we can name odd // slots to hold 4-byte values like ints and floats in the LP64 build. void set_oop ( VMReg local); void set_value( VMReg local); + void set_narrowoop(VMReg local); void set_dead ( VMReg local); void set_callee_saved( VMReg local, VMReg caller_machine_register ); void set_derived_oop ( VMReg local, VMReg derived_from_local_register ); void set_xxx(VMReg reg, OopMapValue::oop_types x, VMReg optional); int heap_size() const; void copy_to(address addr); OopMap* deep_copy();
*** 193,203 **** bool legal_vm_reg_name(VMReg local) { return OopMapValue::legal_vm_reg_name(local); } // Printing ! void print_on(outputStream* st) const PRODUCT_RETURN; void print() const { print_on(tty); } }; class OopMapSet : public ResourceObj { --- 191,201 ---- bool legal_vm_reg_name(VMReg local) { return OopMapValue::legal_vm_reg_name(local); } // Printing ! void print_on(outputStream* st) const; void print() const { print_on(tty); } }; class OopMapSet : public ResourceObj {
*** 245,258 **** // Iterates through frame for a compiled method for dead ones and values, too static void all_do(const frame* fr, const RegisterMap* reg_map, OopClosure* oop_fn, void derived_oop_fn(oop* base, oop* derived), ! OopClosure* value_fn, OopClosure* dead_fn); // Printing ! void print_on(outputStream* st) const PRODUCT_RETURN; void print() const { print_on(tty); } }; class OopMapStream : public StackObj { --- 243,256 ---- // Iterates through frame for a compiled method for dead ones and values, too static void all_do(const frame* fr, const RegisterMap* reg_map, OopClosure* oop_fn, void derived_oop_fn(oop* base, oop* derived), ! OopClosure* value_fn); // Printing ! void print_on(outputStream* st) const; void print() const { print_on(tty); } }; class OopMapStream : public StackObj {