gfx/angle/src/compiler/preprocessor/Preprocessor.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 //
michael@0 2 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
michael@0 3 // Use of this source code is governed by a BSD-style license that can be
michael@0 4 // found in the LICENSE file.
michael@0 5 //
michael@0 6
michael@0 7 #ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_
michael@0 8 #define COMPILER_PREPROCESSOR_PREPROCESSOR_H_
michael@0 9
michael@0 10 #include <stddef.h>
michael@0 11
michael@0 12 #include "pp_utils.h"
michael@0 13
michael@0 14 namespace pp
michael@0 15 {
michael@0 16
michael@0 17 class Diagnostics;
michael@0 18 class DirectiveHandler;
michael@0 19 struct PreprocessorImpl;
michael@0 20 struct Token;
michael@0 21
michael@0 22 class Preprocessor
michael@0 23 {
michael@0 24 public:
michael@0 25 Preprocessor(Diagnostics* diagnostics, DirectiveHandler* directiveHandler);
michael@0 26 ~Preprocessor();
michael@0 27
michael@0 28 // count: specifies the number of elements in the string and length arrays.
michael@0 29 // string: specifies an array of pointers to strings.
michael@0 30 // length: specifies an array of string lengths.
michael@0 31 // If length is NULL, each string is assumed to be null terminated.
michael@0 32 // If length is a value other than NULL, it points to an array containing
michael@0 33 // a string length for each of the corresponding elements of string.
michael@0 34 // Each element in the length array may contain the length of the
michael@0 35 // corresponding string or a value less than 0 to indicate that the string
michael@0 36 // is null terminated.
michael@0 37 bool init(size_t count, const char* const string[], const int length[]);
michael@0 38 // Adds a pre-defined macro.
michael@0 39 void predefineMacro(const char* name, int value);
michael@0 40
michael@0 41 void lex(Token* token);
michael@0 42
michael@0 43 private:
michael@0 44 PP_DISALLOW_COPY_AND_ASSIGN(Preprocessor);
michael@0 45
michael@0 46 PreprocessorImpl* mImpl;
michael@0 47 };
michael@0 48
michael@0 49 } // namespace pp
michael@0 50 #endif // COMPILER_PREPROCESSOR_PREPROCESSOR_H_
michael@0 51

mercurial