Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/parsing/scanner.h

Issue 2010243003: Move hashmap into base/. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/parsing/preparser.cc ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Features shared by parsing and pre-parsing scanners. 5 // Features shared by parsing and pre-parsing scanners.
6 6
7 #ifndef V8_PARSING_SCANNER_H_ 7 #ifndef V8_PARSING_SCANNER_H_
8 #define V8_PARSING_SCANNER_H_ 8 #define V8_PARSING_SCANNER_H_
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
11 #include "src/base/hashmap.h"
11 #include "src/base/logging.h" 12 #include "src/base/logging.h"
12 #include "src/char-predicates.h" 13 #include "src/char-predicates.h"
13 #include "src/collector.h" 14 #include "src/collector.h"
14 #include "src/globals.h" 15 #include "src/globals.h"
15 #include "src/hashmap.h"
16 #include "src/list.h" 16 #include "src/list.h"
17 #include "src/messages.h" 17 #include "src/messages.h"
18 #include "src/parsing/token.h" 18 #include "src/parsing/token.h"
19 #include "src/unicode-decoder.h"
19 #include "src/unicode.h" 20 #include "src/unicode.h"
20 #include "src/unicode-decoder.h"
21 21
22 namespace v8 { 22 namespace v8 {
23 namespace internal { 23 namespace internal {
24 24
25 25
26 class AstRawString; 26 class AstRawString;
27 class AstValueFactory; 27 class AstValueFactory;
28 class ParserRecorder; 28 class ParserRecorder;
29 class UnicodeCache; 29 class UnicodeCache;
30 30
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // form. 136 // form.
137 static bool IsNumberCanonical(Vector<const uint8_t> key); 137 static bool IsNumberCanonical(Vector<const uint8_t> key);
138 138
139 // Size of buffer. Sufficient for using it to call DoubleToCString in 139 // Size of buffer. Sufficient for using it to call DoubleToCString in
140 // from conversions.h. 140 // from conversions.h.
141 static const int kBufferSize = 100; 141 static const int kBufferSize = 100;
142 142
143 UnicodeCache* unicode_constants_; 143 UnicodeCache* unicode_constants_;
144 // Backing store used to store strings used as hashmap keys. 144 // Backing store used to store strings used as hashmap keys.
145 SequenceCollector<unsigned char> backing_store_; 145 SequenceCollector<unsigned char> backing_store_;
146 HashMap map_; 146 base::HashMap map_;
147 // Buffer used for string->number->canonical string conversions. 147 // Buffer used for string->number->canonical string conversions.
148 char number_buffer_[kBufferSize]; 148 char number_buffer_[kBufferSize];
149 }; 149 };
150 150
151 151
152 // ---------------------------------------------------------------------------- 152 // ----------------------------------------------------------------------------
153 // LiteralBuffer - Collector of chars of literals. 153 // LiteralBuffer - Collector of chars of literals.
154 154
155 class LiteralBuffer { 155 class LiteralBuffer {
156 public: 156 public:
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 bool allow_harmony_exponentiation_operator_; 807 bool allow_harmony_exponentiation_operator_;
808 808
809 MessageTemplate::Template scanner_error_; 809 MessageTemplate::Template scanner_error_;
810 Location scanner_error_location_; 810 Location scanner_error_location_;
811 }; 811 };
812 812
813 } // namespace internal 813 } // namespace internal
814 } // namespace v8 814 } // namespace v8
815 815
816 #endif // V8_PARSING_SCANNER_H_ 816 #endif // V8_PARSING_SCANNER_H_
OLDNEW
« no previous file with comments | « src/parsing/preparser.cc ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698