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