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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 : string_table_(AstRawString::Compare), | 275 : string_table_(AstRawString::Compare), |
276 zone_(zone), | 276 zone_(zone), |
277 isolate_(NULL), | 277 isolate_(NULL), |
278 hash_seed_(hash_seed) { | 278 hash_seed_(hash_seed) { |
279 #define F(name, str) \ | 279 #define F(name, str) \ |
280 name##_string_ = NULL; | 280 name##_string_ = NULL; |
281 STRING_CONSTANTS(F) | 281 STRING_CONSTANTS(F) |
282 #undef F | 282 #undef F |
283 } | 283 } |
284 | 284 |
285 Zone* zone() const { return zone_; } | |
286 | |
287 const AstRawString* GetOneByteString(Vector<const uint8_t> literal); | 285 const AstRawString* GetOneByteString(Vector<const uint8_t> literal); |
288 const AstRawString* GetOneByteString(const char* string) { | 286 const AstRawString* GetOneByteString(const char* string) { |
289 return GetOneByteString(Vector<const uint8_t>( | 287 return GetOneByteString(Vector<const uint8_t>( |
290 reinterpret_cast<const uint8_t*>(string), StrLength(string))); | 288 reinterpret_cast<const uint8_t*>(string), StrLength(string))); |
291 } | 289 } |
292 const AstRawString* GetTwoByteString(Vector<const uint16_t> literal); | 290 const AstRawString* GetTwoByteString(Vector<const uint16_t> literal); |
293 const AstRawString* GetString(Handle<String> literal); | 291 const AstRawString* GetString(Handle<String> literal); |
294 const AstConsString* NewConsString(const AstString* left, | 292 const AstConsString* NewConsString(const AstString* left, |
295 const AstString* right); | 293 const AstString* right); |
296 | 294 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 344 |
347 | 345 |
348 bool AstRawString::IsArguments(AstValueFactory* ast_value_factory) const { | 346 bool AstRawString::IsArguments(AstValueFactory* ast_value_factory) const { |
349 return ast_value_factory->arguments_string() == this; | 347 return ast_value_factory->arguments_string() == this; |
350 } | 348 } |
351 } } // namespace v8::internal | 349 } } // namespace v8::internal |
352 | 350 |
353 #undef STRING_CONSTANTS | 351 #undef STRING_CONSTANTS |
354 | 352 |
355 #endif // V8_AST_VALUE_FACTORY_H_ | 353 #endif // V8_AST_VALUE_FACTORY_H_ |
OLD | NEW |