js/src/jit/JitCommon.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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_JitCommon_h
michael@0 8 #define jit_JitCommon_h
michael@0 9
michael@0 10 // Various macros used by all JITs, including YARR.
michael@0 11
michael@0 12 #ifdef JS_ARM_SIMULATOR
michael@0 13 #include "jit/arm/Simulator-arm.h"
michael@0 14
michael@0 15 // Call into cross-jitted code by following the ABI of the simulated architecture.
michael@0 16 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7) \
michael@0 17 (js::jit::Simulator::Current()->call( \
michael@0 18 JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 8, p0, p1, p2, p3, p4, p5, p6, p7) & 0xffffffff)
michael@0 19
michael@0 20 #define CALL_GENERATED_YARR_CODE3(entry, p0, p1, p2) \
michael@0 21 js::jit::Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 3, p0, p1, p2)
michael@0 22
michael@0 23 #define CALL_GENERATED_YARR_CODE4(entry, p0, p1, p2, p3) \
michael@0 24 js::jit::Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 4, p0, p1, p2, p3)
michael@0 25
michael@0 26 #define CALL_GENERATED_ASMJS(entry, p0, p1) \
michael@0 27 (Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 2, p0, p1) & 0xffffffff)
michael@0 28
michael@0 29 #else
michael@0 30
michael@0 31 // Call into jitted code by following the ABI of the native architecture.
michael@0 32 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7) \
michael@0 33 entry(p0, p1, p2, p3, p4, p5, p6, p7)
michael@0 34
michael@0 35 #define CALL_GENERATED_YARR_CODE3(entry, p0, p1, p2) \
michael@0 36 entry(p0, p1, p2)
michael@0 37
michael@0 38 #define CALL_GENERATED_YARR_CODE4(entry, p0, p1, p2, p3) \
michael@0 39 entry(p0, p1, p2, p3)
michael@0 40
michael@0 41 #define CALL_GENERATED_ASMJS(entry, p0, p1) \
michael@0 42 entry(p0, p1)
michael@0 43
michael@0 44 #endif
michael@0 45
michael@0 46 #endif // jit_JitCommon_h

mercurial