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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 T(URIMalformed, "URI malformed") \ | 487 T(URIMalformed, "URI malformed") \ |
488 /* Wasm errors (currently Error) */ \ | 488 /* Wasm errors (currently Error) */ \ |
489 T(WasmTrapUnreachable, "unreachable") \ | 489 T(WasmTrapUnreachable, "unreachable") \ |
490 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ | 490 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ |
491 T(WasmTrapDivByZero, "divide by zero") \ | 491 T(WasmTrapDivByZero, "divide by zero") \ |
492 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ | 492 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ |
493 T(WasmTrapRemByZero, "remainder by zero") \ | 493 T(WasmTrapRemByZero, "remainder by zero") \ |
494 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ | 494 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ |
495 T(WasmTrapFuncInvalid, "invalid function") \ | 495 T(WasmTrapFuncInvalid, "invalid function") \ |
496 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ | 496 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ |
497 T(WasmTrapInvalidIndex, "invalid index into function table") | 497 T(WasmTrapInvalidIndex, "invalid index into function table") \ |
| 498 T(WasmTrapTypeError, "invalid type") |
498 | 499 |
499 class MessageTemplate { | 500 class MessageTemplate { |
500 public: | 501 public: |
501 enum Template { | 502 enum Template { |
502 #define TEMPLATE(NAME, STRING) k##NAME, | 503 #define TEMPLATE(NAME, STRING) k##NAME, |
503 MESSAGE_TEMPLATES(TEMPLATE) | 504 MESSAGE_TEMPLATES(TEMPLATE) |
504 #undef TEMPLATE | 505 #undef TEMPLATE |
505 kLastMessage | 506 kLastMessage |
506 }; | 507 }; |
507 | 508 |
(...skipping 28 matching lines...) Expand all Loading... |
536 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 537 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
537 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, | 538 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, |
538 Handle<Object> data); | 539 Handle<Object> data); |
539 }; | 540 }; |
540 | 541 |
541 | 542 |
542 } // namespace internal | 543 } // namespace internal |
543 } // namespace v8 | 544 } // namespace v8 |
544 | 545 |
545 #endif // V8_MESSAGES_H_ | 546 #endif // V8_MESSAGES_H_ |
OLD | NEW |