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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 /* URIError */ \ | 482 /* URIError */ \ |
483 T(URIMalformed, "URI malformed") \ | 483 T(URIMalformed, "URI malformed") \ |
484 /* Wasm errors (currently Error) */ \ | 484 /* Wasm errors (currently Error) */ \ |
485 T(WasmTrapUnreachable, "unreachable") \ | 485 T(WasmTrapUnreachable, "unreachable") \ |
486 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ | 486 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ |
487 T(WasmTrapDivByZero, "divide by zero") \ | 487 T(WasmTrapDivByZero, "divide by zero") \ |
488 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ | 488 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ |
489 T(WasmTrapRemByZero, "remainder by zero") \ | 489 T(WasmTrapRemByZero, "remainder by zero") \ |
490 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ | 490 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ |
491 T(WasmTrapFuncInvalid, "invalid function") \ | 491 T(WasmTrapFuncInvalid, "invalid function") \ |
492 T(WasmTrapFuncSigMismatch, "function signature mismatch") | 492 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ |
| 493 T(WasmTrapMemAllocationFail, "failed to allocate memory") |
493 | 494 |
494 class MessageTemplate { | 495 class MessageTemplate { |
495 public: | 496 public: |
496 enum Template { | 497 enum Template { |
497 #define TEMPLATE(NAME, STRING) k##NAME, | 498 #define TEMPLATE(NAME, STRING) k##NAME, |
498 MESSAGE_TEMPLATES(TEMPLATE) | 499 MESSAGE_TEMPLATES(TEMPLATE) |
499 #undef TEMPLATE | 500 #undef TEMPLATE |
500 kLastMessage | 501 kLastMessage |
501 }; | 502 }; |
502 | 503 |
(...skipping 28 matching lines...) Expand all Loading... |
531 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 532 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
532 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 533 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
533 Handle<Object> data); | 534 Handle<Object> data); |
534 }; | 535 }; |
535 | 536 |
536 | 537 |
537 } // namespace internal | 538 } // namespace internal |
538 } // namespace v8 | 539 } // namespace v8 |
539 | 540 |
540 #endif // V8_MESSAGES_H_ | 541 #endif // V8_MESSAGES_H_ |
OLD | NEW |