Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * vim: set ts=8 sts=4 et sw=4 tw=99: |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef jit_x86_CodeGenerator_x86_h |
michael@0 | 8 | #define jit_x86_CodeGenerator_x86_h |
michael@0 | 9 | |
michael@0 | 10 | #include "jit/shared/CodeGenerator-x86-shared.h" |
michael@0 | 11 | #include "jit/x86/Assembler-x86.h" |
michael@0 | 12 | |
michael@0 | 13 | namespace js { |
michael@0 | 14 | namespace jit { |
michael@0 | 15 | |
michael@0 | 16 | class OutOfLineLoadTypedArrayOutOfBounds; |
michael@0 | 17 | class OutOfLineTruncate; |
michael@0 | 18 | class OutOfLineTruncateFloat32; |
michael@0 | 19 | |
michael@0 | 20 | class CodeGeneratorX86 : public CodeGeneratorX86Shared |
michael@0 | 21 | { |
michael@0 | 22 | private: |
michael@0 | 23 | CodeGeneratorX86 *thisFromCtor() { |
michael@0 | 24 | return this; |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | protected: |
michael@0 | 28 | ValueOperand ToValue(LInstruction *ins, size_t pos); |
michael@0 | 29 | ValueOperand ToOutValue(LInstruction *ins); |
michael@0 | 30 | ValueOperand ToTempValue(LInstruction *ins, size_t pos); |
michael@0 | 31 | |
michael@0 | 32 | template<typename T> |
michael@0 | 33 | bool loadAndNoteViewTypeElement(ArrayBufferView::ViewType vt, const T &srcAddr, |
michael@0 | 34 | const LDefinition *out); |
michael@0 | 35 | template<typename T> |
michael@0 | 36 | void loadViewTypeElement(ArrayBufferView::ViewType vt, const T &srcAddr, |
michael@0 | 37 | const LDefinition *out); |
michael@0 | 38 | template<typename T> |
michael@0 | 39 | bool storeAndNoteViewTypeElement(ArrayBufferView::ViewType vt, const LAllocation *value, |
michael@0 | 40 | const T &dstAddr); |
michael@0 | 41 | template<typename T> |
michael@0 | 42 | void storeViewTypeElement(ArrayBufferView::ViewType vt, const LAllocation *value, |
michael@0 | 43 | const T &dstAddr); |
michael@0 | 44 | void storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType, |
michael@0 | 45 | const Register &elements, const LAllocation *index); |
michael@0 | 46 | |
michael@0 | 47 | public: |
michael@0 | 48 | CodeGeneratorX86(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm); |
michael@0 | 49 | |
michael@0 | 50 | public: |
michael@0 | 51 | bool visitBox(LBox *box); |
michael@0 | 52 | bool visitBoxFloatingPoint(LBoxFloatingPoint *box); |
michael@0 | 53 | bool visitUnbox(LUnbox *unbox); |
michael@0 | 54 | bool visitValue(LValue *value); |
michael@0 | 55 | bool visitLoadSlotV(LLoadSlotV *load); |
michael@0 | 56 | bool visitLoadSlotT(LLoadSlotT *load); |
michael@0 | 57 | bool visitStoreSlotT(LStoreSlotT *store); |
michael@0 | 58 | bool visitLoadElementT(LLoadElementT *load); |
michael@0 | 59 | bool visitImplicitThis(LImplicitThis *lir); |
michael@0 | 60 | bool visitInterruptCheck(LInterruptCheck *lir); |
michael@0 | 61 | bool visitCompareB(LCompareB *lir); |
michael@0 | 62 | bool visitCompareBAndBranch(LCompareBAndBranch *lir); |
michael@0 | 63 | bool visitCompareV(LCompareV *lir); |
michael@0 | 64 | bool visitCompareVAndBranch(LCompareVAndBranch *lir); |
michael@0 | 65 | bool visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir); |
michael@0 | 66 | bool visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir); |
michael@0 | 67 | bool visitTruncateDToInt32(LTruncateDToInt32 *ins); |
michael@0 | 68 | bool visitTruncateFToInt32(LTruncateFToInt32 *ins); |
michael@0 | 69 | bool visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins); |
michael@0 | 70 | bool visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins); |
michael@0 | 71 | bool visitAsmJSLoadHeap(LAsmJSLoadHeap *ins); |
michael@0 | 72 | bool visitAsmJSStoreHeap(LAsmJSStoreHeap *ins); |
michael@0 | 73 | bool visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins); |
michael@0 | 74 | bool visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins); |
michael@0 | 75 | bool visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins); |
michael@0 | 76 | bool visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins); |
michael@0 | 77 | |
michael@0 | 78 | bool visitOutOfLineLoadTypedArrayOutOfBounds(OutOfLineLoadTypedArrayOutOfBounds *ool); |
michael@0 | 79 | bool visitOutOfLineTruncate(OutOfLineTruncate *ool); |
michael@0 | 80 | bool visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32 *ool); |
michael@0 | 81 | |
michael@0 | 82 | void postAsmJSCall(LAsmJSCall *lir); |
michael@0 | 83 | }; |
michael@0 | 84 | |
michael@0 | 85 | typedef CodeGeneratorX86 CodeGeneratorSpecific; |
michael@0 | 86 | |
michael@0 | 87 | } // namespace jit |
michael@0 | 88 | } // namespace js |
michael@0 | 89 | |
michael@0 | 90 | #endif /* jit_x86_CodeGenerator_x86_h */ |