decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
Oracle must be concerned now | 503 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
Oracle must be concerned now
Authored by: greed on Saturday, April 21 2012 @ 07:46 PM EDT
It's called a multi-pass compile.

If your syntax is simple enough, you can make a run through the source code
gathering method signatures, type declarations and so on. Then you go through
again looking at the rest, and actually turning the source into... the next
step.

That's the minimum needed for a get-it-done compile; code optimization can be
multiple passes all on its own--or even an unbound iterative process, that only
stops when time or memory runs out.

Even symbolic assemblers need multiple passes, two being the minimum, to support
replacing labels with offsets--otherwise, you can never go forward. I wrote one
in a weekend for the 68HC11 once, it was either write my own assembler or use
PC-DOS. Turned out I messed up... the official one for PC-DOS had a bug and
could generate bad branch offsets; mine didn't, so my team was the only one to
complete all the assignments....

Back to Java: it basically looks up symbols from everywhere it can: all the
.class files it can find in CLASSPATH, and all the .java files on the command
line. So you can have some grotty inter-class relationships and deal with it
just by shoving a whole pile of source into the compiler at once, crossing your
fingers, and turning the handle.

I'll be over here in "directed acyclic graph" world, if you don't
mind. I find circular dependencies result in brittleness and maintenance
issues.

(Oh, and to Java, .jar files are really just directories it can look in to find
.class files. There's some meta-stuff it will do with them, too, but class
loading is based on finding a file with a SuitableName.class in CLASSPATH,
whether it is in a directory or .zip I mean .jar file.)

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )