OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // ------------------------------------------------------------------- | 5 // ------------------------------------------------------------------- |
6 | 6 |
7 var $errorToString; | 7 var $errorToString; |
8 var $formatMessage; | 8 var $formatMessage; |
9 var $getStackTraceLine; | 9 var $getStackTraceLine; |
10 var $messageGetPositionInLine; | 10 var $messageGetPositionInLine; |
(...skipping 17 matching lines...) Expand all Loading... |
28 var MakeTypeError; | 28 var MakeTypeError; |
29 var MakeURIError; | 29 var MakeURIError; |
30 var MakeReferenceErrorEmbedded; | 30 var MakeReferenceErrorEmbedded; |
31 var MakeSyntaxErrorEmbedded; | 31 var MakeSyntaxErrorEmbedded; |
32 var MakeTypeErrorEmbedded; | 32 var MakeTypeErrorEmbedded; |
33 | 33 |
34 (function(global, shared, exports) { | 34 (function(global, shared, exports) { |
35 | 35 |
36 %CheckIsBootstrapping(); | 36 %CheckIsBootstrapping(); |
37 | 37 |
38 // ------------------------------------------------------------------- | |
39 // Imports | |
40 | |
41 var GlobalObject = global.Object; | 38 var GlobalObject = global.Object; |
42 var InternalArray = shared.InternalArray; | |
43 | |
44 // ------------------------------------------------------------------- | |
45 | |
46 var GlobalError; | 39 var GlobalError; |
47 var GlobalTypeError; | 40 var GlobalTypeError; |
48 var GlobalRangeError; | 41 var GlobalRangeError; |
49 var GlobalURIError; | 42 var GlobalURIError; |
50 var GlobalSyntaxError; | 43 var GlobalSyntaxError; |
51 var GlobalReferenceError; | 44 var GlobalReferenceError; |
52 var GlobalEvalError; | 45 var GlobalEvalError; |
53 | 46 |
| 47 // ------------------------------------------------------------------- |
| 48 |
54 var kMessages = { | 49 var kMessages = { |
55 // Error | 50 // Error |
56 constructor_is_generator: ["Class constructor may not be a generator"], | 51 constructor_is_generator: ["Class constructor may not be a generator"], |
57 constructor_is_accessor: ["Class constructor may not be an accessor"], | 52 constructor_is_accessor: ["Class constructor may not be an accessor"], |
58 // TypeError | 53 // TypeError |
59 unexpected_token: ["Unexpected token ", "%0"], | 54 unexpected_token: ["Unexpected token ", "%0"], |
60 unexpected_token_number: ["Unexpected number"], | 55 unexpected_token_number: ["Unexpected number"], |
61 unexpected_token_string: ["Unexpected string"], | 56 unexpected_token_string: ["Unexpected string"], |
62 unexpected_token_identifier: ["Unexpected identifier"], | 57 unexpected_token_identifier: ["Unexpected identifier"], |
63 unexpected_reserved: ["Unexpected reserved word"], | 58 unexpected_reserved: ["Unexpected reserved word"], |
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 return MakeGenericError(GlobalTypeError, type, [arg]); | 1231 return MakeGenericError(GlobalTypeError, type, [arg]); |
1237 } | 1232 } |
1238 | 1233 |
1239 //Boilerplate for exceptions for stack overflows. Used from | 1234 //Boilerplate for exceptions for stack overflows. Used from |
1240 //Isolate::StackOverflow(). | 1235 //Isolate::StackOverflow(). |
1241 $stackOverflowBoilerplate = MakeRangeError(kStackOverflow); | 1236 $stackOverflowBoilerplate = MakeRangeError(kStackOverflow); |
1242 %DefineAccessorPropertyUnchecked($stackOverflowBoilerplate, 'stack', | 1237 %DefineAccessorPropertyUnchecked($stackOverflowBoilerplate, 'stack', |
1243 StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1238 StackTraceGetter, StackTraceSetter, DONT_ENUM); |
1244 | 1239 |
1245 }) | 1240 }) |
OLD | NEW |