Ignore:
Timestamp:
Aug 15, 2011, 4:44:41 PM (14 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=66263
DFG JIT does not always zero extend boolean result of DFG operations

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
    • Change bool return values to a 64-bit type.

LayoutTests:

  • fast/js/kde/script-tests/operators.js:

(nonSpeculativeNotInner):
(nonSpeculativeNot):
(nonSpeculativeLessInner):
(nonSpeculativeLess):
(nonSpeculativeLessEqInner):
(nonSpeculativeLessEq):
(nonSpeculativeGreaterInner):
(nonSpeculativeGreater):
(nonSpeculativeGreaterEqInner):
(nonSpeculativeGreaterEq):
(nonSpeculativeEqualInner):
(nonSpeculativeEqual):
(nonSpeculativeNotEqualInner):
(nonSpeculativeNotEqual):
(nonSpeculativeStrictEqualInner):
(nonSpeculativeStrictEqual):
(nonSpeculativeStrictNotEqualInner):
(nonSpeculativeStrictNotEqual):

  • Add tests cases that will hit the non-spec path.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.h

    r91607 r93070  
    3535enum PutKind { Direct, NotDirect };
    3636
     37typedef intptr_t RegisterSizedBoolean;
     38
    3739extern "C" {
    3840
     
    4547typedef EncodedJSValue (*J_DFGOperation_EP)(ExecState*, void*);
    4648typedef EncodedJSValue (*J_DFGOperation_EI)(ExecState*, Identifier*);
    47 typedef bool (*Z_DFGOperation_EJ)(ExecState*, EncodedJSValue);
    48 typedef bool (*Z_DFGOperation_EJJ)(ExecState*, EncodedJSValue, EncodedJSValue);
     49typedef RegisterSizedBoolean (*Z_DFGOperation_EJ)(ExecState*, EncodedJSValue);
     50typedef RegisterSizedBoolean (*Z_DFGOperation_EJJ)(ExecState*, EncodedJSValue, EncodedJSValue);
    4951typedef void (*V_DFGOperation_EJJJ)(ExecState*, EncodedJSValue, EncodedJSValue, EncodedJSValue);
    5052typedef void (*V_DFGOperation_EJJP)(ExecState*, EncodedJSValue, EncodedJSValue, void*);
     
    8385void operationPutByIdDirectStrictOptimize(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier*);
    8486void operationPutByIdDirectNonStrictOptimize(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier*);
    85 bool operationCompareLess(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    86 bool operationCompareLessEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    87 bool operationCompareGreater(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    88 bool operationCompareGreaterEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    89 bool operationCompareEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    90 bool operationCompareStrictEqCell(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    91 bool operationCompareStrictEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     87RegisterSizedBoolean operationCompareLess(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     88RegisterSizedBoolean operationCompareLessEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     89RegisterSizedBoolean operationCompareGreater(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     90RegisterSizedBoolean operationCompareGreaterEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     91RegisterSizedBoolean operationCompareEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     92RegisterSizedBoolean operationCompareStrictEqCell(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     93RegisterSizedBoolean operationCompareStrictEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    9294void* operationVirtualCall(ExecState*);
    9395void* operationLinkCall(ExecState*);
     
    112114double dfgConvertJSValueToNumber(ExecState*, EncodedJSValue);
    113115int32_t dfgConvertJSValueToInt32(ExecState*, EncodedJSValue);
    114 bool dfgConvertJSValueToBoolean(ExecState*, EncodedJSValue);
     116RegisterSizedBoolean dfgConvertJSValueToBoolean(ExecState*, EncodedJSValue);
    115117
    116118} // extern "C"
Note: See TracChangeset for help on using the changeset viewer.