js/src/jit/ParallelSafetyAnalysis.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.

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  * vim: set ts=8 sts=4 et sw=4 tw=99:
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef jit_ParallelSafetyAnalysis_h
     8 #define jit_ParallelSafetyAnalysis_h
    10 #include "jit/MIR.h"
    12 namespace js {
    14 class InterpreterFrame;
    16 namespace jit {
    18 class MIRGraph;
    19 class AutoDestroyAllocator;
    21 // Determines whether a function is compatible for parallel execution.
    22 // Removes basic blocks containing unsafe MIR operations from the
    23 // graph and replaces them with MAbortPar blocks.
    24 class ParallelSafetyAnalysis
    25 {
    26     MIRGenerator *mir_;
    27     MIRGraph &graph_;
    29     bool removeResumePointOperands();
    30     void replaceOperandsOnResumePoint(MResumePoint *resumePoint, MDefinition *withDef);
    32   public:
    33     ParallelSafetyAnalysis(MIRGenerator *mir,
    34                            MIRGraph &graph)
    35       : mir_(mir),
    36         graph_(graph)
    37     {}
    39     bool analyze();
    40 };
    42 // Code to collect list of possible call targets by scraping through
    43 // TI and baseline data. Used to permit speculative transitive
    44 // compilation in vm/ForkJoin.
    45 //
    46 // This code may clone scripts and thus may invoke the GC.  Hence only
    47 // run from the link phase, which executes on the main thread.
    48 typedef Vector<JSScript *, 4, IonAllocPolicy> CallTargetVector;
    49 bool AddPossibleCallees(JSContext *cx, MIRGraph &graph, CallTargetVector &targets);
    51 } // namespace jit
    52 } // namespace js
    54 #endif /* jit_ParallelSafetyAnalysis_h */

mercurial