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

Issue 717001: Refactor the code cache to handle large number of properties on the global ob... (Closed)

Created:
10 years, 9 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Refactor the code cache to handle large number of properties on the global object (take 2). A separate object type for the code cache have been added. This object has two different code caches. The first one (default_cache) is a fixed array organized in the same way as the as the code cache was before. The second cache (global_access_cache) is for code stubs to access the global object. This cache is organized as a hash table taking the property name and code flags as the key. The reason for separating the global access stubs into a hash table representation is that the number of these is not bounded in the same was as the other types. This is a remake of r3952 (http://codereview.chromium.org/652119) which have the additional ability to look for the index of code stubs for access to the global object. BUG=http://code.google.com/p/v8/issues/detail?id=613 Committed: http://code.google.com/p/v8/source/detail?r=4066

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+400 lines, -50 lines) Patch
M src/heap.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M src/ic.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/ic.cc View 9 chunks +11 lines, -9 lines 0 comments Download
M src/objects.h View 1 10 chunks +106 lines, -4 lines 0 comments Download
M src/objects.cc View 1 2 4 chunks +240 lines, -34 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 4 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
10 years, 9 months ago (2010-03-09 07:43:40 UTC) #1
Mads Ager (chromium)
LGTM when missing failure check is added. http://codereview.chromium.org/717001/diff/1/5 File src/ic.h (right): http://codereview.chromium.org/717001/diff/1/5#newcode97 src/ic.h:97: // Compute ...
10 years, 9 months ago (2010-03-09 09:30:38 UTC) #2
Søren Thygesen Gjesse
10 years, 9 months ago (2010-03-09 10:47:38 UTC) #3
Also changed the value of an un-allocated code cache back to an empty fixed
array as using the undefined object caused problems when running without
snapshots. The undefined object was not initialized when the first empty code
caches was set up causing a smi 0 to be set as the empty code cache for some
objects.

http://codereview.chromium.org/717001/diff/1/5
File src/ic.h (right):

http://codereview.chromium.org/717001/diff/1/5#newcode97
src/ic.h:97: // Compute the current IC state based on the target stub and the
receiver.
On 2010/03/09 09:30:38, Mads Ager wrote:
> target stub, receiver and name.

Done.

http://codereview.chromium.org/717001/diff/1/3
File src/objects.cc (right):

http://codereview.chromium.org/717001/diff/1/3#newcode3305
src/objects.cc:3305: Object* obj = EnsureCapacity(1, &key);
On 2010/03/09 09:30:38, Mads Ager wrote:
> EnsureCapacity can return a failure, please check for failure before using
> result.

Done.

http://codereview.chromium.org/717001/diff/1/6
File src/objects.h (right):

http://codereview.chromium.org/717001/diff/1/6#newcode3738
src/objects.h:3738: // Lookup code object in the cache. Returns code object if
found.
On 2010/03/09 09:30:38, Mads Ager wrote:
> What is returned if not found?

undefined - comment updated.

Powered by Google App Engine
This is Rietveld 408576698