Re: dependency-detection in java



Daniel Pitts <googlegroupie@xxxxxxxxxxxxx> wrote:
I don't know, but you have to wonder at any case that is specific to
Strings and primitives. The more I think about it, the more I realize
that javac can't inline regular object references, because those
object instances aren't represented until runtime (unlike interned
strings and primitive values).

Indeed: Strings, longs, floats and doubles are inlined to using class'
constant pool. ints are directly inlined at each usage
(e.g. as in "bipush 42"), all other objects (except Strings)
are accessed through getstatic.


To the OP: If you could rework any case that requires a constant ...
I've answered that elsewhere, already.
.



Relevant Pages

  • Re: dependency-detection in java
    ... Strings and primitives. ... that javac can't inline regular object references, ...
    (comp.lang.java.programmer)
  • Re: How to make a string out of a symbol?
    ... character type is the same as fixnum, and to encode strings you'd just ... (defun get-value (tagged-value) ... Now of course you can't do real I/O with these primitives, ... get a string to feed INTERN is imaginarily solved. ...
    (comp.lang.lisp)
  • Re: size_t problems
    ... It is possible that an unaligned access ... lcc-win32 generates an inline loop ... For relatively short strings, this will beat ... strlen on a string literal with a suitable integer constant). ...
    (comp.lang.c)
  • Re: Java compatibility issues (WAS: MF having issues?)
    ... In the case of Strings, "equals" compares the contents of the strings for equality. ... The above kind of construct perpetuates this illusion that Strings are like primitives. ... So "normally", I'd say "no", and that the above construct would detract from the elegance of the language. ...
    (comp.lang.cobol)
  • Problems with InvokeMember()
    ... The example from MSDN works fine for strings,but it's not working for ... primitives like 'double' ... Type mtype = m.GetType; ... Prev by Date: ...
    (microsoft.public.dotnet.csharp.general)