Change 20070919-dda-f by [EMAIL PROTECTED] on 2007-09-19 13:41:48 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk/WEB-INF/lps/server/ src/org/openlaszlo/sc for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/ server/src/org/openlaszlo/sc

Summary: generatePredictableTemps option for script compiler

New Features:
added new option generatePredictableTemps that allows for direct comparison
  of compiler outputs.

Bugs Fixed:

Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
  The new option, is specified to the compiler like this:
   --option generatePredictableTemps=true

Note that this option is *not* the default, nor is it recommended for anyone that is not doing side-by-side tests of the compiler. When used, it may in fact *break* functionality. It provides some capabilities to assist in internal testing, and specifically for testing the refactoring work.

When this is option is set, variables that normally use a UUID- like naming (for uniqueness between runs) are changed to have predictable names, that is names that will be identical each time the compiler is rerun. Such predictable names (like "$lzsc$1", "$lzsc$2", etc.) will collide with the same names used in other compilations that appear in the same applications, which may cause problems at runtime. This option uses a simple increment to generate names. Seeding the random number generator with a fixed value, like 0, would also work
  but the output will appear more obfuscated.

The intention is that this option can be used when making an architectural or 'cleanup' change to the compiler that is not intended to change any behavior. When this change is done, a suitably complete test input can be fed to the old and new compiler, both with the generatePredictableTemps option, and comparisons of outputs can be made directly.


Tests:

Files:
M      Compiler.java
M      JavascriptGenerator.java
M      CodeGenerator.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070919-dda- f.tar



--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

Voice:  617-547-7881
Email:  [EMAIL PROTECTED]
WWW:    http://www.ddanderson.com

Reply via email to