| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 82 } | 82 } | 
| 83 | 83 | 
| 84 | 84 | 
| 85 // ------------------------------------------------------------------- | 85 // ------------------------------------------------------------------- | 
| 86 | 86 | 
| 87 function SetUpWeakMap() { | 87 function SetUpWeakMap() { | 
| 88   %CheckIsBootstrapping(); | 88   %CheckIsBootstrapping(); | 
| 89 | 89 | 
| 90   %SetCode($WeakMap, WeakMapConstructor); | 90   %SetCode($WeakMap, WeakMapConstructor); | 
| 91   %FunctionSetPrototype($WeakMap, new $Object()); | 91   %FunctionSetPrototype($WeakMap, new $Object()); | 
| 92   %SetProperty($WeakMap.prototype, "constructor", $WeakMap, DONT_ENUM); | 92   %AddProperty($WeakMap.prototype, "constructor", $WeakMap, DONT_ENUM); | 
| 93 | 93 | 
| 94   // Set up the non-enumerable functions on the WeakMap prototype object. | 94   // Set up the non-enumerable functions on the WeakMap prototype object. | 
| 95   InstallFunctions($WeakMap.prototype, DONT_ENUM, $Array( | 95   InstallFunctions($WeakMap.prototype, DONT_ENUM, $Array( | 
| 96     "get", WeakMapGet, | 96     "get", WeakMapGet, | 
| 97     "set", WeakMapSet, | 97     "set", WeakMapSet, | 
| 98     "has", WeakMapHas, | 98     "has", WeakMapHas, | 
| 99     "delete", WeakMapDelete, | 99     "delete", WeakMapDelete, | 
| 100     "clear", WeakMapClear | 100     "clear", WeakMapClear | 
| 101   )); | 101   )); | 
| 102 } | 102 } | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 162 } | 162 } | 
| 163 | 163 | 
| 164 | 164 | 
| 165 // ------------------------------------------------------------------- | 165 // ------------------------------------------------------------------- | 
| 166 | 166 | 
| 167 function SetUpWeakSet() { | 167 function SetUpWeakSet() { | 
| 168   %CheckIsBootstrapping(); | 168   %CheckIsBootstrapping(); | 
| 169 | 169 | 
| 170   %SetCode($WeakSet, WeakSetConstructor); | 170   %SetCode($WeakSet, WeakSetConstructor); | 
| 171   %FunctionSetPrototype($WeakSet, new $Object()); | 171   %FunctionSetPrototype($WeakSet, new $Object()); | 
| 172   %SetProperty($WeakSet.prototype, "constructor", $WeakSet, DONT_ENUM); | 172   %AddProperty($WeakSet.prototype, "constructor", $WeakSet, DONT_ENUM); | 
| 173 | 173 | 
| 174   // Set up the non-enumerable functions on the WeakSet prototype object. | 174   // Set up the non-enumerable functions on the WeakSet prototype object. | 
| 175   InstallFunctions($WeakSet.prototype, DONT_ENUM, $Array( | 175   InstallFunctions($WeakSet.prototype, DONT_ENUM, $Array( | 
| 176     "add", WeakSetAdd, | 176     "add", WeakSetAdd, | 
| 177     "has", WeakSetHas, | 177     "has", WeakSetHas, | 
| 178     "delete", WeakSetDelete, | 178     "delete", WeakSetDelete, | 
| 179     "clear", WeakSetClear | 179     "clear", WeakSetClear | 
| 180   )); | 180   )); | 
| 181 } | 181 } | 
| 182 | 182 | 
| 183 SetUpWeakSet(); | 183 SetUpWeakSet(); | 
| OLD | NEW | 
|---|