| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 // This file relies on the fact that the following declaration has been made | 7 // This file relies on the fact that the following declaration has been made |
| 8 // in runtime.js: | 8 // in runtime.js: |
| 9 // var $Array = global.Array; | 9 // var $Array = global.Array; |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 return %_SetGetSize(this); | 86 return %_SetGetSize(this); |
| 87 } | 87 } |
| 88 | 88 |
| 89 | 89 |
| 90 function SetClearJS() { | 90 function SetClearJS() { |
| 91 if (!IS_SET(this)) { | 91 if (!IS_SET(this)) { |
| 92 throw MakeTypeError('incompatible_method_receiver', | 92 throw MakeTypeError('incompatible_method_receiver', |
| 93 ['Set.prototype.clear', this]); | 93 ['Set.prototype.clear', this]); |
| 94 } | 94 } |
| 95 %SetClear(this); | 95 %_SetClear(this); |
| 96 } | 96 } |
| 97 | 97 |
| 98 | 98 |
| 99 function SetForEach(f, receiver) { | 99 function SetForEach(f, receiver) { |
| 100 if (!IS_SET(this)) { | 100 if (!IS_SET(this)) { |
| 101 throw MakeTypeError('incompatible_method_receiver', | 101 throw MakeTypeError('incompatible_method_receiver', |
| 102 ['Set.prototype.forEach', this]); | 102 ['Set.prototype.forEach', this]); |
| 103 } | 103 } |
| 104 | 104 |
| 105 if (!IS_SPEC_FUNCTION(f)) { | 105 if (!IS_SPEC_FUNCTION(f)) { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 return %_MapGetSize(this); | 239 return %_MapGetSize(this); |
| 240 } | 240 } |
| 241 | 241 |
| 242 | 242 |
| 243 function MapClearJS() { | 243 function MapClearJS() { |
| 244 if (!IS_MAP(this)) { | 244 if (!IS_MAP(this)) { |
| 245 throw MakeTypeError('incompatible_method_receiver', | 245 throw MakeTypeError('incompatible_method_receiver', |
| 246 ['Map.prototype.clear', this]); | 246 ['Map.prototype.clear', this]); |
| 247 } | 247 } |
| 248 %MapClear(this); | 248 %_MapClear(this); |
| 249 } | 249 } |
| 250 | 250 |
| 251 | 251 |
| 252 function MapForEach(f, receiver) { | 252 function MapForEach(f, receiver) { |
| 253 if (!IS_MAP(this)) { | 253 if (!IS_MAP(this)) { |
| 254 throw MakeTypeError('incompatible_method_receiver', | 254 throw MakeTypeError('incompatible_method_receiver', |
| 255 ['Map.prototype.forEach', this]); | 255 ['Map.prototype.forEach', this]); |
| 256 } | 256 } |
| 257 | 257 |
| 258 if (!IS_SPEC_FUNCTION(f)) { | 258 if (!IS_SPEC_FUNCTION(f)) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 "get", MapGetJS, | 295 "get", MapGetJS, |
| 296 "set", MapSetJS, | 296 "set", MapSetJS, |
| 297 "has", MapHasJS, | 297 "has", MapHasJS, |
| 298 "delete", MapDeleteJS, | 298 "delete", MapDeleteJS, |
| 299 "clear", MapClearJS, | 299 "clear", MapClearJS, |
| 300 "forEach", MapForEach | 300 "forEach", MapForEach |
| 301 )); | 301 )); |
| 302 } | 302 } |
| 303 | 303 |
| 304 SetUpMap(); | 304 SetUpMap(); |
| OLD | NEW |