Bug 138051 - Simplified IndexingType's hasAnyArrayStorage()
Summary: Simplified IndexingType's hasAnyArrayStorage()
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
Depends on:
Reported: 2014-10-24 11:51 PDT by Mark Lam
Modified: 2014-10-24 12:18 PDT (History)
0 users

See Also:

the patch. (2.73 KB, patch)
2014-10-24 11:57 PDT, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2014-10-24 11:51:42 PDT
IndexingType's hasAnyArrayStorage() currently does subtraction of ArrayStorageShape with the purpose of making non-ArrayStorage types underflow (with that subtraction) and have a result that exceeds SlowPutArrayStorageShape. What it is doing is basically checking for a shape value that is greater equal to ArrayStorageShape.  We can just simplify the code as such.
Comment 1 Mark Lam 2014-10-24 11:57:11 PDT
Created attachment 240421 [details]
the patch.
Comment 2 Michael Saboff 2014-10-24 12:10:38 PDT
Comment on attachment 240421 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=240421&action=review

Fix the comment issues.

> Source/JavaScriptCore/runtime/IndexingType.h:39
> +    struct IndextingType {

Spelling of IndextingType

> Source/JavaScriptCore/runtime/IndexingType.h:42
> +    	uint8_t maHaveIndexedShapes:1;    // bit 5

Should this be mayHaveIndexedShapes?
Comment 3 Mark Lam 2014-10-24 12:18:11 PDT
Thanks.  I also found 2 more errors in the comments (should not have tabs, and "mayHaveIndexedAccessors"instead of "mayHaveIndexedShape").

Fixed comments, and landed in r175172: <http://trac.webkit.org/r175172>.