OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 case "String": | 208 case "String": |
209 case "Boolean": | 209 case "Boolean": |
210 case "Date": | 210 case "Date": |
211 return objectClass + "(" + PrettyPrint(ValueOf(value)) + ")"; | 211 return objectClass + "(" + PrettyPrint(ValueOf(value)) + ")"; |
212 case "RegExp": | 212 case "RegExp": |
213 return RegExpPrototypeToString.call(value); | 213 return RegExpPrototypeToString.call(value); |
214 case "Array": | 214 case "Array": |
215 var mapped = ArrayPrototypeMap.call(value, PrettyPrintArrayElement); | 215 var mapped = ArrayPrototypeMap.call(value, PrettyPrintArrayElement); |
216 var joined = ArrayPrototypeJoin.call(mapped, ","); | 216 var joined = ArrayPrototypeJoin.call(mapped, ","); |
217 return "[" + joined + "]"; | 217 return "[" + joined + "]"; |
| 218 case "Uint8Array": |
| 219 case "Int8Array": |
| 220 case "Int16Array": |
| 221 case "Uint16Array": |
| 222 case "Uint32Array": |
| 223 case "Int32Array": |
| 224 case "Float32Array": |
| 225 case "Float64Array": |
| 226 var joined = ArrayPrototypeJoin.call(value, ","); |
| 227 return objectClass + "([" + joined + "])"; |
218 case "Object": | 228 case "Object": |
219 break; | 229 break; |
220 default: | 230 default: |
221 return objectClass + "()"; | 231 return objectClass + "()"; |
222 } | 232 } |
223 // [[Class]] is "Object". | 233 // [[Class]] is "Object". |
224 var name = value.constructor.name; | 234 var name = value.constructor.name; |
225 if (name) return name + "()"; | 235 if (name) return name + "()"; |
226 return "Object()"; | 236 return "Object()"; |
227 default: | 237 default: |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 572 |
563 isTurboFanned = function isTurboFanned(fun) { | 573 isTurboFanned = function isTurboFanned(fun) { |
564 var opt_status = OptimizationStatus(fun, ""); | 574 var opt_status = OptimizationStatus(fun, ""); |
565 assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, | 575 assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, |
566 "not a function"); | 576 "not a function"); |
567 return (opt_status & V8OptimizationStatus.kOptimized) !== 0 && | 577 return (opt_status & V8OptimizationStatus.kOptimized) !== 0 && |
568 (opt_status & V8OptimizationStatus.kTurboFanned) !== 0; | 578 (opt_status & V8OptimizationStatus.kTurboFanned) !== 0; |
569 } | 579 } |
570 | 580 |
571 })(); | 581 })(); |
OLD | NEW |