| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 // Flags: --allow-natives-syntax --fold-constants | 5 // Flags: --allow-natives-syntax --fold-constants |
| 6 | 6 |
| 7 function test() { | 7 function test() { |
| 8 assertEquals("string", typeof ""); | 8 assertEquals("string", typeof ""); |
| 9 assertEquals("number", typeof 1.1); | 9 assertEquals("number", typeof 1.1); |
| 10 assertEquals("number", typeof 1); | 10 assertEquals("number", typeof 1); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 assertFalse(%_IsRegExp({})); | 27 assertFalse(%_IsRegExp({})); |
| 28 | 28 |
| 29 assertTrue(%_IsArray([1])); | 29 assertTrue(%_IsArray([1])); |
| 30 assertFalse(%_IsArray(function() {})); | 30 assertFalse(%_IsArray(function() {})); |
| 31 | 31 |
| 32 assertTrue(%_IsFunction(function() {})); | 32 assertTrue(%_IsFunction(function() {})); |
| 33 assertFalse(%_IsFunction(null)); | 33 assertFalse(%_IsFunction(null)); |
| 34 | 34 |
| 35 assertTrue(%_IsSpecObject(new Date())); | 35 assertTrue(%_IsSpecObject(new Date())); |
| 36 assertFalse(%_IsSpecObject(1)); | 36 assertFalse(%_IsSpecObject(1)); |
| 37 |
| 38 assertTrue(%_IsMinusZero(-0.0)); |
| 39 assertFalse(%_IsMinusZero(1)); |
| 40 assertFalse(%_IsMinusZero("")); |
| 37 } | 41 } |
| 38 | 42 |
| 39 | 43 |
| 40 test(); | 44 test(); |
| 41 test(); | 45 test(); |
| 42 %OptimizeFunctionOnNextCall(test); | 46 %OptimizeFunctionOnNextCall(test); |
| 43 test(); | 47 test(); |
| OLD | NEW |