Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Side by Side Diff: test/mjsunit/compiler/simple-bailouts.js

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/compiler/safepoint.js ('k') | test/mjsunit/compiler/simple-binary-op.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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
11 // with the distribution. 11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its 12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived 13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission. 14 // from this software without specific prior written permission.
15 // 15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 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. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 // Flags: --fast-compiler
29
30 function Test() { 28 function Test() {
31 this.result = 0; 29 this.result = 0;
32 this.x = 0; 30 this.x = 0;
33 this.y = 0; 31 this.y = 0;
34 this.z = 0; 32 this.z = 0;
35 } 33 }
36 var a = 1; 34 var a = 1;
37 var b = 2; 35 var b = 2;
38 var c = 4; 36 var c = 4;
39 var d = 8; 37 var d = 8;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // If this.x = 2 and a = 1.1: 83 // If this.x = 2 and a = 1.1:
86 this.z = // (14 | 1.1) == 15 84 this.z = // (14 | 1.1) == 15
87 (this.x = // (6 | 8) == 14 85 (this.x = // (6 | 8) == 14
88 (this.y = // (2 | 4) == 6 86 (this.y = // (2 | 4) == 6
89 this.x // 2 87 this.x // 2
90 | c) // 4 88 | c) // 4
91 | d) // 8 89 | d) // 8
92 | a; // 1.1 90 | a; // 1.1
93 } 91 }
94 92
93 Test.prototype.test10 = function() {
94 this.z = (a >> b) | (c >> c);
95 }
96
97 Test.prototype.test11 = function(x) {
98 this.z = x >> x;
99 }
100
95 var t = new Test(); 101 var t = new Test();
96 102
97 t.test0(); 103 t.test0();
98 assertEquals(3, t.result); 104 assertEquals(3, t.result);
99 105
100 t.test1(); 106 t.test1();
101 assertEquals(7, t.result); 107 assertEquals(7, t.result);
102 t.test2(); 108 t.test2();
103 assertEquals(7, t.result); 109 assertEquals(7, t.result);
104 110
(...skipping 13 matching lines...) Expand all
118 t.test8(); 124 t.test8();
119 assertEquals(4, t.x); 125 assertEquals(4, t.x);
120 assertEquals(3, t.y); 126 assertEquals(3, t.y);
121 assertEquals(5, t.z); 127 assertEquals(5, t.z);
122 128
123 t.x = 2; 129 t.x = 2;
124 t.test9(); 130 t.test9();
125 assertEquals(14, t.x); 131 assertEquals(14, t.x);
126 assertEquals(6, t.y); 132 assertEquals(6, t.y);
127 assertEquals(15, t.z); 133 assertEquals(15, t.z);
134
135 a = "2";
136 t.test11(a);
137 assertEquals(0, t.z);
138
139 a = 4;
140 b = "1";
141 c = 2;
142 t.test10();
143 assertEquals(2, t.z);
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/safepoint.js ('k') | test/mjsunit/compiler/simple-binary-op.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698