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

Issue 4078: - Added a map cache for literal objects. This will... (Closed)

Created:
12 years, 3 months ago by bak
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

- Added a map cache for literal objects. This will canonicalize maps for object literals. JSON objects with the same set of properties names will then share the same map. This reduces the amount of generated code associated with object literals. - Added a flag canonicalize_object_literal_maps. (default true) - Changed the format of a function's literal array. Only the global context is now stored in the literal prefix. Committed: http://code.google.com/p/v8/source/detail?r=371

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -43 lines) Patch
M src/ast.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/codegen-ia32.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M src/contexts.h View 2 chunks +3 lines, -1 line 0 comments Download
M src/factory.h View 3 chunks +18 lines, -0 lines 0 comments Download
M src/factory.cc View 3 chunks +49 lines, -6 lines 1 comment Download
M src/flag-definitions.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/objects.h View 4 chunks +22 lines, -5 lines 0 comments Download
M src/objects.cc View 4 chunks +76 lines, -7 lines 1 comment Download
M src/objects-inl.h View 2 chunks +6 lines, -0 lines 0 comments Download
M src/parser.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/runtime.cc View 5 chunks +47 lines, -19 lines 3 comments Download

Messages

Total messages: 2 (0 generated)
bak
12 years, 3 months ago (2008-09-25 07:05:16 UTC) #1
Mads Ager (chromium)
12 years, 3 months ago (2008-09-25 07:23:18 UTC) #2
LGTM!

http://codereview.chromium.org/4078/diff/1/12
File src/factory.cc (right):

http://codereview.chromium.org/4078/diff/1/12#newcode769
Line 769: Handle<FixedArray> keys,
Indentation slightly off here.

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

http://codereview.chromium.org/4078/diff/1/2#newcode5664
Line 5664: // SymbolsKey used for HashTable were key is array of symbols.
were -> where

http://codereview.chromium.org/4078/diff/1/4
File src/runtime.cc (right):

http://codereview.chromium.org/4078/diff/1/4#newcode101
Line 101: Handle<FixedArray> constant_properties,
Indentation slightly off here.

http://codereview.chromium.org/4078/diff/1/4#newcode107
Line 107: while ((number_of_symbol_keys < number_of_properties)
How about: 

    while ((number_of_symbol_keys == number_of_properties) &&
           (constant_properties->get(number_of_symbol_keys*2)->IsSymbol())) {

Doesn't that fit in 80 columns?

http://codereview.chromium.org/4078/diff/1/4#newcode117
Line 117: // Create the fixed array with the key.
Indent two more spaces?

Powered by Google App Engine
This is Rietveld 408576698