Bug 141204 - TypeSet can use 1 byte instead of 4 bytes for its m_seenTypes member variable
Summary: TypeSet can use 1 byte instead of 4 bytes for its m_seenTypes member variable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-03 10:26 PST by Saam Barati
Modified: 2015-02-04 12:27 PST (History)
5 users (show)

See Also:


Attachments
patch (3.43 KB, patch)
2015-02-03 10:51 PST, Saam Barati
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2015-02-03 10:26:56 PST
No need to use the extra three bytes if we don't need them.
Comment 1 Saam Barati 2015-02-03 10:51:50 PST
Created attachment 245949 [details]
patch
Comment 2 Saam Barati 2015-02-04 12:04:37 PST
landed in:
http://trac.webkit.org/changeset/179621
Comment 3 Joseph Pecoraro 2015-02-04 12:27:26 PST
Comment on attachment 245949 [details]
patch

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

> Source/JavaScriptCore/runtime/TypeSet.h:54
> -enum RuntimeType {
> +enum RuntimeType : uint8_t {
>      TypeNothing            = 0x0,
>      TypeFunction           = 0x1,
>      TypeUndefined          = 0x2,

Do we need to count "Symbol" types now that they landed?

  js> function foo(arg) { console.log(arg); }
  js> foo(Symbol("test"));

Seems this would bump us over this edge, at least up to 16 bits.