arg-symbol-registry-hit.js (595B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-symbol.keyfor 5 description: Called with Symbol value that exists in the global symbol registry 6 info: | 7 1. If Type(sym) is not Symbol, throw a TypeError exception. 8 2. For each element e of the GlobalSymbolRegistry List (see 19.4.2.1), 9 a. If SameValue(e.[[Symbol]], sym) is true, return e.[[Key]]. 10 features: [Symbol] 11 ---*/ 12 13 var canonical = Symbol.for('s'); 14 15 assert.sameValue(Symbol.keyFor(canonical), 's'); 16 17 reportCompare(0, 0);