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

Side by Side Diff: src/ast/ast-value-factory.h

Issue 2010243003: Move hashmap into base/. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 private: 346 private:
347 AstRawString* GetOneByteStringInternal(Vector<const uint8_t> literal); 347 AstRawString* GetOneByteStringInternal(Vector<const uint8_t> literal);
348 AstRawString* GetTwoByteStringInternal(Vector<const uint16_t> literal); 348 AstRawString* GetTwoByteStringInternal(Vector<const uint16_t> literal);
349 AstRawString* GetString(uint32_t hash, bool is_one_byte, 349 AstRawString* GetString(uint32_t hash, bool is_one_byte,
350 Vector<const byte> literal_bytes); 350 Vector<const byte> literal_bytes);
351 351
352 static bool AstRawStringCompare(void* a, void* b); 352 static bool AstRawStringCompare(void* a, void* b);
353 353
354 // All strings are copied here, one after another (no NULLs inbetween). 354 // All strings are copied here, one after another (no NULLs inbetween).
355 HashMap string_table_; 355 base::HashMap string_table_;
356 // For keeping track of all AstValues and AstRawStrings we've created (so that 356 // For keeping track of all AstValues and AstRawStrings we've created (so that
357 // they can be internalized later). 357 // they can be internalized later).
358 List<AstValue*> values_; 358 List<AstValue*> values_;
359 List<AstString*> strings_; 359 List<AstString*> strings_;
360 Zone* zone_; 360 Zone* zone_;
361 Isolate* isolate_; 361 Isolate* isolate_;
362 362
363 uint32_t hash_seed_; 363 uint32_t hash_seed_;
364 364
365 #define F(name, str) const AstRawString* name##_string_; 365 #define F(name, str) const AstRawString* name##_string_;
366 STRING_CONSTANTS(F) 366 STRING_CONSTANTS(F)
367 #undef F 367 #undef F
368 368
369 #define F(name) AstValue* name##_; 369 #define F(name) AstValue* name##_;
370 OTHER_CONSTANTS(F) 370 OTHER_CONSTANTS(F)
371 #undef F 371 #undef F
372 }; 372 };
373 } // namespace internal 373 } // namespace internal
374 } // namespace v8 374 } // namespace v8
375 375
376 #undef STRING_CONSTANTS 376 #undef STRING_CONSTANTS
377 #undef OTHER_CONSTANTS 377 #undef OTHER_CONSTANTS
378 378
379 #endif // V8_AST_AST_VALUE_FACTORY_H_ 379 #endif // V8_AST_AST_VALUE_FACTORY_H_
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-value-factory.cc » ('j') | src/base/hashmap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698