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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ | 464 T(UnterminatedRegExp, "Invalid regular expression: missing /") \ |
465 T(UnterminatedTemplate, "Unterminated template literal") \ | 465 T(UnterminatedTemplate, "Unterminated template literal") \ |
466 T(UnterminatedTemplateExpr, "Missing } in template expression") \ | 466 T(UnterminatedTemplateExpr, "Missing } in template expression") \ |
467 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ | 467 T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ |
468 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \ | 468 T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \ |
469 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \ | 469 T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \ |
470 T(UndefinedUnicodeCodePoint, "Undefined Unicode code-point") \ | 470 T(UndefinedUnicodeCodePoint, "Undefined Unicode code-point") \ |
471 /* EvalError */ \ | 471 /* EvalError */ \ |
472 T(CodeGenFromStrings, "%") \ | 472 T(CodeGenFromStrings, "%") \ |
473 /* URIError */ \ | 473 /* URIError */ \ |
474 T(URIMalformed, "URI malformed") | 474 T(URIMalformed, "URI malformed") \ |
| 475 /* Wasm errors (currently Error) */ \ |
| 476 T(WasmTrapUnreachable, "unreachable") \ |
| 477 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ |
| 478 T(WasmTrapDivByZero, "divide by zero") \ |
| 479 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ |
| 480 T(WasmTrapRemByZero, "remainder by zero") \ |
| 481 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ |
| 482 T(WasmTrapFuncInvalid, "invalid function") \ |
| 483 T(WasmTrapFuncSigMismatch, "function signature mismatch") |
475 | 484 |
476 class MessageTemplate { | 485 class MessageTemplate { |
477 public: | 486 public: |
478 enum Template { | 487 enum Template { |
479 #define TEMPLATE(NAME, STRING) k##NAME, | 488 #define TEMPLATE(NAME, STRING) k##NAME, |
480 MESSAGE_TEMPLATES(TEMPLATE) | 489 MESSAGE_TEMPLATES(TEMPLATE) |
481 #undef TEMPLATE | 490 #undef TEMPLATE |
482 kLastMessage | 491 kLastMessage |
483 }; | 492 }; |
484 | 493 |
(...skipping 28 matching lines...) Expand all Loading... |
513 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 522 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
514 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 523 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
515 Handle<Object> data); | 524 Handle<Object> data); |
516 }; | 525 }; |
517 | 526 |
518 | 527 |
519 } // namespace internal | 528 } // namespace internal |
520 } // namespace v8 | 529 } // namespace v8 |
521 | 530 |
522 #endif // V8_MESSAGES_H_ | 531 #endif // V8_MESSAGES_H_ |
OLD | NEW |