| 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 kMessages = { | 7 var kMessages = { | 
| 8   // Error | 8   // Error | 
| 9   cyclic_proto:                  ["Cyclic __proto__ value"], | 9   cyclic_proto:                  ["Cyclic __proto__ value"], | 
| 10   code_gen_from_strings:         ["%0"], | 10   code_gen_from_strings:         ["%0"], | 
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 173   symbol_to_number:              ["Cannot convert a Symbol value to a number"], | 173   symbol_to_number:              ["Cannot convert a Symbol value to a number"], | 
| 174   invalid_module_path:           ["Module does not export '", "%0", "', or expor
      t is not itself a module"], | 174   invalid_module_path:           ["Module does not export '", "%0", "', or expor
      t is not itself a module"], | 
| 175   module_type_error:             ["Module '", "%0", "' used improperly"], | 175   module_type_error:             ["Module '", "%0", "' used improperly"], | 
| 176   module_export_undefined:       ["Export '", "%0", "' is not defined in module"
      ], | 176   module_export_undefined:       ["Export '", "%0", "' is not defined in module"
      ], | 
| 177   unexpected_super:              ["'super' keyword unexpected here"], | 177   unexpected_super:              ["'super' keyword unexpected here"], | 
| 178   extends_value_not_a_function:  ["Class extends value ", "%0", " is not a funct
      ion or null"], | 178   extends_value_not_a_function:  ["Class extends value ", "%0", " is not a funct
      ion or null"], | 
| 179   prototype_parent_not_an_object: ["Class extends value does not have valid prot
      otype property ", "%0"], | 179   prototype_parent_not_an_object: ["Class extends value does not have valid prot
      otype property ", "%0"], | 
| 180   duplicate_constructor:         ["A class may only have one constructor"], | 180   duplicate_constructor:         ["A class may only have one constructor"], | 
| 181   sloppy_lexical:                ["Block-scoped declarations (let, const, functi
      on, class) not yet supported outside strict mode"], | 181   sloppy_lexical:                ["Block-scoped declarations (let, const, functi
      on, class) not yet supported outside strict mode"], | 
| 182   super_constructor_call:        ["A 'super' constructor call may only appear as
       the first statement of a function, and its arguments may not access 'this'. Oth
      er forms are not yet supported."], | 182   super_constructor_call:        ["A 'super' constructor call may only appear as
       the first statement of a function, and its arguments may not access 'this'. Oth
      er forms are not yet supported."], | 
| 183   duplicate_proto:               ["Duplicate __proto__ fields are not allowed in
       object literals"] | 183   duplicate_proto:               ["Duplicate __proto__ fields are not allowed in
       object literals"], | 
|  | 184   param_after_rest:              ["Rest parameter must be last formal parameter"
      ] | 
| 184 }; | 185 }; | 
| 185 | 186 | 
| 186 | 187 | 
| 187 function FormatString(format, args) { | 188 function FormatString(format, args) { | 
| 188   var result = ""; | 189   var result = ""; | 
| 189   var arg_num = 0; | 190   var arg_num = 0; | 
| 190   for (var i = 0; i < format.length; i++) { | 191   for (var i = 0; i < format.length; i++) { | 
| 191     var str = format[i]; | 192     var str = format[i]; | 
| 192     if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { | 193     if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { | 
| 193       // Two-char string starts with "%". | 194       // Two-char string starts with "%". | 
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1314 function SetUpStackOverflowBoilerplate() { | 1315 function SetUpStackOverflowBoilerplate() { | 
| 1315   var boilerplate = MakeRangeError('stack_overflow', []); | 1316   var boilerplate = MakeRangeError('stack_overflow', []); | 
| 1316 | 1317 | 
| 1317   %DefineAccessorPropertyUnchecked( | 1318   %DefineAccessorPropertyUnchecked( | 
| 1318       boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1319       boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 
| 1319 | 1320 | 
| 1320   return boilerplate; | 1321   return boilerplate; | 
| 1321 } | 1322 } | 
| 1322 | 1323 | 
| 1323 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1324 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 
| OLD | NEW | 
|---|