| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 throw new $Error("Not supported"); | 133 throw new $Error("Not supported"); |
| 134 }); | 134 }); |
| 135 | 135 |
| 136 | 136 |
| 137 // Helper functions; called from the runtime system. | 137 // Helper functions; called from the runtime system. |
| 138 function FormatMessage(message) { | 138 function FormatMessage(message) { |
| 139 if (kMessages === 0) { | 139 if (kMessages === 0) { |
| 140 var messagesDictionary = [ | 140 var messagesDictionary = [ |
| 141 // Error | 141 // Error |
| 142 "cyclic_proto", ["Cyclic __proto__ value"], | 142 "cyclic_proto", ["Cyclic __proto__ value"], |
| 143 "code_gen_from_strings", ["Code generation from strings disallowed
for this context"], | 143 "code_gen_from_strings", ["%0"], |
| 144 // TypeError | 144 // TypeError |
| 145 "unexpected_token", ["Unexpected token ", "%0"], | 145 "unexpected_token", ["Unexpected token ", "%0"], |
| 146 "unexpected_token_number", ["Unexpected number"], | 146 "unexpected_token_number", ["Unexpected number"], |
| 147 "unexpected_token_string", ["Unexpected string"], | 147 "unexpected_token_string", ["Unexpected string"], |
| 148 "unexpected_token_identifier", ["Unexpected identifier"], | 148 "unexpected_token_identifier", ["Unexpected identifier"], |
| 149 "unexpected_reserved", ["Unexpected reserved word"], | 149 "unexpected_reserved", ["Unexpected reserved word"], |
| 150 "unexpected_strict_reserved", ["Unexpected strict mode reserved word"], | 150 "unexpected_strict_reserved", ["Unexpected strict mode reserved word"], |
| 151 "unexpected_eos", ["Unexpected end of input"], | 151 "unexpected_eos", ["Unexpected end of input"], |
| 152 "malformed_regexp", ["Invalid regular expression: /", "%0", "/
: ", "%1"], | 152 "malformed_regexp", ["Invalid regular expression: /", "%0", "/
: ", "%1"], |
| 153 "unterminated_regexp", ["Invalid regular expression: missing /"], | 153 "unterminated_regexp", ["Invalid regular expression: missing /"], |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 throw e; | 1258 throw e; |
| 1259 } | 1259 } |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 | 1262 |
| 1263 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', ErrorToString]); | 1263 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', ErrorToString]); |
| 1264 | 1264 |
| 1265 // Boilerplate for exceptions for stack overflows. Used from | 1265 // Boilerplate for exceptions for stack overflows. Used from |
| 1266 // Isolate::StackOverflow(). | 1266 // Isolate::StackOverflow(). |
| 1267 var kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1267 var kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
| OLD | NEW |