OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 | 61 |
62 testBitNot("0", "string0"); | 62 testBitNot("0", "string0"); |
63 testBitNot("2.3", "string2.3"); | 63 testBitNot("2.3", "string2.3"); |
64 testBitNot("-9.4", "string-9.4"); | 64 testBitNot("-9.4", "string-9.4"); |
65 | 65 |
66 | 66 |
67 // Try to test that we can deal with allocation failures in | 67 // Try to test that we can deal with allocation failures in |
68 // the fast path and just use the slow path instead. | 68 // the fast path and just use the slow path instead. |
69 function TryToGC() { | 69 function TryToGC() { |
70 var x = 0x40000000; | 70 var x = 0x40000000; |
71 // Put in an eval to foil Crankshaft. | |
72 eval(""); | |
Lasse Reichstein
2011/05/25 10:29:39
Are we sure Crankshaft will never support eval? Es
Erik Corry
2011/05/25 10:34:40
I will make it my mission to ensure that Crankshaf
| |
71 for (var i = 0; i < 1000000; i++) { | 73 for (var i = 0; i < 1000000; i++) { |
72 assertEquals(~0x40000000, ~x); | 74 assertEquals(~0x40000000, ~x); |
73 } | 75 } |
74 } | 76 } |
75 TryToGC(); | 77 TryToGC(); |
OLD | NEW |