Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(917)

Issue 1731002: Don't share function result caches between contexts. (Closed)

Created:
10 years, 8 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
CC:
v8-dev, podivilov
Visibility:
Public.

Description

Don't share function result caches between contexts. A reference to the caches array was embedded directly into the builtin code and this allowed sharing objects between contexts. Unfortunately, clearing the cache on GC won't prevent sharing so we either have to have per-context builtin code or load the cache indirectly from the current context. This change implements the second approach. The first approach may be interesting to consider in the future for some perfomance critical functions, and the current approach can still be improved by putting the caches directly into the global context (or even global objects). Committed: http://code.google.com/p/v8/source/detail?r=4486

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -9 lines) Patch
M src/arm/codegen-arm.cc View 1 1 chunk +5 lines, -3 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 1 chunk +9 lines, -3 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 1 chunk +9 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Vitaly Repeshko
Anton, This is a quick fix I needed while debugging window.open memory leak reported by ...
10 years, 8 months ago (2010-04-20 22:49:39 UTC) #1
Lasse Reichstein
Drive-by comment: The cache should definitely be per-context (and I should have noticed during review. ...
10 years, 8 months ago (2010-04-21 07:33:46 UTC) #2
antonm
Thanks a lot for spotting this and sorry for introducing the trouble. Almost LGTM. Am ...
10 years, 8 months ago (2010-04-21 11:13:27 UTC) #3
Vitaly Repeshko
http://codereview.chromium.org/1731002/diff/1/2 File src/arm/codegen-arm.cc (right): http://codereview.chromium.org/1731002/diff/1/2#newcode4179 src/arm/codegen-arm.cc:4179: __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); On 2010/04/21 11:13:27, antonm wrote: ...
10 years, 8 months ago (2010-04-23 12:43:04 UTC) #4
Vitaly Repeshko
On 2010/04/21 11:13:27, antonm wrote: > Thanks a lot for spotting this and sorry for ...
10 years, 8 months ago (2010-04-23 12:45:39 UTC) #5
antonm
10 years, 8 months ago (2010-04-23 12:52:53 UTC) #6
LGTM and thanks

Powered by Google App Engine
This is Rietveld 408576698