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 var $getHash; | 5 var $getHash; |
6 var $getExistingHash; | 6 var $getExistingHash; |
7 | 7 |
8 (function(global, utils) { | 8 (function(global, utils) { |
9 "use strict"; | 9 "use strict"; |
10 | 10 |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 var length = array.length; | 495 var length = array.length; |
496 for (var i = 0; i < length; ++i) { | 496 for (var i = 0; i < length; ++i) { |
497 %_CallFunction(set, array[i], SetAdd); | 497 %_CallFunction(set, array[i], SetAdd); |
498 } | 498 } |
499 return set; | 499 return set; |
500 }; | 500 }; |
501 | 501 |
502 // ----------------------------------------------------------------------- | 502 // ----------------------------------------------------------------------- |
503 // Exports | 503 // Exports |
504 | 504 |
505 utils.ExportToRuntime(function(to) { | 505 %InstallToContext([ |
506 to["map_get"] = MapGet; | 506 "map_get", MapGet, |
507 to["map_set"] = MapSet; | 507 "map_set", MapSet, |
508 to["map_has"] = MapHas; | 508 "map_has", MapHas, |
509 to["map_delete"] = MapDelete; | 509 "map_delete", MapDelete, |
510 to["set_add"] = SetAdd; | 510 "set_add", SetAdd, |
511 to["set_has"] = SetHas; | 511 "set_has", SetHas, |
512 to["set_delete"] = SetDelete; | 512 "set_delete", SetDelete, |
513 to["map_from_array"] = MapFromArray; | 513 "map_from_array", MapFromArray, |
514 to["set_from_array"]= SetFromArray; | 514 "set_from_array",SetFromArray, |
515 }); | 515 ]); |
516 | 516 |
517 }) | 517 }) |
OLD | NEW |