Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(146)

Issue 8703: An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
17 years, 6 months ago by MikeSamuel
Modified:
13 years, 9 months ago
Reviewers:
metaweta, MarkM, ihab.awad
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This change - Implements an optimization pass between ConsolidateCode and ValidateJavascript that folds converts foo[bar] to foo[+bar] when bar is provably a publicly accessible array member regardless of what foo is. - Adds a convenience link for the crypto-AES benchmark to the testbed, and makes the game of life button into a similar convenience link. - Adds tests that measure the performance improvement on the array-heavy crypto-AES benchmark. - Adds tests to browser-expectations that allow us to quickly determine whether a particular interpreter behaves correctly around numeric operators. Unresolved questions: - A previous implementation turned off the optimization when debug mode was off so that cajita-debugmode.js could give proper stacktraces for expressions like (a = null, a[0]). Since CajitaRewriter now does the job of optimizing, do we need to turn off the array index optimizations in CajitaRewriter when pluginMeta.getDebugMode() is true?

Patch Set 1 #

Total comments: 38

Patch Set 2 : An optimization pass that removes unnecessary runtime checks around array acceses. #

Patch Set 3 : An optimization pass that removes unnecessary runtime checks around array acceses. #

Total comments: 2

Patch Set 4 : An optimization pass that removes unnecessary runtime checks around array acceses. #

Patch Set 5 : An optimization pass that removes unnecessary runtime checks around array acceses. #

Patch Set 6 : An optimization pass that removes unnecessary runtime checks around array acceses. #

Patch Set 7 : An optimization pass that removes unnecessary runtime checks around array acceses. #

Patch Set 8 : An optimization pass that removes unnecessary runtime checks around array acceses. #

Patch Set 9 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 10 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 11 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 12 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 13 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 14 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 15 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Total comments: 11

Patch Set 16 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 17 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Patch Set 18 : An optimization pass that annotates array acceses so that CajitaRewriter can optimize them. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2204 lines, -374 lines) Patch
M build.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +9 lines, -0 lines 0 comments Download
A src/com/google/caja/demos/applet/example-aes.js View 6 7 8 9 1 chunk +460 lines, -0 lines 0 comments Download
A src/com/google/caja/demos/applet/example-life.js View 1 chunk +87 lines, -0 lines 0 comments Download
M src/com/google/caja/demos/applet/index.html View 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +41 lines, -47 lines 0 comments Download
M src/com/google/caja/demos/applet/testbed.js View 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +14 lines, -8 lines 0 comments Download
A src/com/google/caja/demos/applet/xmlhttp.js View 1 chunk +138 lines, -0 lines 0 comments Download
M src/com/google/caja/opensocial/GadgetParser.java View 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -4 lines 0 comments Download
M src/com/google/caja/parser/AncestorChain.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +29 lines, -31 lines 0 comments Download
M src/com/google/caja/parser/js/CajoledModule.java View 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -1 line 0 comments Download
M src/com/google/caja/parser/quasiliteral/CajitaRewriter.java View 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +46 lines, -18 lines 0 comments Download
M src/com/google/caja/parser/quasiliteral/DefaultValijaRewriter.java View 12 13 14 15 16 17 1 chunk +2 lines, -2 lines 0 comments Download
M src/com/google/caja/parser/quasiliteral/ModuleManager.java View 12 13 14 15 16 17 2 chunks +4 lines, -3 lines 0 comments Download
M src/com/google/caja/parser/quasiliteral/Scope.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +7 lines, -3 lines 0 comments Download
M src/com/google/caja/parser/quasiliteral/TextRuleDoclet.java View 12 13 14 15 16 17 1 chunk +3 lines, -2 lines 0 comments Download
A src/com/google/caja/parser/quasiliteral/opt/ArrayIndexOptimization.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +306 lines, -0 lines 0 comments Download
A src/com/google/caja/parser/quasiliteral/opt/ScopeTree.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +165 lines, -0 lines 0 comments Download
M src/com/google/caja/plugin/ExpressionSanitizerCaja.java View 12 13 14 15 16 17 1 chunk +5 lines, -1 line 0 comments Download
M src/com/google/caja/plugin/FileSystemEnvironment.java View 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +1 line, -2 lines 0 comments Download
M src/com/google/caja/plugin/PluginCompiler.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -0 lines 0 comments Download
M src/com/google/caja/plugin/PluginCompilerMain.java View 5 6 7 8 9 10 11 12 13 14 15 16 17 9 chunks +24 lines, -46 lines 0 comments Download
A src/com/google/caja/plugin/stages/OptimizeJavascriptStage.java View 1 2 3 4 5 6 7 8 1 chunk +30 lines, -0 lines 0 comments Download
M src/com/google/caja/plugin/templates/HtmlAttributeRewriter.java View 1 chunk +1 line, -2 lines 0 comments Download
M src/com/google/caja/service/JsHandler.java View 12 13 14 15 16 17 1 chunk +3 lines, -1 line 0 comments Download
M src/com/google/caja/tools/BuildService.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
D src/com/google/caja/util/CapturingReader.java View 1 2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -81 lines 0 comments Download
M tests/com/google/caja/AllTests.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +6 lines, -2 lines 0 comments Download
M tests/com/google/caja/browser-expectations.html View 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M tests/com/google/caja/parser/js/FuzzedParserTest.java View 15 16 17 7 chunks +10 lines, -10 lines 0 comments Download
M tests/com/google/caja/parser/js/ParserTest.java View 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -4 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/CajitaRewriterTest.java View 1 2 3 4 5 12 13 14 15 16 17 2 chunks +5 lines, -2 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/CommonJsRewriterTestCase.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +50 lines, -16 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/DefaultValijaRewriterTest.java View 12 13 14 15 16 17 2 chunks +5 lines, -5 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/ModuleFormatTest.java View 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M tests/com/google/caja/parser/quasiliteral/RewriterTestCase.java View 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
A tests/com/google/caja/parser/quasiliteral/opt/ArrayIndexOptimizationTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +409 lines, -0 lines 0 comments Download
A tests/com/google/caja/parser/quasiliteral/opt/ScopeTreeTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +140 lines, -0 lines 0 comments Download
A tests/com/google/caja/parser/quasiliteral/opt/array-opt-operator-test.js View 1 chunk +64 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/DomitaTest.java View 12 13 14 15 16 17 4 chunks +6 lines, -7 lines 0 comments Download
M tests/com/google/caja/plugin/HtmlCompiledPluginTest.java View 5 6 7 8 9 12 13 14 15 16 17 1 chunk +3 lines, -3 lines 0 comments Download
A tests/com/google/caja/plugin/stages/OptimizeJavascriptStageTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +99 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/stages/PipelineStageTestCase.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M tests/com/google/caja/reporting/TestBuildInfo.java View 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
D tests/com/google/caja/util/CapturingReaderTest.java View 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -68 lines 0 comments Download
M tests/com/google/caja/util/RhinoTestBed.java View 12 13 14 15 16 17 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 14
MikeSamuel
17 years, 6 months ago (2008-12-03 04:48:14 UTC) #1
MikeSamuel
ping
17 years, 6 months ago (2008-12-16 20:08:09 UTC) #2
MarkM
Review still very incomplete, but publishing now so we can overlap answers with more questions. ...
17 years, 6 months ago (2008-12-20 00:22:30 UTC) #3
ihab.awad
Just one little thing I found when reading the CL. http://codereview.appspot.com/8703/diff/1401/1424 File src/com/google/caja/util/CapturingReader.java (right): http://codereview.appspot.com/8703/diff/1401/1424#newcode65 ...
17 years, 4 months ago (2009-02-20 05:49:07 UTC) #4
MikeSamuel
http://codereview.appspot.com/8703/diff/1401/1424 File src/com/google/caja/util/CapturingReader.java (right): http://codereview.appspot.com/8703/diff/1401/1424#newcode65 Line 65: delegate.close(); On 2009/02/20 05:49:07, ihab.awad wrote: > Is ...
17 years, 3 months ago (2009-03-05 02:21:19 UTC) #5
MikeSamuel
http://codereview.appspot.com/8703/diff/1/15 File src/com/google/caja/opensocial/applet/example-aes.js (right): http://codereview.appspot.com/8703/diff/1/15#newcode37 Line 37: * AES Cipher function: encrypt 'input' with Rijndael ...
17 years, 2 months ago (2009-04-25 01:49:14 UTC) #6
metaweta
http://codereview.appspot.com/8703/diff/1/17 File src/com/google/caja/parser/quasiliteral/opt/ArrayIndexOptimization.java (right): http://codereview.appspot.com/8703/diff/1/17#newcode63 Line 63: * use-before-initialization. On 2009/04/25 01:49:14, MikeSamuel wrote: > ...
17 years, 2 months ago (2009-04-25 03:38:31 UTC) #7
MikeSamuel
Reworked to run before the Cajita Rewriter and got rid of OptimizationPass. See especially changes ...
17 years, 1 month ago (2009-05-20 05:20:18 UTC) #8
MikeSamuel
Mark is going to take over this change.
17 years, 1 month ago (2009-05-20 20:42:47 UTC) #9
MarkM
Although we can't make full use of this CL because of issue 1093, and although ...
16 years, 10 months ago (2009-08-05 20:36:19 UTC) #10
metaweta
On 2009/08/05 20:36:19, MarkM wrote: > Although we can't make full use of this CL ...
14 years, 6 months ago (2011-12-16 17:40:53 UTC) #11
metaweta
On 2011/12/16 17:40:53, metaweta wrote: > Please close this review. Ping.
14 years, 4 months ago (2012-02-28 20:37:26 UTC) #12
metaweta
On 2012/02/28 20:37:26, metaweta wrote: > On 2011/12/16 17:40:53, metaweta wrote: > > Please close ...
14 years, 3 months ago (2012-03-27 00:04:37 UTC) #13
metaweta
13 years, 9 months ago (2012-09-06 17:59:06 UTC) #14
On 2012/03/27 00:04:37, metaweta wrote:
> On 2012/02/28 20:37:26, metaweta wrote:
> > On 2011/12/16 17:40:53, metaweta wrote:
> > > Please close this review.
> > 
> > Ping.
> 
> ping

ping
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b