| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 assertEquals("y", obj.y); | 116 assertEquals("y", obj.y); |
| 117 } | 117 } |
| 118 | 118 |
| 119 for (var i = 0; i < 10; i++) { | 119 for (var i = 0; i < 10; i++) { |
| 120 testArgs(f5); | 120 testArgs(f5); |
| 121 testArgs(f6); | 121 testArgs(f6); |
| 122 testArgs(f7); | 122 testArgs(f7); |
| 123 } | 123 } |
| 124 | 124 |
| 125 function g(){ | 125 function g(){ |
| 126 this.x=1 | 126 this.x = 1; |
| 127 } | 127 } |
| 128 | 128 |
| 129 o = new g(); | 129 o = new g(); |
| 130 assertEquals(1, o.x); | 130 assertEquals(1, o.x); |
| 131 o = new g(); | 131 o = new g(); |
| 132 assertEquals(1, o.x); | 132 assertEquals(1, o.x); |
| 133 g.prototype = {y:2} | 133 g.prototype = {y:2}; |
| 134 o = new g(); | 134 o = new g(); |
| 135 assertEquals(1, o.x); | 135 assertEquals(1, o.x); |
| 136 assertEquals(2, o.y); | 136 assertEquals(2, o.y); |
| 137 o = new g(); | 137 o = new g(); |
| 138 assertEquals(1, o.x); | 138 assertEquals(1, o.x); |
| 139 assertEquals(2, o.y); | 139 assertEquals(2, o.y); |
| 140 | |
| OLD | NEW |