| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 int hash = vector_hash(literal); | 176 int hash = vector_hash(literal); |
| 177 LogSymbol(start, hash, false, Vector<const byte>::cast(literal)); | 177 LogSymbol(start, hash, false, Vector<const byte>::cast(literal)); |
| 178 } | 178 } |
| 179 | 179 |
| 180 virtual Vector<unsigned> ExtractData(); | 180 virtual Vector<unsigned> ExtractData(); |
| 181 | 181 |
| 182 virtual int symbol_position() { return symbol_store_.size(); } | 182 virtual int symbol_position() { return symbol_store_.size(); } |
| 183 virtual int symbol_ids() { return symbol_id_; } | 183 virtual int symbol_ids() { return symbol_id_; } |
| 184 | 184 |
| 185 private: | 185 private: |
| 186 // For testing. Defined in test-parsing.cc. | |
| 187 friend void FakeWritingSymbolIdInPreParseData(CompleteParserRecorder* log, | |
| 188 int number); | |
| 189 | |
| 190 struct Key { | 186 struct Key { |
| 191 bool is_ascii; | 187 bool is_ascii; |
| 192 Vector<const byte> literal_bytes; | 188 Vector<const byte> literal_bytes; |
| 193 }; | 189 }; |
| 194 | 190 |
| 195 virtual void LogSymbol(int start, | 191 virtual void LogSymbol(int start, |
| 196 int hash, | 192 int hash, |
| 197 bool is_ascii, | 193 bool is_ascii, |
| 198 Vector<const byte> literal); | 194 Vector<const byte> literal); |
| 199 | 195 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 226 Collector<byte> symbol_store_; | 222 Collector<byte> symbol_store_; |
| 227 Collector<Key> symbol_keys_; | 223 Collector<Key> symbol_keys_; |
| 228 HashMap string_table_; | 224 HashMap string_table_; |
| 229 int symbol_id_; | 225 int symbol_id_; |
| 230 }; | 226 }; |
| 231 | 227 |
| 232 | 228 |
| 233 } } // namespace v8::internal. | 229 } } // namespace v8::internal. |
| 234 | 230 |
| 235 #endif // V8_PREPARSE_DATA_H_ | 231 #endif // V8_PREPARSE_DATA_H_ |
| OLD | NEW |