| OLD | NEW |
| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool is_one_byte() const { return is_one_byte_; } | 81 bool is_one_byte() const { return is_one_byte_; } |
| 82 bool IsOneByteEqualTo(const char* data) const; | 82 bool IsOneByteEqualTo(const char* data) const; |
| 83 uint16_t FirstCharacter() const { | 83 uint16_t FirstCharacter() const { |
| 84 if (is_one_byte_) | 84 if (is_one_byte_) |
| 85 return literal_bytes_[0]; | 85 return literal_bytes_[0]; |
| 86 const uint16_t* c = | 86 const uint16_t* c = |
| 87 reinterpret_cast<const uint16_t*>(literal_bytes_.start()); | 87 reinterpret_cast<const uint16_t*>(literal_bytes_.start()); |
| 88 return *c; | 88 return *c; |
| 89 } | 89 } |
| 90 | 90 |
| 91 V8_INLINE bool IsArguments(AstValueFactory* ast_value_factory) const; |
| 92 |
| 91 // For storing AstRawStrings in a hash map. | 93 // For storing AstRawStrings in a hash map. |
| 92 uint32_t hash() const { | 94 uint32_t hash() const { |
| 93 return hash_; | 95 return hash_; |
| 94 } | 96 } |
| 95 static bool Compare(void* a, void* b); | 97 static bool Compare(void* a, void* b); |
| 96 | 98 |
| 97 bool operator==(const AstRawString& rhs) const; | 99 bool operator==(const AstRawString& rhs) const; |
| 98 | 100 |
| 99 private: | 101 private: |
| 100 friend class AstValueFactory; | 102 friend class AstValueFactory; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 Isolate* isolate_; | 335 Isolate* isolate_; |
| 334 | 336 |
| 335 uint32_t hash_seed_; | 337 uint32_t hash_seed_; |
| 336 | 338 |
| 337 #define F(name, str) \ | 339 #define F(name, str) \ |
| 338 const AstRawString* name##_string_; | 340 const AstRawString* name##_string_; |
| 339 STRING_CONSTANTS(F) | 341 STRING_CONSTANTS(F) |
| 340 #undef F | 342 #undef F |
| 341 }; | 343 }; |
| 342 | 344 |
| 345 |
| 346 bool AstRawString::IsArguments(AstValueFactory* ast_value_factory) const { |
| 347 return ast_value_factory->arguments_string() == this; |
| 348 } |
| 343 } } // namespace v8::internal | 349 } } // namespace v8::internal |
| 344 | 350 |
| 345 #undef STRING_CONSTANTS | 351 #undef STRING_CONSTANTS |
| 346 | 352 |
| 347 #endif // V8_AST_VALUE_FACTORY_H_ | 353 #endif // V8_AST_VALUE_FACTORY_H_ |
| OLD | NEW |