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 constructor_is_generator: ["Class constructor may not be a generator"], | 9 constructor_is_generator: ["Class constructor may not be a generator"], |
10 constructor_is_accessor: ["Class constructor may not be an accessor"], | 10 constructor_is_accessor: ["Class constructor may not be an accessor"], |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 } catch (e) { | 1065 } catch (e) { |
1066 try { | 1066 try { |
1067 line = "<error: " + e + ">"; | 1067 line = "<error: " + e + ">"; |
1068 } catch (ee) { | 1068 } catch (ee) { |
1069 // Any code that reaches this point is seriously nasty! | 1069 // Any code that reaches this point is seriously nasty! |
1070 line = "<error>"; | 1070 line = "<error>"; |
1071 } | 1071 } |
1072 } | 1072 } |
1073 lines.push(" at " + line); | 1073 lines.push(" at " + line); |
1074 } | 1074 } |
1075 return %_CallFunction(lines, "\n", ArrayJoin); | 1075 return %_CallFunction(lines, "\n", $arrayJoin); |
1076 } | 1076 } |
1077 | 1077 |
1078 | 1078 |
1079 function GetTypeName(receiver, requireConstructor) { | 1079 function GetTypeName(receiver, requireConstructor) { |
1080 var constructor = receiver.constructor; | 1080 var constructor = receiver.constructor; |
1081 if (!constructor) { | 1081 if (!constructor) { |
1082 return requireConstructor ? null : | 1082 return requireConstructor ? null : |
1083 %_CallFunction(receiver, NoSideEffectsObjectToString); | 1083 %_CallFunction(receiver, NoSideEffectsObjectToString); |
1084 } | 1084 } |
1085 var constructorName = constructor.name; | 1085 var constructorName = constructor.name; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 function SetUpStackOverflowBoilerplate() { | 1275 function SetUpStackOverflowBoilerplate() { |
1276 var boilerplate = MakeRangeError(kStackOverflow); | 1276 var boilerplate = MakeRangeError(kStackOverflow); |
1277 | 1277 |
1278 %DefineAccessorPropertyUnchecked( | 1278 %DefineAccessorPropertyUnchecked( |
1279 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1279 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); |
1280 | 1280 |
1281 return boilerplate; | 1281 return boilerplate; |
1282 } | 1282 } |
1283 | 1283 |
1284 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1284 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
OLD | NEW |