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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 ["Source is too large"], | 119 ["Source is too large"], |
120 typed_array_set_negative_offset: | 120 typed_array_set_negative_offset: |
121 ["Start offset is negative"], | 121 ["Start offset is negative"], |
122 invalid_data_view_offset: ["Start offset is outside the bounds of the buf
fer"], | 122 invalid_data_view_offset: ["Start offset is outside the bounds of the buf
fer"], |
123 invalid_data_view_length: ["Invalid data view length"], | 123 invalid_data_view_length: ["Invalid data view length"], |
124 invalid_data_view_accessor_offset: | 124 invalid_data_view_accessor_offset: |
125 ["Offset is outside the bounds of the DataView"
], | 125 ["Offset is outside the bounds of the DataView"
], |
126 | 126 |
127 stack_overflow: ["Maximum call stack size exceeded"], | 127 stack_overflow: ["Maximum call stack size exceeded"], |
128 invalid_time_value: ["Invalid time value"], | 128 invalid_time_value: ["Invalid time value"], |
| 129 |
| 130 invalid_count_value: ["Invalid count value"], |
129 // SyntaxError | 131 // SyntaxError |
130 paren_in_arg_string: ["Function arg string contains parenthesis"], | 132 paren_in_arg_string: ["Function arg string contains parenthesis"], |
131 not_isvar: ["builtin %IS_VAR: not a variable"], | 133 not_isvar: ["builtin %IS_VAR: not a variable"], |
132 single_function_literal: ["Single function literal required"], | 134 single_function_literal: ["Single function literal required"], |
133 invalid_regexp_flags: ["Invalid flags supplied to RegExp constructor
'", "%0", "'"], | 135 invalid_regexp_flags: ["Invalid flags supplied to RegExp constructor
'", "%0", "'"], |
134 invalid_regexp: ["Invalid RegExp pattern /", "%0", "/"], | 136 invalid_regexp: ["Invalid RegExp pattern /", "%0", "/"], |
135 illegal_break: ["Illegal break statement"], | 137 illegal_break: ["Illegal break statement"], |
136 illegal_continue: ["Illegal continue statement"], | 138 illegal_continue: ["Illegal continue statement"], |
137 illegal_return: ["Illegal return statement"], | 139 illegal_return: ["Illegal return statement"], |
138 illegal_let: ["Illegal let declaration outside extended mode
"], | 140 illegal_let: ["Illegal let declaration outside extended mode
"], |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 } | 1176 } |
1175 | 1177 |
1176 | 1178 |
1177 function SetUpError() { | 1179 function SetUpError() { |
1178 // Define special error type constructors. | 1180 // Define special error type constructors. |
1179 | 1181 |
1180 var DefineError = function(f) { | 1182 var DefineError = function(f) { |
1181 // Store the error function in both the global object | 1183 // Store the error function in both the global object |
1182 // and the runtime object. The function is fetched | 1184 // and the runtime object. The function is fetched |
1183 // from the runtime object when throwing errors from | 1185 // from the runtime object when throwing errors from |
1184 // within the runtime system to avoid strange side | 1186 // within the runtime system to avoid stack side |
1185 // effects when overwriting the error functions from | 1187 // effects when overwriting the error functions from |
1186 // user code. | 1188 // user code. |
1187 var name = f.name; | 1189 var name = f.name; |
1188 %SetProperty(global, name, f, DONT_ENUM); | 1190 %SetProperty(global, name, f, DONT_ENUM); |
1189 %SetProperty(builtins, '$' + name, f, DONT_ENUM | DONT_DELETE | READ_ONLY); | 1191 %SetProperty(builtins, '$' + name, f, DONT_ENUM | DONT_DELETE | READ_ONLY); |
1190 // Configure the error function. | 1192 // Configure the error function. |
1191 if (name == 'Error') { | 1193 if (name == 'Error') { |
1192 // The prototype of the Error object must itself be an error. | 1194 // The prototype of the Error object must itself be an error. |
1193 // However, it can't be an instance of the Error object because | 1195 // However, it can't be an instance of the Error object because |
1194 // it hasn't been properly configured yet. Instead we create a | 1196 // it hasn't been properly configured yet. Instead we create a |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 %GetAndClearOverflowedStackTrace(this); | 1338 %GetAndClearOverflowedStackTrace(this); |
1337 }; | 1339 }; |
1338 | 1340 |
1339 %DefineOrRedefineAccessorProperty( | 1341 %DefineOrRedefineAccessorProperty( |
1340 boilerplate, 'stack', getter, setter, DONT_ENUM); | 1342 boilerplate, 'stack', getter, setter, DONT_ENUM); |
1341 | 1343 |
1342 return boilerplate; | 1344 return boilerplate; |
1343 } | 1345 } |
1344 | 1346 |
1345 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1347 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
OLD | NEW |