| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 196   duplicate_constructor:         ["A class may only have one constructor"], | 196   duplicate_constructor:         ["A class may only have one constructor"], | 
| 197   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."], | 197   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."], | 
| 198   duplicate_proto:               ["Duplicate __proto__ fields are not allowed in
       object literals"], | 198   duplicate_proto:               ["Duplicate __proto__ fields are not allowed in
       object literals"], | 
| 199   param_after_rest:              ["Rest parameter must be last formal parameter"
      ], | 199   param_after_rest:              ["Rest parameter must be last formal parameter"
      ], | 
| 200   constructor_noncallable:       ["Class constructors cannot be invoked without 
      'new'"], | 200   constructor_noncallable:       ["Class constructors cannot be invoked without 
      'new'"], | 
| 201   array_not_subclassable:        ["Subclassing Arrays is not currently supported
      ."], | 201   array_not_subclassable:        ["Subclassing Arrays is not currently supported
      ."], | 
| 202   for_in_loop_initializer:       ["for-in loop variable declaration may not have
       an initializer."], | 202   for_in_loop_initializer:       ["for-in loop variable declaration may not have
       an initializer."], | 
| 203   for_of_loop_initializer:       ["for-of loop variable declaration may not have
       an initializer."], | 203   for_of_loop_initializer:       ["for-of loop variable declaration may not have
       an initializer."], | 
| 204   for_inof_loop_multi_bindings:  ["Invalid left-hand side in ", "%0", " loop: Mu
      st have a single binding."], | 204   for_inof_loop_multi_bindings:  ["Invalid left-hand side in ", "%0", " loop: Mu
      st have a single binding."], | 
| 205   bad_getter_arity:              ["Getter must not have any formal parameters."]
      , | 205   bad_getter_arity:              ["Getter must not have any formal parameters."]
      , | 
| 206   bad_setter_arity:              ["Setter must have exactly one formal parameter
      ."] | 206   bad_setter_arity:              ["Setter must have exactly one formal parameter
      ."], | 
|  | 207   this_formal_parameter:         ["'this' is not a valid formal parameter name"]
      , | 
|  | 208   duplicate_arrow_function_formal_parameter: ["Arrow function may not have dupli
      cate parameter names"] | 
| 207 }; | 209 }; | 
| 208 | 210 | 
| 209 | 211 | 
| 210 function FormatString(format, args) { | 212 function FormatString(format, args) { | 
| 211   var result = ""; | 213   var result = ""; | 
| 212   var arg_num = 0; | 214   var arg_num = 0; | 
| 213   for (var i = 0; i < format.length; i++) { | 215   for (var i = 0; i < format.length; i++) { | 
| 214     var str = format[i]; | 216     var str = format[i]; | 
| 215     if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { | 217     if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { | 
| 216       // Two-char string starts with "%". | 218       // Two-char string starts with "%". | 
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1287 function SetUpStackOverflowBoilerplate() { | 1289 function SetUpStackOverflowBoilerplate() { | 
| 1288   var boilerplate = MakeRangeError('stack_overflow', []); | 1290   var boilerplate = MakeRangeError('stack_overflow', []); | 
| 1289 | 1291 | 
| 1290   %DefineAccessorPropertyUnchecked( | 1292   %DefineAccessorPropertyUnchecked( | 
| 1291       boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1293       boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 
| 1292 | 1294 | 
| 1293   return boilerplate; | 1295   return boilerplate; | 
| 1294 } | 1296 } | 
| 1295 | 1297 | 
| 1296 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1298 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 
| OLD | NEW | 
|---|