Chromium Code Reviews| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 /* URIError */ \ | 476 /* URIError */ \ |
| 477 T(URIMalformed, "URI malformed") \ | 477 T(URIMalformed, "URI malformed") \ |
| 478 /* Wasm errors (currently Error) */ \ | 478 /* Wasm errors (currently Error) */ \ |
| 479 T(WasmTrapUnreachable, "unreachable") \ | 479 T(WasmTrapUnreachable, "unreachable") \ |
| 480 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ | 480 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ |
| 481 T(WasmTrapDivByZero, "divide by zero") \ | 481 T(WasmTrapDivByZero, "divide by zero") \ |
| 482 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ | 482 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ |
| 483 T(WasmTrapRemByZero, "remainder by zero") \ | 483 T(WasmTrapRemByZero, "remainder by zero") \ |
| 484 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ | 484 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ |
| 485 T(WasmTrapFuncInvalid, "invalid function") \ | 485 T(WasmTrapFuncInvalid, "invalid function") \ |
| 486 T(WasmTrapFuncSigMismatch, "function signature mismatch") | 486 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ |
| 487 T(WasmTrapDefaultFuncCall, "default function call") | |
|
bradn
2016/06/14 02:02:46
I don't think we want to pay for a separate check.
| |
| 487 | 488 |
| 488 class MessageTemplate { | 489 class MessageTemplate { |
| 489 public: | 490 public: |
| 490 enum Template { | 491 enum Template { |
| 491 #define TEMPLATE(NAME, STRING) k##NAME, | 492 #define TEMPLATE(NAME, STRING) k##NAME, |
| 492 MESSAGE_TEMPLATES(TEMPLATE) | 493 MESSAGE_TEMPLATES(TEMPLATE) |
| 493 #undef TEMPLATE | 494 #undef TEMPLATE |
| 494 kLastMessage | 495 kLastMessage |
| 495 }; | 496 }; |
| 496 | 497 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 525 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 526 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
| 526 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 527 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
| 527 Handle<Object> data); | 528 Handle<Object> data); |
| 528 }; | 529 }; |
| 529 | 530 |
| 530 | 531 |
| 531 } // namespace internal | 532 } // namespace internal |
| 532 } // namespace v8 | 533 } // namespace v8 |
| 533 | 534 |
| 534 #endif // V8_MESSAGES_H_ | 535 #endif // V8_MESSAGES_H_ |
| OLD | NEW |