src/share/vm/code/location.cpp

changeset 766
cecd8eb4e0ca
parent 435
a61af66fc99e
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/code/location.cpp	Wed Sep 10 14:29:32 2008 -0700
     1.2 +++ b/src/share/vm/code/location.cpp	Wed Sep 10 18:23:32 2008 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -26,7 +26,7 @@
    1.11  #include "incls/_location.cpp.incl"
    1.12  
    1.13  void Location::print_on(outputStream* st) const {
    1.14 -  if(type() == invalid && !legal_offset_in_bytes(offset() * BytesPerInt)) {
    1.15 +  if(type() == invalid) {
    1.16      // product of Location::invalid_loc() or Location::Location().
    1.17      switch (where()) {
    1.18      case on_stack:     st->print("empty");    break;
    1.19 @@ -42,6 +42,7 @@
    1.20    switch (type()) {
    1.21    case normal:                                 break;
    1.22    case oop:          st->print(",oop");        break;
    1.23 +  case narrowoop:    st->print(",narrowoop");  break;
    1.24    case int_in_long:  st->print(",int");        break;
    1.25    case lng:          st->print(",long");       break;
    1.26    case float_in_dbl: st->print(",float");      break;
    1.27 @@ -53,17 +54,17 @@
    1.28  
    1.29  
    1.30  Location::Location(DebugInfoReadStream* stream) {
    1.31 -  _value = (uint16_t) stream->read_int();
    1.32 +  _value = (juint) stream->read_int();
    1.33  }
    1.34  
    1.35  
    1.36  void Location::write_on(DebugInfoWriteStream* stream) {
    1.37 -  stream->write_int(_value & 0x0000FFFF);
    1.38 +  stream->write_int(_value);
    1.39  }
    1.40  
    1.41  
    1.42  // Valid argument to Location::new_stk_loc()?
    1.43  bool Location::legal_offset_in_bytes(int offset_in_bytes) {
    1.44    if ((offset_in_bytes % BytesPerInt) != 0)  return false;
    1.45 -  return (offset_in_bytes / BytesPerInt) < (OFFSET_MASK >> OFFSET_SHIFT);
    1.46 +  return (juint)(offset_in_bytes / BytesPerInt) < (OFFSET_MASK >> OFFSET_SHIFT);
    1.47  }

mercurial