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

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

Issue 2369963002: [base] Remove PointersMatch, making a separate std::equals hashmap (Closed)
Patch Set: Fix the other simulators Created 4 years, 2 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/ast/ast.cc ('k') | src/ast/scopes.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 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 strings_end_ = &strings_; 396 strings_end_ = &strings_;
397 } 397 }
398 AstRawString* GetOneByteStringInternal(Vector<const uint8_t> literal); 398 AstRawString* GetOneByteStringInternal(Vector<const uint8_t> literal);
399 AstRawString* GetTwoByteStringInternal(Vector<const uint16_t> literal); 399 AstRawString* GetTwoByteStringInternal(Vector<const uint16_t> literal);
400 AstRawString* GetString(uint32_t hash, bool is_one_byte, 400 AstRawString* GetString(uint32_t hash, bool is_one_byte,
401 Vector<const byte> literal_bytes); 401 Vector<const byte> literal_bytes);
402 402
403 static bool AstRawStringCompare(void* a, void* b); 403 static bool AstRawStringCompare(void* a, void* b);
404 404
405 // All strings are copied here, one after another (no NULLs inbetween). 405 // All strings are copied here, one after another (no NULLs inbetween).
406 base::HashMap string_table_; 406 base::CustomMatcherHashMap string_table_;
407 // For keeping track of all AstValues and AstRawStrings we've created (so that 407 // For keeping track of all AstValues and AstRawStrings we've created (so that
408 // they can be internalized later). 408 // they can be internalized later).
409 AstValue* values_; 409 AstValue* values_;
410 // We need to keep track of strings_ in order, since cons strings require 410 // We need to keep track of strings_ in order, since cons strings require
411 // their members to be internalized first. 411 // their members to be internalized first.
412 AstString* strings_; 412 AstString* strings_;
413 AstString** strings_end_; 413 AstString** strings_end_;
414 Zone* zone_; 414 Zone* zone_;
415 415
416 uint32_t hash_seed_; 416 uint32_t hash_seed_;
417 417
418 #define F(name, str) const AstRawString* name##_string_; 418 #define F(name, str) const AstRawString* name##_string_;
419 STRING_CONSTANTS(F) 419 STRING_CONSTANTS(F)
420 #undef F 420 #undef F
421 421
422 #define F(name) AstValue* name##_; 422 #define F(name) AstValue* name##_;
423 OTHER_CONSTANTS(F) 423 OTHER_CONSTANTS(F)
424 #undef F 424 #undef F
425 }; 425 };
426 } // namespace internal 426 } // namespace internal
427 } // namespace v8 427 } // namespace v8
428 428
429 #undef STRING_CONSTANTS 429 #undef STRING_CONSTANTS
430 #undef OTHER_CONSTANTS 430 #undef OTHER_CONSTANTS
431 431
432 #endif // V8_AST_AST_VALUE_FACTORY_H_ 432 #endif // V8_AST_AST_VALUE_FACTORY_H_
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698