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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 241 } |
242 STRING_CONSTANTS(F) | 242 STRING_CONSTANTS(F) |
243 #undef F | 243 #undef F |
244 } | 244 } |
245 | 245 |
246 const AstString* GetOneByteString(Vector<const uint8_t> literal); | 246 const AstString* GetOneByteString(Vector<const uint8_t> literal); |
247 const AstString* GetTwoByteString(Vector<const uint16_t> literal); | 247 const AstString* GetTwoByteString(Vector<const uint16_t> literal); |
248 const AstString* GetString(Handle<String> literal); | 248 const AstString* GetString(Handle<String> literal); |
249 | 249 |
250 void Internalize(Isolate* isolate); | 250 void Internalize(Isolate* isolate); |
| 251 bool IsInternalized() { |
| 252 return isolate_ != NULL; |
| 253 } |
251 | 254 |
252 #define F(name, str) \ | 255 #define F(name, str) \ |
253 const AstString* name##_string() const { return name##_string_; } | 256 const AstString* name##_string() const { return name##_string_; } |
254 STRING_CONSTANTS(F) | 257 STRING_CONSTANTS(F) |
255 #undef F | 258 #undef F |
256 | 259 |
257 const AstValue* NewString(const AstString* string); | 260 const AstValue* NewString(const AstString* string); |
258 // A JavaScript symbol (ECMA-262 edition 6). | 261 // A JavaScript symbol (ECMA-262 edition 6). |
259 const AstValue* NewSymbol(const char* name); | 262 const AstValue* NewSymbol(const char* name); |
260 const AstValue* NewNumber(double number); | 263 const AstValue* NewNumber(double number); |
(...skipping 24 matching lines...) Expand all Loading... |
285 const AstString* name##_string_; | 288 const AstString* name##_string_; |
286 STRING_CONSTANTS(F) | 289 STRING_CONSTANTS(F) |
287 #undef F | 290 #undef F |
288 }; | 291 }; |
289 | 292 |
290 } } // namespace v8::internal | 293 } } // namespace v8::internal |
291 | 294 |
292 #undef STRING_CONSTANTS | 295 #undef STRING_CONSTANTS |
293 | 296 |
294 #endif // V8_AST_VALUE_FACTORY_H_ | 297 #endif // V8_AST_VALUE_FACTORY_H_ |
OLD | NEW |