Bug 151381

Summary: [JSC] Make LBasicBlock into an alias for B3::BasicBlock. #ifdef anything that does not compile
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Benjamin Poulain 2015-11-17 22:00:46 PST
[JSC] Make LBasicBlock into an alias for B3::BasicBlock. #ifdef anything that does not compile
Comment 1 Benjamin Poulain 2015-11-17 22:01:19 PST
Created attachment 265732 [details]
Patch
Comment 2 WebKit Commit Bot 2015-11-17 22:02:42 PST
Attachment 265732 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/ftl/FTLB3Output.h:33:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 19 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Benjamin Poulain 2015-11-18 13:49:32 PST
Created attachment 265774 [details]
Patch
Comment 4 Filip Pizlo 2015-11-18 14:01:32 PST
Comment on attachment 265774 [details]
Patch

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

> Source/JavaScriptCore/ftl/FTLAbbreviatedTypes.h:59
> +enum class LType {
> +    VoidType,
> +    Boolean,
> +    Int8,
> +    Int16,
> +    Int32,
> +    Int64,
> +    IntPtr,
> +    FloatType,
> +    DoubleType,
> +    Ref8,
> +    Ref16,
> +    Ref32,
> +    Ref64,
> +    RefPtr,
> +    RefFloat,
> +    RefDouble
> +};

Why do we need all of these types?

B3 has no notion of most of them.

> Source/JavaScriptCore/ftl/FTLCommonValues.h:74
>      const LType refPtr;
>      const LType refFloat;
>      const LType refDouble;
> -    const LValue booleanTrue;
> -    const LValue booleanFalse;
> -    const LValue int8Zero;
> -    const LValue int32Zero;
> -    const LValue int32One;
> -    const LValue int64Zero;
> -    const LValue intPtrZero;
> -    const LValue intPtrOne;
> -    const LValue intPtrTwo;
> -    const LValue intPtrThree;
> -    const LValue intPtrFour;
> -    const LValue intPtrEight;
> -    const LValue intPtrPtr;
> -    const LValue doubleZero;
> +    const LValue booleanTrue { nullptr };
> +    const LValue booleanFalse { nullptr };
> +    const LValue int8Zero { nullptr };
> +    const LValue int32Zero { nullptr };
> +    const LValue int32One { nullptr };
> +    const LValue int64Zero { nullptr };
> +    const LValue intPtrZero { nullptr };
> +    const LValue intPtrOne { nullptr };
> +    const LValue intPtrTwo { nullptr };
> +    const LValue intPtrThree { nullptr };
> +    const LValue intPtrFour { nullptr };
> +    const LValue intPtrEight { nullptr };
> +    const LValue intPtrPtr { nullptr };
> +    const LValue doubleZero { nullptr };

It might be better to say that if FTL_USES_B3, then FTLCommonValues doesn't have references to any types that B3 doesn't recognize.
Comment 5 Benjamin Poulain 2015-11-18 14:19:28 PST
Created attachment 265779 [details]
Patch
Comment 6 Benjamin Poulain 2015-11-18 14:46:52 PST
Created attachment 265782 [details]
Patch
Comment 7 WebKit Commit Bot 2015-11-18 14:49:06 PST
Attachment 265782 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:2986:  Wrong number of spaces before statement. (expected: 24)  [whitespace/indent] [4]
ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:2987:  Wrong number of spaces before statement. (expected: 24)  [whitespace/indent] [4]
Total errors found: 2 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Benjamin Poulain 2015-11-18 15:14:56 PST
Committed r192591: <http://trac.webkit.org/changeset/192591>