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

Issue 6685073: Remember and reuse derived map for external arrays (Closed)

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

Description

Remember and reuse derived map for external arrays Ensure that all objects that had the same map before attaching an external array have the same map once the external array is attached. BUG=75639 TEST=fast/canvas/webgl/uninitialized-test.html Committed: http://code.google.com/p/v8/source/detail?r=7318

Patch Set 1 #

Patch Set 2 : fix formatting #

Total comments: 2

Patch Set 3 : fix handling of empty property name #

Total comments: 12

Patch Set 4 : review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -70 lines) Patch
M src/api.cc View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M src/bootstrapper.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/factory.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M src/factory.cc View 1 2 3 1 chunk +8 lines, -2 lines 0 comments Download
M src/mark-compact.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M src/mirror-debugger.js View 1 chunk +9 lines, -8 lines 0 comments Download
M src/objects.h View 1 2 3 6 chunks +47 lines, -19 lines 0 comments Download
M src/objects.cc View 1 2 3 7 chunks +90 lines, -5 lines 0 comments Download
M src/objects-inl.h View 1 2 3 2 chunks +2 lines, -16 lines 0 comments Download
M src/property.h View 1 2 2 chunks +12 lines, -1 line 0 comments Download
M src/property.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/stub-cache.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/v8globals.h View 1 2 1 chunk +9 lines, -8 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +89 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
danno
please review
9 years, 9 months ago (2011-03-17 22:39:58 UTC) #1
danno
please review
9 years, 9 months ago (2011-03-17 22:40:24 UTC) #2
Mads Ager (chromium)
We need to deal with setting properties with the empty string as the name on ...
9 years, 9 months ago (2011-03-21 08:32:40 UTC) #3
danno
Please take a look again, there were enough changes to warrant a second look.
9 years, 9 months ago (2011-03-22 16:05:30 UTC) #4
Mads Ager (chromium)
LGTM http://codereview.chromium.org/6685073/diff/8001/src/factory.cc File src/factory.cc (right): http://codereview.chromium.org/6685073/diff/8001/src/factory.cc#newcode399 src/factory.cc:399: CALL_HEAP_FUNCTION(isolate(), src->GetExternalArrayElementsMap( I would prefer a different indentation ...
9 years, 9 months ago (2011-03-22 18:57:25 UTC) #5
danno
9 years, 9 months ago (2011-03-23 09:56:52 UTC) #6
comments addressed and committing

http://codereview.chromium.org/6685073/diff/8001/src/factory.cc
File src/factory.cc (right):

http://codereview.chromium.org/6685073/diff/8001/src/factory.cc#newcode399
src/factory.cc:399: CALL_HEAP_FUNCTION(isolate(),
src->GetExternalArrayElementsMap(
On 2011/03/22 18:57:25, Mads Ager wrote:
> I would prefer a different indentation here. How about:
> 
> CALL_HEAP_FUNCTION(isolate(),
>                    src->GetExternalArrayElementsMap(array_type,
>                                                     safe_to_add_transition),
>                    Map);
> 
> Or something like that?
>  

Done.

http://codereview.chromium.org/6685073/diff/8001/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/6685073/diff/8001/src/objects.cc#newcode1293
src/objects.cc:1293: ASSERT(
On 2011/03/22 18:57:25, Mads Ager wrote:
> Move fist disjunct of the assert to the first line?

Done.

http://codereview.chromium.org/6685073/diff/8001/src/objects.cc#newcode1836
src/objects.cc:1836: String* external_array_sentinel_name =
HEAP->empty_symbol();
On 2011/03/22 18:57:25, Mads Ager wrote:
> Let's replace HEAP with GetIsolate()->heap() here to not introduce more uses
of
> he HEAP macro.

Done.

http://codereview.chromium.org/6685073/diff/8001/src/objects.cc#newcode1875
src/objects.cc:1875: COUNTERS->map_to_external_array_elements()->Increment();
On 2011/03/22 18:57:25, Mads Ager wrote:
> GetIsolate()->counters() instead of COUNTERS.

Done.

http://codereview.chromium.org/6685073/diff/8001/src/objects.cc#newcode1883
src/objects.cc:1883:
(heap->isolate()->context()->global_context()->object_function()->map() !=
On 2011/03/22 18:57:25, Mads Ager wrote:
> Instead of getting the heap and using heap->isolate() you can do
> GetIsolate()->context() here.

Done.

http://codereview.chromium.org/6685073/diff/8001/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/6685073/diff/8001/test/cctest/test-api.cc#newc...
test/cctest/test-api.cc:11605: result = CompileRun("ext_array[\"\"] = 23;
ext_array[\"\"]");
On 2011/03/22 18:57:25, Mads Ager wrote:
> You can use '' for the empty string in JS code here and below.

Done.

Powered by Google App Engine
This is Rietveld 408576698