Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: autotest/test_abprewrite.js.expected

Issue 6330303089999872: Issue 516 - JSHydra: return {foo:bar} produces broken code (Closed)
Patch Set: Created May 19, 2014, 6:58 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « autotest/abprewrite_source.js ('k') | autotest/test_abprewrite_module.js.expected » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 for (var _loopIndex9 = 0; _loopIndex9 < fooList.length; ++_loopIndex9) 60 for (var _loopIndex9 = 0; _loopIndex9 < fooList.length; ++_loopIndex9)
61 { 61 {
62 k = fooList[_loopIndex9]; 62 k = fooList[_loopIndex9];
63 alert(k); 63 alert(k);
64 } 64 }
65 var a = function() 65 var a = function()
66 { 66 {
67 return 1; 67 return 1;
68 }; 68 };
69 var b = 69 var b = {
70 {
71 get foo() 70 get foo()
72 { 71 {
73 return 1; 72 return 1;
74 } 73 }
75 }; 74 };
75
76 function foo()
77 {
78 return {
79 foo: 1,
80 bar: 2
81 };
82 }
76 if (a == b) 83 if (a == b)
77 { 84 {
78 foo(); 85 foo();
79 } 86 }
80 else if (a == c) 87 else if (a == c)
81 { 88 {
82 bar(); 89 bar();
83 } 90 }
84 else 91 else
85 { 92 {
86 bas(); 93 bas();
87 } 94 }
88 if (a == b){} 95 if (a == b)
96 {}
89 for (var a = 0; a < b.length; a++) 97 for (var a = 0; a < b.length; a++)
90 { 98 {
91 foo(); 99 foo();
92 } 100 }
93 for (var a = 0; a < b.length; a++){} 101 for (var a = 0; a < b.length; a++)
102 {}
94 for (var a in b) 103 for (var a in b)
95 { 104 {
96 foo(); 105 foo();
97 } 106 }
98 for (var a in b){} 107 for (var a in b)
108 {}
99 while (a == b) 109 while (a == b)
100 { 110 {
101 foo(); 111 foo();
102 } 112 }
103 while (a == b){} 113 while (a == b)
114 {}
104 115
105 function genFunc() 116 function genFunc()
106 { 117 {
107 var _generatorResult10 = []; 118 var _generatorResult10 = [];
108 for (var i = 0; i < 10; i++) 119 for (var i = 0; i < 10; i++)
109 { 120 {
110 _generatorResult10.push(i); 121 _generatorResult10.push(i);
111 } 122 }
112 return _generatorResult10; 123 return _generatorResult10;
113 } 124 }
114 var a = function() 125 var a = function()
115 { 126 {
116 var _generatorResult10 = []; 127 var _generatorResult10 = [];
117 for (var i = 0; i < 10; i++) 128 for (var i = 0; i < 10; i++)
118 { 129 {
119 _generatorResult10.push(i); 130 _generatorResult10.push(i);
120 } 131 }
121 return _generatorResult10; 132 return _generatorResult10;
122 }; 133 };
OLDNEW
« no previous file with comments | « autotest/abprewrite_source.js ('k') | autotest/test_abprewrite_module.js.expected » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld