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

Issue 10626004: Cleaning up usage of lookup results. (Closed)

Created:
8 years, 6 months ago by Toon Verwaest
Modified:
8 years, 6 months ago
Reviewers:
danno
CC:
v8-dev
Visibility:
Public.

Description

Cleaning up usage of lookup results. - Ensure that IsFound() is only used when not in combination with other checks. To do so, the default type is NONEXISTENT rather than NORMAL; and NotFound() also resets the type to NONEXISTENT. - Use test methods rather than .type() == A_PROPERTY_TYPE. Committed: https://code.google.com/p/v8/source/detail?r=11899

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -81 lines) Patch
M src/arm/lithium-codegen-arm.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/hydrogen.cc View 5 chunks +7 lines, -11 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/ic.cc View 9 chunks +9 lines, -12 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/mips/stub-cache-mips.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/objects.cc View 10 chunks +15 lines, -13 lines 0 comments Download
M src/property.h View 6 chunks +11 lines, -4 lines 5 comments Download
M src/runtime.cc View 13 chunks +15 lines, -18 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Toon Verwaest
PTAL. This is a step towards weeding out the differences between descriptors / transitions / ...
8 years, 6 months ago (2012-06-21 14:20:32 UTC) #1
danno
8 years, 6 months ago (2012-06-21 14:34:30 UTC) #2
LGTM if you beef up your internal checking of state with some asserts.

https://chromiumcodereview.appspot.com/10626004/diff/1/src/property.h
File src/property.h (right):

https://chromiumcodereview.appspot.com/10626004/diff/1/src/property.h#newcode269
src/property.h:269: bool IsFastPropertyType() { return type() != NORMAL; }
Add asserts for (IsFound());

https://chromiumcodereview.appspot.com/10626004/diff/1/src/property.h#newcode271
src/property.h:271: bool IsCallbacks() { return details_.type() == CALLBACKS; }
Add asserts for (IsFound());

https://chromiumcodereview.appspot.com/10626004/diff/1/src/property.h#newcode278
src/property.h:278: bool IsField() { return details_.type() == FIELD; }
Add asserts for (IsFound());

https://chromiumcodereview.appspot.com/10626004/diff/1/src/property.h#newcode279
src/property.h:279: bool IsNormal() { return details_.type() == NORMAL; }
Add asserts for (IsFound());

https://chromiumcodereview.appspot.com/10626004/diff/1/src/property.h#newcode280
src/property.h:280: bool IsConstantFunction() { return details_.type() ==
CONSTANT_FUNCTION; }
Add asserts for (IsFound());

Powered by Google App Engine
This is Rietveld 408576698