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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 strict_caller: ["Illegal access to a strict mode caller functi on."], | 152 strict_caller: ["Illegal access to a strict mode caller functi on."], |
153 unprotected_let: ["Illegal let declaration in unprotected statem ent context."], | 153 unprotected_let: ["Illegal let declaration in unprotected statem ent context."], |
154 unprotected_const: ["Illegal const declaration in unprotected stat ement context."], | 154 unprotected_const: ["Illegal const declaration in unprotected stat ement context."], |
155 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"], | 155 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"], |
156 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"], | 156 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"], |
157 harmony_const_assign: ["Assignment to constant variable."], | 157 harmony_const_assign: ["Assignment to constant variable."], |
158 symbol_to_string: ["Conversion from symbol to string"], | 158 symbol_to_string: ["Conversion from symbol to string"], |
159 invalid_module_path: ["Module does not export '", "%0", "', or expor t is not itself a module"], | 159 invalid_module_path: ["Module does not export '", "%0", "', or expor t is not itself a module"], |
160 module_type_error: ["Module '", "%0", "' used improperly"], | 160 module_type_error: ["Module '", "%0", "' used improperly"], |
161 module_export_undefined: ["Export '", "%0", "' is not defined in module" ], | 161 module_export_undefined: ["Export '", "%0", "' is not defined in module" ], |
162 generator_running: ["Generator is already running"], | |
Michael Starzinger
2013/04/21 22:45:21
Since generators throw Error objects for now, let'
wingo
2013/04/23 13:51:04
Done.
| |
163 generator_finished: ["Generator has already finished"] | |
162 }; | 164 }; |
163 | 165 |
164 | 166 |
165 function FormatString(format, args) { | 167 function FormatString(format, args) { |
166 var result = ""; | 168 var result = ""; |
167 var arg_num = 0; | 169 var arg_num = 0; |
168 for (var i = 0; i < format.length; i++) { | 170 for (var i = 0; i < format.length; i++) { |
169 var str = format[i]; | 171 var str = format[i]; |
170 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { | 172 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { |
171 // Two-char string starts with "%". | 173 // Two-char string starts with "%". |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1312 %SetOverflowedStackTrace(this, void 0); | 1314 %SetOverflowedStackTrace(this, void 0); |
1313 } | 1315 } |
1314 | 1316 |
1315 %DefineOrRedefineAccessorProperty( | 1317 %DefineOrRedefineAccessorProperty( |
1316 boilerplate, 'stack', getter, setter, DONT_ENUM); | 1318 boilerplate, 'stack', getter, setter, DONT_ENUM); |
1317 | 1319 |
1318 return boilerplate; | 1320 return boilerplate; |
1319 } | 1321 } |
1320 | 1322 |
1321 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1323 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
OLD | NEW |