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

Issue 50041: Fixes uses of cajita's taming API and improves primFreeze speed. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 12 months ago by MarkM
Modified:
16 years, 8 months ago
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

(The following text appears in 'myvn describe' but was not showing here on appspot. I don't know why. Fixes uses of cajita's taming API and improves primFreeze speed. Deprecated in ___, in anticipation of removal: * grantEnumOnly, grantCall, grantGeneric, useApplyHandler, useCallHandler, handleGeneric, grantTypedGeneric, grantMutator, useDeleteHandler, isXo4aFunc, xo4a. Several of these will continue to be used internal to cajita.js, but should no longer be exposed. * Changed incorrect uses of ___.func() to use ___.markFuncFreeze(). * Changed incorrect uses of ___.grantCall() to a grant that also correctly determines what is read. * Changed anachronistic "grantEnumOnly" to "grantEnum". Likewise fastpathEnumOnly. * grantGeneric -> grantGenericMethod * grantTypedGeneric -> grantTypedMethod * grantMutator -> grantMutatingMethod * handleGeneric -> handleGenericMethod * ctor -> markCtor * frozenFunc -> markFuncFreeze * func -> markFuncOnly (only used by cajoled output) * xo4a -> markXo4a (only within cajita.js) primFreeze was typically doing much unneeded work enumerating all property names with a for-in, in order to delete or override the per-property *_canSet___ and *_canDelete___ flags. Instead, added a per-object SLOWFREEZE___ flag that records whether there may be any *_canSet___ or *_canDelete___ on this object. If not, as is typical, primFreeze can safely skip the enumeration. Added more internal diagnostics to catch more accidental bad usage of the taming API. Moved most of the logic for creating inert constructors from hidden tamed constructors from domita.js's inertClassCtor() to cajita.js's extend(). Refactored some to remove redundancy and make more robust. Fixes issue 1058 simply by removing the code that overrode the grant* operations. The CajaRuntimeDebuggingRewriter already rewrites the code it generates to avoid checking the fastpath flags by just calling the entry functions directly. Since the internal logic for using the fastpath is still intact, that should close issue 1058.

Patch Set 1 #

Patch Set 2 : Fixes uses cajita's taming API #

Patch Set 3 : Fixes uses cajita's taming API #

Patch Set 4 : Fixes uses cajita's taming API and improves primFreeze speed. #

Patch Set 5 : Fixes uses cajita's taming API and improves primFreeze speed. #

Patch Set 6 : Fixes uses cajita's taming API and improves primFreeze speed. #

Patch Set 7 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Total comments: 12

Patch Set 8 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Patch Set 9 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Patch Set 10 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Patch Set 11 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Patch Set 12 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Patch Set 13 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Total comments: 17

Patch Set 14 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Patch Set 15 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Patch Set 16 : Fixes uses of cajita's taming API and improves primFreeze speed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+609 lines, -529 lines) Patch
M experimental/doc/html/expandEmakerConversion/index.html View 2 chunks +2 lines, -2 lines 0 comments Download
M src/com/google/caja/cajita.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 65 chunks +365 lines, -181 lines 0 comments Download
M src/com/google/caja/cajita-debugmode.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +2 lines, -23 lines 0 comments Download
M src/com/google/caja/demos/applet/setup-valija.js View 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/demos/applet/testbed.js View 4 chunks +4 lines, -4 lines 0 comments Download
M src/com/google/caja/demos/calendar/demo-cajoled.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +13 lines, -14 lines 0 comments Download
M src/com/google/caja/demos/lolcat-search/search.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -4 lines 0 comments Download
M src/com/google/caja/demos/lolcat-search/searchengine.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M src/com/google/caja/demos/slides/index.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +8 lines, -7 lines 0 comments Download
M src/com/google/caja/domita/package.html View 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/parser/quasiliteral/CajitaRewriter.java View 7 chunks +7 lines, -7 lines 0 comments Download
M src/com/google/caja/permissive.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/plugin/bridal.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/plugin/domita.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 58 chunks +88 lines, -173 lines 0 comments Download
M src/com/google/caja/plugin/stages/CajaRuntimeDebuggingRewriter.java View 3 chunks +8 lines, -8 lines 0 comments Download
M tests/com/google/caja/CajitaTest.java View 10 11 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/demos/benchmarks/BenchmarkRunner.java View 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/opensocial/example-dynamic-styles-rewritten.xml View 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/opensocial/example-rewritten.xml View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/CajitaRewriterTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 34 chunks +39 lines, -39 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/CommonJsRewriterTestCase.java View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/DefaultValijaRewriterTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +9 lines, -9 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/taming_test.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -10 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/valija_module_loading.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -6 lines 0 comments Download
M tests/com/google/caja/plugin/HtmlCompiledPluginTest.java View 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/plugin/container.js View 1 chunk +7 lines, -7 lines 0 comments Download
M tests/com/google/caja/plugin/domita_test.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +19 lines, -18 lines 0 comments Download
M tests/com/google/caja/plugin/stages/DebuggingSymbolsStageTest.java View 1 chunk +1 line, -1 line 0 comments Download
M yuitest/yahoo_dom_host.html View 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10
MarkM
16 years, 12 months ago (2009-04-23 20:03:46 UTC) #1
ben
Using this code review to test the usefulness of http://code.google.com/p/google-caja/wiki/NiceNeighbor, the first issue I hit ...
16 years, 12 months ago (2009-04-23 20:47:34 UTC) #2
BenL
http://codereview.appspot.com/50041/diff/4001/4009 File src/com/google/caja/cajita-debugmode.js (right): http://codereview.appspot.com/50041/diff/4001/4009#newcode355 Line 355: 'grantEnum', noop, Perhaps a comment to say why ...
16 years, 11 months ago (2009-05-20 20:09:27 UTC) #3
MarkM
Still looking at your first issue below -- the disabling of some taming methods by ...
16 years, 9 months ago (2009-06-26 06:31:54 UTC) #4
ben
I guess I need to see a new patch? http://codereview.appspot.com/50041/diff/4001/4003 File tests/com/google/caja/parser/quasiliteral/taming_test.html (right): http://codereview.appspot.com/50041/diff/4001/4003#newcode88 Line ...
16 years, 9 months ago (2009-06-26 11:31:21 UTC) #5
ben
http://codereview.appspot.com/50041/diff/10037/8111 File src/com/google/caja/cajita.js (right): http://codereview.appspot.com/50041/diff/10037/8111#newcode465 Line 465: fail('Not writable: (', debugReference(obj), ').', name); If we're ...
16 years, 9 months ago (2009-07-06 10:26:20 UTC) #6
ihab.awad
The domita.js changes look great, thanks! Only minor comments. http://codereview.appspot.com/50041/diff/10037/8109 File src/com/google/caja/cajita-debugmode.js (left): http://codereview.appspot.com/50041/diff/10037/8109#oldcode81 Line ...
16 years, 9 months ago (2009-07-06 21:11:07 UTC) #7
MarkM
http://codereview.appspot.com/50041/diff/10037/8109 File src/com/google/caja/cajita-debugmode.js (left): http://codereview.appspot.com/50041/diff/10037/8109#oldcode81 Line 81: On 2009/07/06 21:11:08, ihab.awad wrote: > Why can ...
16 years, 9 months ago (2009-07-07 07:56:00 UTC) #8
ben
I forgot to say, LTGM, modulo naming changes as discussed.
16 years, 9 months ago (2009-07-07 10:45:59 UTC) #9
ben
16 years, 9 months ago (2009-07-07 11:07:22 UTC) #10
LGTM, with naming changes.

One final comment, act on it if you see fit: perhaps markFuncOnly should be
markFuncOnly_ to suggest it is internal only?
Sign in to reply to this message.

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