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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 T(URIMalformed, "URI malformed") \ | 532 T(URIMalformed, "URI malformed") \ |
533 /* Wasm errors (currently Error) */ \ | 533 /* Wasm errors (currently Error) */ \ |
534 T(WasmTrapUnreachable, "unreachable") \ | 534 T(WasmTrapUnreachable, "unreachable") \ |
535 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ | 535 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ |
536 T(WasmTrapDivByZero, "divide by zero") \ | 536 T(WasmTrapDivByZero, "divide by zero") \ |
537 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ | 537 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ |
538 T(WasmTrapRemByZero, "remainder by zero") \ | 538 T(WasmTrapRemByZero, "remainder by zero") \ |
539 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ | 539 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ |
540 T(WasmTrapFuncInvalid, "invalid function") \ | 540 T(WasmTrapFuncInvalid, "invalid function") \ |
541 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ | 541 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ |
542 T(WasmTrapInvalidIndex, "invalid index into function table") | 542 T(WasmTrapInvalidIndex, "invalid index into function table") \ |
| 543 T(WasmTrapTypeError, "invalid type") |
543 | 544 |
544 class MessageTemplate { | 545 class MessageTemplate { |
545 public: | 546 public: |
546 enum Template { | 547 enum Template { |
547 #define TEMPLATE(NAME, STRING) k##NAME, | 548 #define TEMPLATE(NAME, STRING) k##NAME, |
548 MESSAGE_TEMPLATES(TEMPLATE) | 549 MESSAGE_TEMPLATES(TEMPLATE) |
549 #undef TEMPLATE | 550 #undef TEMPLATE |
550 kLastMessage | 551 kLastMessage |
551 }; | 552 }; |
552 | 553 |
(...skipping 28 matching lines...) Expand all Loading... |
581 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 582 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
582 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, | 583 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, |
583 Handle<Object> data); | 584 Handle<Object> data); |
584 }; | 585 }; |
585 | 586 |
586 | 587 |
587 } // namespace internal | 588 } // namespace internal |
588 } // namespace v8 | 589 } // namespace v8 |
589 | 590 |
590 #endif // V8_MESSAGES_H_ | 591 #endif // V8_MESSAGES_H_ |
OLD | NEW |