Bug 141204

Summary: TypeSet can use 1 byte instead of 4 bytes for its m_seenTypes member variable
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, mark.lam, mmirman, msaboff
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch darin: review+

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.