• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

One more question on bytecode if and jumps

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more question:

There's nothing that I know of that guarantees that jumps and ifs, etc, must jump you to the START of an instruction. One would assume this was so, but I can't say for certain. What are people's thoughts?

Thanks, Rob
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From JVM Spec 4.9.2: "The operands, if any, of each instruction are checked to make sure they are valid ... The targets of all control-flow instructions are each the start of an instruction." That should take care of it, I think.
 
Robert Konigsberg
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, that's it!

I think it's time for me to actually READ the JVM spec. Is there a good *book* that I can purchase?

Rob
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic