OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // The infrastructure used for (localized) message reporting in V8. | 5 // The infrastructure used for (localized) message reporting in V8. |
6 // | 6 // |
7 // Note: there's a big unresolved issue about ownership of the data | 7 // Note: there's a big unresolved issue about ownership of the data |
8 // structures used by this framework. | 8 // structures used by this framework. |
9 | 9 |
10 #ifndef V8_MESSAGES_H_ | 10 #ifndef V8_MESSAGES_H_ |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 class MessageTemplate { | 407 class MessageTemplate { |
408 public: | 408 public: |
409 enum Template { | 409 enum Template { |
410 #define TEMPLATE(NAME, STRING) k##NAME, | 410 #define TEMPLATE(NAME, STRING) k##NAME, |
411 MESSAGE_TEMPLATES(TEMPLATE) | 411 MESSAGE_TEMPLATES(TEMPLATE) |
412 #undef TEMPLATE | 412 #undef TEMPLATE |
413 kLastMessage | 413 kLastMessage |
414 }; | 414 }; |
415 | 415 |
| 416 static const char* TemplateString(int template_index); |
| 417 |
416 static MaybeHandle<String> FormatMessage(int template_index, | 418 static MaybeHandle<String> FormatMessage(int template_index, |
417 Handle<String> arg0, | 419 Handle<String> arg0, |
418 Handle<String> arg1, | 420 Handle<String> arg1, |
419 Handle<String> arg2); | 421 Handle<String> arg2); |
420 | 422 |
421 static Handle<String> FormatMessage(Isolate* isolate, int template_index, | 423 static Handle<String> FormatMessage(Isolate* isolate, int template_index, |
422 Handle<Object> arg); | 424 Handle<Object> arg); |
423 }; | 425 }; |
424 | 426 |
425 | 427 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 480 |
479 static MUST_USE_RESULT MaybeHandle<String> GetStringifiedProperty( | 481 static MUST_USE_RESULT MaybeHandle<String> GetStringifiedProperty( |
480 Isolate* isolate, LookupIterator* property_lookup, | 482 Isolate* isolate, LookupIterator* property_lookup, |
481 Handle<String> default_value); | 483 Handle<String> default_value); |
482 | 484 |
483 List<Handle<JSObject> > visited_; | 485 List<Handle<JSObject> > visited_; |
484 }; | 486 }; |
485 } } // namespace v8::internal | 487 } } // namespace v8::internal |
486 | 488 |
487 #endif // V8_MESSAGES_H_ | 489 #endif // V8_MESSAGES_H_ |
OLD | NEW |