gfx/angle/src/compiler/depgraph/DependencyGraphOutput.cpp

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 //
     2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
     3 // Use of this source code is governed by a BSD-style license that can be
     4 // found in the LICENSE file.
     5 //
     7 #include "compiler/depgraph/DependencyGraphOutput.h"
     9 void TDependencyGraphOutput::outputIndentation()
    10 {
    11     for (int i = 0; i < getDepth(); ++i)
    12         mSink << "  ";
    13 }
    15 void TDependencyGraphOutput::visitArgument(TGraphArgument* parameter)
    16 {
    17     outputIndentation();
    18     mSink << "argument " << parameter->getArgumentNumber() << " of call to "
    19           << parameter->getIntermFunctionCall()->getName() << "\n";
    20 }
    22 void TDependencyGraphOutput::visitFunctionCall(TGraphFunctionCall* functionCall)
    23 {
    24     outputIndentation();
    25     mSink << "function call " <<  functionCall->getIntermFunctionCall()->getName() << "\n";
    26 }
    28 void TDependencyGraphOutput::visitSymbol(TGraphSymbol* symbol)
    29 {
    30     outputIndentation();
    31     mSink << symbol->getIntermSymbol()->getSymbol() << " (symbol id: "
    32           << symbol->getIntermSymbol()->getId() << ")\n";
    33 }
    35 void TDependencyGraphOutput::visitSelection(TGraphSelection* selection)
    36 {
    37     outputIndentation();
    38     mSink << "selection\n";
    39 }
    41 void TDependencyGraphOutput::visitLoop(TGraphLoop* loop)
    42 {
    43     outputIndentation();
    44     mSink << "loop condition\n";
    45 }
    47 void TDependencyGraphOutput::visitLogicalOp(TGraphLogicalOp* logicalOp)
    48 {
    49     outputIndentation();
    50     mSink << "logical " << logicalOp->getOpString() << "\n";
    51 }
    53 void TDependencyGraphOutput::outputAllSpanningTrees(TDependencyGraph& graph)
    54 {
    55     mSink << "\n";
    57     for (TGraphNodeVector::const_iterator iter = graph.begin(); iter != graph.end(); ++iter)
    58     {
    59         TGraphNode* symbol = *iter;
    60         mSink << "--- Dependency graph spanning tree ---\n";
    61         clearVisited();
    62         symbol->traverse(this);
    63         mSink << "\n";
    64     }
    65 }

mercurial