| 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 (function(global, utils) { | 7 (function(global, utils) { |
| 8 | 8 |
| 9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 var Int16x8ToString; | 36 var Int16x8ToString; |
| 37 var Int32x4ToString; | 37 var Int32x4ToString; |
| 38 var Int8x16ToString; | 38 var Int8x16ToString; |
| 39 var InternalArray = utils.InternalArray; | 39 var InternalArray = utils.InternalArray; |
| 40 var internalErrorSymbol = utils.ImportNow("internal_error_symbol"); | 40 var internalErrorSymbol = utils.ImportNow("internal_error_symbol"); |
| 41 var ObjectHasOwnProperty; | 41 var ObjectHasOwnProperty; |
| 42 var ObjectToString = utils.ImportNow("object_to_string"); | 42 var ObjectToString = utils.ImportNow("object_to_string"); |
| 43 var Script = utils.ImportNow("Script"); | 43 var Script = utils.ImportNow("Script"); |
| 44 var stackTraceSymbol = utils.ImportNow("stack_trace_symbol"); | 44 var stackTraceSymbol = utils.ImportNow("stack_trace_symbol"); |
| 45 var StringIndexOf; | 45 var StringIndexOf; |
| 46 var SymbolToString; | |
| 47 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); | 46 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
| 48 var Uint16x8ToString; | 47 var Uint16x8ToString; |
| 49 var Uint32x4ToString; | 48 var Uint32x4ToString; |
| 50 var Uint8x16ToString; | 49 var Uint8x16ToString; |
| 51 | 50 |
| 52 utils.Import(function(from) { | 51 utils.Import(function(from) { |
| 53 ArrayJoin = from.ArrayJoin; | 52 ArrayJoin = from.ArrayJoin; |
| 54 Bool16x8ToString = from.Bool16x8ToString; | 53 Bool16x8ToString = from.Bool16x8ToString; |
| 55 Bool32x4ToString = from.Bool32x4ToString; | 54 Bool32x4ToString = from.Bool32x4ToString; |
| 56 Bool8x16ToString = from.Bool8x16ToString; | 55 Bool8x16ToString = from.Bool8x16ToString; |
| 57 Float32x4ToString = from.Float32x4ToString; | 56 Float32x4ToString = from.Float32x4ToString; |
| 58 Int16x8ToString = from.Int16x8ToString; | 57 Int16x8ToString = from.Int16x8ToString; |
| 59 Int32x4ToString = from.Int32x4ToString; | 58 Int32x4ToString = from.Int32x4ToString; |
| 60 Int8x16ToString = from.Int8x16ToString; | 59 Int8x16ToString = from.Int8x16ToString; |
| 61 ObjectHasOwnProperty = from.ObjectHasOwnProperty; | 60 ObjectHasOwnProperty = from.ObjectHasOwnProperty; |
| 62 StringIndexOf = from.StringIndexOf; | 61 StringIndexOf = from.StringIndexOf; |
| 63 SymbolToString = from.SymbolToString; | |
| 64 Uint16x8ToString = from.Uint16x8ToString; | 62 Uint16x8ToString = from.Uint16x8ToString; |
| 65 Uint32x4ToString = from.Uint32x4ToString; | 63 Uint32x4ToString = from.Uint32x4ToString; |
| 66 Uint8x16ToString = from.Uint8x16ToString; | 64 Uint8x16ToString = from.Uint8x16ToString; |
| 67 }); | 65 }); |
| 68 | 66 |
| 69 // ------------------------------------------------------------------- | 67 // ------------------------------------------------------------------- |
| 70 | 68 |
| 71 var GlobalError; | 69 var GlobalError; |
| 72 var GlobalTypeError; | 70 var GlobalTypeError; |
| 73 var GlobalRangeError; | 71 var GlobalRangeError; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 if (IS_UNDEFINED(obj)) return 'undefined'; | 108 if (IS_UNDEFINED(obj)) return 'undefined'; |
| 111 if (IS_NULL(obj)) return 'null'; | 109 if (IS_NULL(obj)) return 'null'; |
| 112 if (IS_FUNCTION(obj)) { | 110 if (IS_FUNCTION(obj)) { |
| 113 var str = %FunctionToString(obj); | 111 var str = %FunctionToString(obj); |
| 114 if (str.length > 128) { | 112 if (str.length > 128) { |
| 115 str = %_SubString(str, 0, 111) + "...<omitted>..." + | 113 str = %_SubString(str, 0, 111) + "...<omitted>..." + |
| 116 %_SubString(str, str.length - 2, str.length); | 114 %_SubString(str, str.length - 2, str.length); |
| 117 } | 115 } |
| 118 return str; | 116 return str; |
| 119 } | 117 } |
| 120 if (IS_SYMBOL(obj)) return %_Call(SymbolToString, obj); | 118 if (IS_SYMBOL(obj)) return %SymbolDescriptiveString(obj); |
| 121 if (IS_SIMD_VALUE(obj)) { | 119 if (IS_SIMD_VALUE(obj)) { |
| 122 switch (typeof(obj)) { | 120 switch (typeof(obj)) { |
| 123 case 'float32x4': return %_Call(Float32x4ToString, obj); | 121 case 'float32x4': return %_Call(Float32x4ToString, obj); |
| 124 case 'int32x4': return %_Call(Int32x4ToString, obj); | 122 case 'int32x4': return %_Call(Int32x4ToString, obj); |
| 125 case 'int16x8': return %_Call(Int16x8ToString, obj); | 123 case 'int16x8': return %_Call(Int16x8ToString, obj); |
| 126 case 'int8x16': return %_Call(Int8x16ToString, obj); | 124 case 'int8x16': return %_Call(Int8x16ToString, obj); |
| 127 case 'uint32x4': return %_Call(Uint32x4ToString, obj); | 125 case 'uint32x4': return %_Call(Uint32x4ToString, obj); |
| 128 case 'uint16x8': return %_Call(Uint16x8ToString, obj); | 126 case 'uint16x8': return %_Call(Uint16x8ToString, obj); |
| 129 case 'uint8x16': return %_Call(Uint8x16ToString, obj); | 127 case 'uint8x16': return %_Call(Uint8x16ToString, obj); |
| 130 case 'bool32x4': return %_Call(Bool32x4ToString, obj); | 128 case 'bool32x4': return %_Call(Bool32x4ToString, obj); |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 utils.Export(function(to) { | 756 utils.Export(function(to) { |
| 759 to.ErrorToString = ErrorToString; | 757 to.ErrorToString = ErrorToString; |
| 760 to.MakeError = MakeError; | 758 to.MakeError = MakeError; |
| 761 to.MakeRangeError = MakeRangeError; | 759 to.MakeRangeError = MakeRangeError; |
| 762 to.MakeSyntaxError = MakeSyntaxError; | 760 to.MakeSyntaxError = MakeSyntaxError; |
| 763 to.MakeTypeError = MakeTypeError; | 761 to.MakeTypeError = MakeTypeError; |
| 764 to.MakeURIError = MakeURIError; | 762 to.MakeURIError = MakeURIError; |
| 765 }); | 763 }); |
| 766 | 764 |
| 767 }); | 765 }); |
| OLD | NEW |