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

Issue 6306014: Fix reintroduction of global variables that have been deleted. (Closed)

Created:
9 years, 11 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix reintroduction of global variables that have been deleted. Deletion of global properties puts 'the hole' in the global property cell and updates the property details in the property dictionary with the information that the property has been deleted. When setting global properties that have been deleted in generated code we just store the new value in the global property cell. This does not update the property details in the property dictionary. Therefore, it looks like the property is not there eventhough it was just reintroduced. Perform 'the hole' checks in generated code for global property stores and bail out of ICs and optimized code if storing to a property cell that contains 'the hole'. Committed: http://code.google.com/p/v8/source/detail?r=6508

Patch Set 1 #

Total comments: 1

Patch Set 2 : x64 LoadRoot and only check in lithium when needed #

Total comments: 2

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -23 lines) Patch
M src/arm/lithium-arm.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 1 chunk +8 lines, -1 line 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 1 chunk +20 lines, -2 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 1 chunk +11 lines, -2 lines 0 comments Download
M src/hydrogen.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/hydrogen-instructions.h View 1 2 chunks +8 lines, -2 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 1 chunk +13 lines, -1 line 0 comments Download
M src/ia32/lithium-ia32.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 chunk +14 lines, -4 lines 0 comments Download
M src/objects-inl.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 1 chunk +10 lines, -2 lines 0 comments Download
M test/mjsunit/delete-global-properties.js View 2 chunks +14 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Mads Ager (chromium)
9 years, 11 months ago (2011-01-26 18:26:50 UTC) #1
Kevin Millikin (Chromium)
LGTM. http://codereview.chromium.org/6306014/diff/1/src/x64/stub-cache-x64.cc File src/x64/stub-cache-x64.cc (right): http://codereview.chromium.org/6306014/diff/1/src/x64/stub-cache-x64.cc#newcode2447 src/x64/stub-cache-x64.cc:2447: __ cmpq(kScratchRegister, I think theres a compare root ...
9 years, 11 months ago (2011-01-27 05:27:54 UTC) #2
Mads Ager (chromium)
Thanks Kevin. I used CompareRoot on x64 (not there on ARM). Also, I changed hydrogen ...
9 years, 11 months ago (2011-01-27 07:13:34 UTC) #3
Kevin Millikin (Chromium)
Still LGTM. It would be great if we could come up with some easy tests ...
9 years, 11 months ago (2011-01-27 07:56:07 UTC) #4
Mads Ager (chromium)
9 years, 11 months ago (2011-01-27 08:33:36 UTC) #5
http://codereview.chromium.org/6306014/diff/5001/src/arm/lithium-arm.cc
File src/arm/lithium-arm.cc (right):

http://codereview.chromium.org/6306014/diff/5001/src/arm/lithium-arm.cc#newco...
src/arm/lithium-arm.cc:1605: LOperand* temp = instr->check_hole_value() ?
TempRegister() : NULL;
On 2011/01/27 07:56:07, Kevin Millikin wrote:
> OK, but since almost every line has to check the same flag, I'd split it into:
> 
> if (instr->check_hole_value()) {
>   LOperand* temp = TempRegister();
>   LOperand* value = UseRegister(instr->value());
>   LStoreGlobal* result = new LStoreGlobal(value, temp);
>   return AssignEnvironment(result);
> } else {
>   LOperand* value = UseRegisterAtStart(instr->value());
>   return new LStoreGlobal(value, NULL);
> }

Done.

Powered by Google App Engine
This is Rietveld 408576698