Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6674617
Votes 0
Synopsis languages with dynamically typed numbers need more efficient autoboxing
Category hotspot:compiler2
Reported Against
Release Fixed
State 3-Accepted, request for enhancement
Priority: 3-Medium
Related Bugs
Submit Date 12-MAR-2008
Description
Public discussion: http://blogs.sun.com/jrose/entry/fixnums_in_the_vm

Dynamic languages typically perform arithmetic using dynamically typed references to boxed numbers.  Language-specific implementations often use pseudo-pointers to represent a commonly used subset of numbers, with the actual bits of the pseudo-pointer carrying the value field.

The JVM should support fixnums for the sake of these languages.  It would also help some Java applications that use autoboxing.  Autoboxing occurs frequently when generic collections are used to hold integers and other primitive types.

Solution:  The Hotspot JVM can cleanly represent fixnums and other immediate data types by modifying the 'oop' type to include 'pseudo-oops'.  (Historically, 'oop' stands for 'ordinary  customer  pointer'.  So this RFE is about non-oop oops.)

Implementation tactic:  Divide the machine word into an implementation-defined set of three fields, tag, klass, and value.  The sizes of these are implementation-dependent, but on 32-bit systems the tag is generally 1-3 bits, the klass 0-5 bits, and the value 24-31 bits.  On 64-bit machines, the klass may in fact be a restricted pointer value (31 bits or so), with klass and tag sharing one 32-bit subword and the value in the other.
Posted Date : 2008-03-12 19:44:03.0
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang