org.nlogo.generate
Members list
Type members
Classlikes
Attributes
- Source
- AbstractPeepholeOptimizer.scala
- Supertypes
-
class MethodVisitorclass Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Source
- BytecodeUtils.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BytecodeUtils.type
Attributes
- Source
- CustomClassLoader.scala
- Supertypes
-
class ClassLoaderclass Objecttrait Matchableclass Any
Attributes
- Source
- CustomGenerator.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Source
- DisassemblyThunk.scala
- Supertypes
Attributes
- Source
- EmptyVisitor.scala
- Supertypes
-
class ClassVisitorclass Objecttrait Matchableclass Any
Attributes
- Source
- EmptyVisitor.scala
- Supertypes
-
class FieldVisitorclass Objecttrait Matchableclass Any
Attributes
- Source
- EmptyVisitor.scala
- Supertypes
-
class MethodVisitorclass Objecttrait Matchableclass Any
Attributes
- Source
- GeneratedInstruction.scala
- Supertypes
-
trait GeneratedInstructionclass Commandclass Instructiontrait TokenHolderclass InstructionJclass Objecttrait Matchableclass AnyShow all
Attributes
- Source
- GeneratedInstruction.scala
- Supertypes
-
class Instructiontrait TokenHolderclass InstructionJclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class GeneratedCommandclass GeneratedReporter
Attributes
- Source
- GeneratedInstruction.scala
- Supertypes
-
trait GeneratedInstructionclass Reporterclass Instructiontrait TokenHolderclass InstructionJclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Source
- Generator.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Generator.type
Attributes
- Companion
- object
- Source
- Generator.scala
- Supertypes
Attributes
- Source
- GeneratorAdapter.scala
- Supertypes
-
class GeneratorAdapterclass LocalVariablesSorterclass MethodVisitorclass Objecttrait Matchableclass AnyShow all
Attributes
- Source
- MethodRipper.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Source
- MethodSelector.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MethodSelector.type
Attributes
- Source
- PeepholeOptimizer1.scala
- Supertypes
Attributes
- Source
- PeepholeOptimizer2.scala
- Supertypes
This class serves as a peep-hole optimizer. Its purpose is just to catch one specific inefficient pattern of bytecode that the inliner generates -- the needless STORE / LOAD combination.
This class serves as a peep-hole optimizer. Its purpose is just to catch one specific inefficient pattern of bytecode that the inliner generates -- the needless STORE / LOAD combination.
IMPORTANT: This class is tricky, because the inefficient pattern we want to replace is not always safe to replace.
Even if DLOAD is called right after DSTORE, there may be another DLOAD later in the method body. The only way we can safely use this peep-hole optimizer is if we could guarantee that every argument to a report_* method was only referenced once in the bytecode of the method body. PeepholeSafeChecker checks for this. If a report_* or perform_* method is "PeepholeSafe", then a special label (PEEPHOLE_SAFE_FLAG) is inserted into the bytecode by the InstructionGenerator, which this class looks for, to make sure it is safe to perform the transformation.
~Forrest (6/19/2006)
It's looking for patterns like this: DSTORE 4 (L-special) // PEEPHOLE_SAFE_FLAG label L2 LINENUMBER 2 L2 (L3) // extra junk label DLOAD 4 And replacing them with just: L2 LINENUMBER 2 L2 (L3) ~Forrest (6/19/2006)
Attributes
- Companion
- class
- Source
- PeepholeOptimizer3.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PeepholeOptimizer3.type
Attributes
- Companion
- object
- Source
- PeepholeOptimizer3.scala
- Supertypes
This class serves as a peep-hole optimizer. Its purpose is just to clean up the PEEPHOLE_FLAG_LABELs that PeepholeOptimizer3 leaves behind. PeepholeOptimizer3 must ALWAYS be used in conjunction with this class, because otherwise we'll end up placing the PEEPHOLE_FLAG_LABEL in multiple places in the method body, which causes a verifier error.
This class serves as a peep-hole optimizer. Its purpose is just to clean up the PEEPHOLE_FLAG_LABELs that PeepholeOptimizer3 leaves behind. PeepholeOptimizer3 must ALWAYS be used in conjunction with this class, because otherwise we'll end up placing the PEEPHOLE_FLAG_LABEL in multiple places in the method body, which causes a verifier error.
It's looking for patterns like this: Label PEEPHOLE_FLAG_LABEL And replacing them with: (nothing)
~Forrest (6/19/2006)
Attributes
- Source
- PeepholeOptimizer3.scala
- Supertypes
-
class MethodVisitorclass Objecttrait Matchableclass Any
A report_* or perform_* method of a prim is Peephole-Safe if it references each argument at most once. A method with no arguments is trivially PeepholeSafe. This class maintains a table of the Peephole-Safe status of each report* and perform_* method, by checking them the first time a prim's class is used for inlining.
A report_* or perform_* method of a prim is Peephole-Safe if it references each argument at most once. A method with no arguments is trivially PeepholeSafe. This class maintains a table of the Peephole-Safe status of each report* and perform_* method, by checking them the first time a prim's class is used for inlining.
Examples: A _prim with this report method is PeepholeSafe: double report_1(Context context, double arg0, double arg1) { return arg0 + arg1; } A _prim with this report method is NOT PeepholeSafe: double report_1(Context context, double arg0, double arg1) { if (arg1 != 0.0) { return arg0 / arg1; ... } PeepholeSafety actually refers to safety with regard to just one type of peephole optimization, the redundant STORE/LOAD pattern, which is found in [[PeepholeOptimizer3]]
. The other PeepholeOptimizers will be run regardless.
Attributes
- Source
- PeepholeSafeChecker.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Cache ClassReader objects to speed up bytecode inlining. Instead of reading in the bytes for each of the _prim classes each time, using a getResourceAsStream() call, we keep a cache of the ClassReader objects, which maps classnames to the corresponding ClassReaders. This resulted in a good speedup, though not as much as I had hoped for. ~Forrest (7/9/2006)
Cache ClassReader objects to speed up bytecode inlining. Instead of reading in the bytes for each of the _prim classes each time, using a getResourceAsStream() call, we keep a cache of the ClassReader objects, which maps classnames to the corresponding ClassReaders. This resulted in a good speedup, though not as much as I had hoped for. ~Forrest (7/9/2006)
Attributes
- Source
- PrimitiveCache.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PrimitiveCache.type
Attributes
- Source
- TypeConverter.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TypeConverter.type