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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 T(URIMalformed, "URI malformed") \ | 485 T(URIMalformed, "URI malformed") \ |
486 /* Wasm errors (currently Error) */ \ | 486 /* Wasm errors (currently Error) */ \ |
487 T(WasmTrapUnreachable, "unreachable") \ | 487 T(WasmTrapUnreachable, "unreachable") \ |
488 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ | 488 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ |
489 T(WasmTrapDivByZero, "divide by zero") \ | 489 T(WasmTrapDivByZero, "divide by zero") \ |
490 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ | 490 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ |
491 T(WasmTrapRemByZero, "remainder by zero") \ | 491 T(WasmTrapRemByZero, "remainder by zero") \ |
492 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ | 492 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ |
493 T(WasmTrapFuncInvalid, "invalid function") \ | 493 T(WasmTrapFuncInvalid, "invalid function") \ |
494 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ | 494 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ |
495 T(WasmTrapMemAllocationFail, "failed to allocate memory") | 495 T(WasmTrapMemAllocationFail, "failed to allocate memory") \ |
496 T(WasmTrapInvalidIndex, "invalid index into function table") | |
titzer
2016/07/14 08:59:43
This is the same condition as TrapFuncInvalid.
ritesht
2016/07/14 18:10:00
The point of this is to draw the distinction betwe
| |
496 | 497 |
497 class MessageTemplate { | 498 class MessageTemplate { |
498 public: | 499 public: |
499 enum Template { | 500 enum Template { |
500 #define TEMPLATE(NAME, STRING) k##NAME, | 501 #define TEMPLATE(NAME, STRING) k##NAME, |
501 MESSAGE_TEMPLATES(TEMPLATE) | 502 MESSAGE_TEMPLATES(TEMPLATE) |
502 #undef TEMPLATE | 503 #undef TEMPLATE |
503 kLastMessage | 504 kLastMessage |
504 }; | 505 }; |
505 | 506 |
(...skipping 28 matching lines...) Expand all Loading... | |
534 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 535 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
535 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 536 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
536 Handle<Object> data); | 537 Handle<Object> data); |
537 }; | 538 }; |
538 | 539 |
539 | 540 |
540 } // namespace internal | 541 } // namespace internal |
541 } // namespace v8 | 542 } // namespace v8 |
542 | 543 |
543 #endif // V8_MESSAGES_H_ | 544 #endif // V8_MESSAGES_H_ |
OLD | NEW |