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

Issue 2374041: Defer creation of per-instance function properties (Closed)

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

Description

Installs getters on Function.prototype for length, prototype, and name that whitelist those properties on the instance on first access.

Patch Set 1 #

Patch Set 2 : Defer creation of per-instance function properties #

Patch Set 3 : Defer creation of per-instance function properties #

Patch Set 4 : Defer creation of per-instance function properties #

Total comments: 2

Patch Set 5 : Defer creation of per-instance function properties #

Patch Set 6 : Defer creation of per-instance function properties #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -42 lines) Patch
M src/com/google/caja/es53.js View 1 2 3 4 5 7 chunks +104 lines, -42 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/ES53RewriterTest.java View 2 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 2
metaweta
15 years, 9 months ago (2010-10-05 20:58:11 UTC) #1
Jasvir
15 years, 9 months ago (2010-10-07 17:55:57 UTC) #2
LGTM++

This will help speed a lot in the common case where properties aren't read or
written to on functions.

http://codereview.appspot.com/2374041/diff/8001/src/com/google/caja/es53.js
File src/com/google/caja/es53.js (right):

http://codereview.appspot.com/2374041/diff/8001/src/com/google/caja/es53.js#n...
src/com/google/caja/es53.js:759: f.name_g___ = markFunc(function() {return
name;});
Comment this as special for Rhino

http://codereview.appspot.com/2374041/diff/8001/src/com/google/caja/es53.js#n...
src/com/google/caja/es53.js:797: // We check for name___ to see if
installFunctionInstanceProps has
This can be nuked.
Sign in to reply to this message.

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