1 // Copyright 2010 the V8 project authors. All rights reserved. 2 // Redistribution and use in source and binary forms, with or without 3 // modification, are permitted provided that the following conditions are 4 // met: 5 // 6 // * Redistributions of source code must retain the above copyright 7 // notice, this list of conditions and the following disclaimer. 8 // * Redistributions in binary form must reproduce the above 9 // copyright notice, this list of conditions and the following 10 // disclaimer in the documentation and/or other materials provided 11 // with the distribution. 12 // * Neither the name of Google Inc. nor the names of its 13 // contributors may be used to endorse or promote products derived 14 // from this software without specific prior written permission. 15 // 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 28 // Regression test for the register allocator. 29 var gp = ""; 30 var yE = ""; 31 var W = ""; 32 var LA = ""; 33 var zE = ""; 34 var Fp = ""; 35 var AE = ""; 36 var Gob = ""; 37 var Hob = ""; 38 var Iob = ""; 39 var Job = ""; 40 var Kob = ""; 41 var Lob = ""; 42 var Mob = ""; 43 var p = ""; 44 function O() { this.append = function(a,b,c,d,e) { return a + b + c + d + e; } } 45 46 function Nob(b,a) { 47 var c; 48 if (b==2) { 49 c=new O; 50 c.append(gp, 51 yE, 52 W, 53 LA+(a.Un+(zE+(Fp+(LA+(a.Im+(zE+(AE+(LA+(a.total+Gob))))))))), 54 p); 55 c=c.toString(); 56 } else { 57 if (b==1) { 58 if(a.total>=2E6) { 59 c=new O; 60 c.append(gp,yE,W,LA+(a.Un+(zE+(Fp+(LA+(a.Im+Hob))))),p); 61 c=c.toString(); 62 } else { 63 if(a.total>=2E5) { 64 c=new O; 65 c.append(gp,yE,W,LA+(a.Un+(zE+(Fp+(LA+(a.Im+Iob))))),p); 66 c=c.toString(); 67 } else { 68 if(a.total>=2E4) { 69 c=new O; 70 c.append(gp,yE,W,LA+(a.Un+(zE+(Fp+(LA+(a.Im+Job))))),p); 71 c=c.toString(); 72 } else { 73 if(a.total>=2E3) { 74 c=new O; 75 c.append(gp,yE,W,LA+(a.Un+(zE+(Fp+(LA+(a.Im+Kob))))),p); 76 c=c.toString(); 77 } else { 78 if(a.total>=200) { 79 c=new O; 80 c.append(gp,yE,W,LA+(a.Un+(zE+(Fp+(LA+(a.Im+Lob))))),p); 81 c=c.toString(); 82 } else { 83 c=new O; 84 c.append(gp,yE,W, 85 LA+(a.Un+(zE+(Fp+(LA+(a.Im+(zE+(Mob+(LA+(a.total+zE))))))))), 86 p); 87 c=c.toString(); 88 } 89 c=c; 90 } 91 c=c; 92 } 93 c=c; 94 } 95 c=c; 96 } 97 c=c; 98 } else { 99 c=new O; 100 c.append(gp,yE,W, 101 LA+(a.Un+(zE+(Fp+(LA+(a.Im+(zE+(AE+(LA+(a.total+zE))))))))), 102 p); 103 c=c.toString(); 104 } 105 c=c; 106 } 107 return c; 108 } 109 Nob(2, { Un: "" , Im: "" , total: 42}); 110