Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jamie Mansfield
asm
Commits
588b0c8c
Commit
588b0c8c
authored
Jul 13, 2006
by
ekuleshov
Browse files
ported changes from head for bug #305716
parent
dbee49a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/org/objectweb/asm/ClassWriter.java
View file @
588b0c8c
...
...
@@ -1020,7 +1020,7 @@ public class ClassWriter implements ClassVisitor {
key
.
set
(
value
);
Item
result
=
get
(
key
);
if
(
result
==
null
)
{
pool
.
putByte
(
FLOAT
).
putInt
(
Float
.
floatToIntBits
(
value
)
);
pool
.
putByte
(
FLOAT
).
putInt
(
key
.
intVal
);
result
=
new
Item
(
index
++,
key
);
put
(
result
);
}
...
...
@@ -1057,7 +1057,7 @@ public class ClassWriter implements ClassVisitor {
key
.
set
(
value
);
Item
result
=
get
(
key
);
if
(
result
==
null
)
{
pool
.
putByte
(
DOUBLE
).
putLong
(
Double
.
doubleToLongBits
(
value
)
);
pool
.
putByte
(
DOUBLE
).
putLong
(
key
.
longVal
);
result
=
new
Item
(
index
,
key
);
put
(
result
);
index
+=
2
;
...
...
src/org/objectweb/asm/Item.java
View file @
588b0c8c
...
...
@@ -55,25 +55,15 @@ final class Item {
int
type
;
/**
* Value of this item, for an integer item.
* Value of this item, for an integer
item or int bits of float
item.
*/
int
intVal
;
/**
* Value of this item, for a long item.
* Value of this item, for a long
item or long bits of double
item.
*/
long
longVal
;
/**
* Value of this item, for a float item.
*/
float
floatVal
;
/**
* Value of this item, for a double item.
*/
double
doubleVal
;
/**
* First part of the value of this item, for items that do not hold a
* primitive value.
...
...
@@ -124,8 +114,6 @@ final class Item {
type
=
i
.
type
;
intVal
=
i
.
intVal
;
longVal
=
i
.
longVal
;
floatVal
=
i
.
floatVal
;
doubleVal
=
i
.
doubleVal
;
strVal1
=
i
.
strVal1
;
strVal2
=
i
.
strVal2
;
strVal3
=
i
.
strVal3
;
...
...
@@ -161,7 +149,7 @@ final class Item {
*/
void
set
(
final
float
floatVal
)
{
this
.
type
=
ClassWriter
.
FLOAT
;
this
.
floa
tVal
=
floatVal
;
this
.
in
tVal
=
Float
.
floatToRawIntBits
(
floatVal
)
;
this
.
hashCode
=
0x7FFFFFFF
&
(
type
+
(
int
)
floatVal
);
}
...
...
@@ -172,7 +160,7 @@ final class Item {
*/
void
set
(
final
double
doubleVal
)
{
this
.
type
=
ClassWriter
.
DOUBLE
;
this
.
doubleVal
=
doubleVal
;
this
.
longVal
=
Double
.
doubleToRawLongBits
(
doubleVal
)
;
this
.
hashCode
=
0x7FFFFFFF
&
(
type
+
(
int
)
doubleVal
);
}
...
...
@@ -224,13 +212,11 @@ final class Item {
if
(
i
.
type
==
type
)
{
switch
(
type
)
{
case
ClassWriter
.
INT
:
case
ClassWriter
.
FLOAT
:
return
i
.
intVal
==
intVal
;
case
ClassWriter
.
LONG
:
return
i
.
longVal
==
longVal
;
case
ClassWriter
.
FLOAT
:
return
i
.
floatVal
==
floatVal
;
case
ClassWriter
.
DOUBLE
:
return
i
.
double
Val
==
double
Val
;
return
i
.
long
Val
==
long
Val
;
case
ClassWriter
.
UTF8
:
case
ClassWriter
.
STR
:
case
ClassWriter
.
CLASS
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment