| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 30 matching lines...) Expand all Loading... |
| 41 var r = "A"; | 41 var r = "A"; |
| 42 if (argumentsCount == 1) r += B(10); | 42 if (argumentsCount == 1) r += B(10); |
| 43 if (argumentsCount == 2) r += B(10, 11); | 43 if (argumentsCount == 2) r += B(10, 11); |
| 44 if (argumentsCount == 3) r += B(10, 11, 12); | 44 if (argumentsCount == 3) r += B(10, 11, 12); |
| 45 assertSame(1, x); | 45 assertSame(1, x); |
| 46 assertSame(2, y); | 46 assertSame(2, y); |
| 47 return r; | 47 return r; |
| 48 } | 48 } |
| 49 | 49 |
| 50 function B(x,y) { | 50 function B(x,y) { |
| 51 // TODO(2539): Enable the mutation below once bug is fixed. | 51 x = 0; y = 0; |
| 52 //x = 0; y = 0; | |
| 53 var r = "B" + dispatcher.func.apply(this, arguments); | 52 var r = "B" + dispatcher.func.apply(this, arguments); |
| 54 assertSame(argumentsCount, arguments.length); | 53 assertSame(argumentsCount, arguments.length); |
| 55 for (var i = 0; i < arguments.length; i++) { | 54 for (var i = 0; i < arguments.length; i++) { |
| 56 assertSame(10 + i, arguments[i]); | 55 assertSame(10 + i, arguments[i]); |
| 57 } | 56 } |
| 58 return r; | 57 return r; |
| 59 } | 58 } |
| 60 | 59 |
| 61 function C(x,y) { | 60 function C(x,y) { |
| 62 x = 0; y = 0; | 61 x = 0; y = 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 81 %DeoptimizeFunction(B); | 80 %DeoptimizeFunction(B); |
| 82 %ClearFunctionTypeFeedback(B); | 81 %ClearFunctionTypeFeedback(B); |
| 83 %DeoptimizeFunction(C); | 82 %DeoptimizeFunction(C); |
| 84 %ClearFunctionTypeFeedback(C); | 83 %ClearFunctionTypeFeedback(C); |
| 85 } | 84 } |
| 86 | 85 |
| 87 for (var a = 1; a <= 3; a++) { | 86 for (var a = 1; a <= 3; a++) { |
| 88 test(a); | 87 test(a); |
| 89 } | 88 } |
| 90 })(); | 89 })(); |
| OLD | NEW |