<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[201825] trunk/Source/JavaScriptCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/201825">201825</a></dd>
<dt>Author</dt> <dd>keith_miller@apple.com</dd>
<dt>Date</dt> <dd>2016-06-08 12:40:34 -0700 (Wed, 08 Jun 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>We should be able to lookup symbols by identifier in builtins
https://bugs.webkit.org/show_bug.cgi?id=158530
Reviewed by Mark Lam.
This patch allows us to lookup the value of a symbol property on a
object by identifier in builtins. Before, it was only possible to
do so if we were directly emitting the bytecodes, such as in a
for-of loop looking for Symbol.iterator. As we tier up we convert
the builtin's get_by_val symbol lookups into get_by_id
lookups. However, there is still a significant performance
difference between get_by_id and get_by_val in the LLInt, where
this transformation does not take place.
In order to make this work we hijack BuiltinNames'
m_publicToPrivateMap so that it points the @<symbol>Symbol to the
appropriate vm symbol. This way when we lex the identifier it will
become the appropriate symbol's identifier. Currently, if the
symbol is used to name a property in an object literal we will not
keep a cache of the Symbol objects we have already seen. We could
add a map for symbols but since we can only load symbols by
identifier in builtins its likely not worth it. Additionally, even
in builtins it is extremely rare to use Symbols in object
literals.
* builtins/ArrayConstructor.js:
(from):
* builtins/ArrayPrototype.js:
(filter):
(map):
* builtins/BuiltinNames.h:
(JSC::BuiltinNames::BuiltinNames):
* builtins/BuiltinUtils.h:
* builtins/GlobalObject.js:
(speciesConstructor):
* builtins/StringPrototype.js:
(match):
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(search):
(split):
* builtins/TypedArrayConstructor.js:
(from):
* builtins/TypedArrayPrototype.js:
(map):
(filter):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry): Deleted.
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayConstructorjs">trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayPrototypejs">trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsBuiltinNamesh">trunk/Source/JavaScriptCore/builtins/BuiltinNames.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsBuiltinUtilsh">trunk/Source/JavaScriptCore/builtins/BuiltinUtils.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsGlobalObjectjs">trunk/Source/JavaScriptCore/builtins/GlobalObject.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsStringPrototypejs">trunk/Source/JavaScriptCore/builtins/StringPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsTypedArrayConstructorjs">trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsTypedArrayPrototypejs">trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeIntrinsicRegistrycpp">trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeIntrinsicRegistryh">trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -1,3 +1,58 @@
</span><ins>+2016-06-08 Keith Miller <keith_miller@apple.com>
+
+ We should be able to lookup symbols by identifier in builtins
+ https://bugs.webkit.org/show_bug.cgi?id=158530
+
+ Reviewed by Mark Lam.
+
+ This patch allows us to lookup the value of a symbol property on a
+ object by identifier in builtins. Before, it was only possible to
+ do so if we were directly emitting the bytecodes, such as in a
+ for-of loop looking for Symbol.iterator. As we tier up we convert
+ the builtin's get_by_val symbol lookups into get_by_id
+ lookups. However, there is still a significant performance
+ difference between get_by_id and get_by_val in the LLInt, where
+ this transformation does not take place.
+
+ In order to make this work we hijack BuiltinNames'
+ m_publicToPrivateMap so that it points the @<symbol>Symbol to the
+ appropriate vm symbol. This way when we lex the identifier it will
+ become the appropriate symbol's identifier. Currently, if the
+ symbol is used to name a property in an object literal we will not
+ keep a cache of the Symbol objects we have already seen. We could
+ add a map for symbols but since we can only load symbols by
+ identifier in builtins its likely not worth it. Additionally, even
+ in builtins it is extremely rare to use Symbols in object
+ literals.
+
+ * builtins/ArrayConstructor.js:
+ (from):
+ * builtins/ArrayPrototype.js:
+ (filter):
+ (map):
+ * builtins/BuiltinNames.h:
+ (JSC::BuiltinNames::BuiltinNames):
+ * builtins/BuiltinUtils.h:
+ * builtins/GlobalObject.js:
+ (speciesConstructor):
+ * builtins/StringPrototype.js:
+ (match):
+ (intrinsic.StringPrototypeReplaceIntrinsic.replace):
+ (search):
+ (split):
+ * builtins/TypedArrayConstructor.js:
+ (from):
+ * builtins/TypedArrayPrototype.js:
+ (map):
+ (filter):
+ * bytecode/BytecodeIntrinsicRegistry.cpp:
+ (JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry): Deleted.
+ * bytecode/BytecodeIntrinsicRegistry.h:
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::emitLoad):
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::parseInner):
+
</ins><span class="cx"> 2016-06-08 Rawinder Singh <rawinder.singh-webkit@cisra.canon.com.au>
</span><span class="cx">
</span><span class="cx"> [web-animations] Add Animatable, AnimationEffect, KeyframeEffect and Animation interface
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayConstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> if (items == null)
</span><span class="cx"> throw new @TypeError("Array.from requires an array-like object - not null or undefined");
</span><span class="cx">
</span><del>- var iteratorMethod = items[@symbolIterator];
</del><ins>+ var iteratorMethod = items.@iteratorSymbol;
</ins><span class="cx"> if (iteratorMethod != null) {
</span><span class="cx"> if (typeof iteratorMethod !== "function")
</span><span class="cx"> throw new @TypeError("Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function");
</span><span class="lines">@@ -71,11 +71,8 @@
</span><span class="cx"> // Since for-of loop once more looks up the @@iterator property of a given iterable,
</span><span class="cx"> // it could be observable if the user defines a getter for @@iterator.
</span><span class="cx"> // To avoid this situation, we define a wrapper object that @@iterator just returns a given iterator.
</span><del>- var wrapper = {
- [@symbolIterator]() {
- return iterator;
- }
- };
</del><ins>+ var wrapper = {}
+ wrapper.@iteratorSymbol = function() { return iterator; };
</ins><span class="cx">
</span><span class="cx"> for (var value of wrapper) {
</span><span class="cx"> if (mapFn)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx"> if (@isArrayConstructor(constructor) && @Array !== constructor)
</span><span class="cx"> constructor = @undefined;
</span><span class="cx"> if (@isObject(constructor)) {
</span><del>- constructor = constructor[@symbolSpecies];
</del><ins>+ constructor = constructor.@speciesSymbol;
</ins><span class="cx"> if (constructor === null)
</span><span class="cx"> constructor = @undefined;
</span><span class="cx"> }
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx"> if (@isArrayConstructor(constructor) && @Array !== constructor)
</span><span class="cx"> constructor = @undefined;
</span><span class="cx"> if (@isObject(constructor)) {
</span><del>- constructor = constructor[@symbolSpecies];
</del><ins>+ constructor = constructor.@speciesSymbol;
</ins><span class="cx"> if (constructor === null)
</span><span class="cx"> constructor = @undefined;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinNames.h (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinNames.h        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinNames.h        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -35,6 +35,11 @@
</span><span class="cx"> #define INITIALIZE_PRIVATE_TO_PUBLIC_ENTRY(name) m_privateToPublicMap.add(m_##name##PrivateName.impl(), &m_##name);
</span><span class="cx"> #define INITIALIZE_PUBLIC_TO_PRIVATE_ENTRY(name) m_publicToPrivateMap.add(m_##name.impl(), &m_##name##PrivateName);
</span><span class="cx">
</span><ins>+// We commandeer the publicToPrivateMap to allow us to convert private symbol names into the appropriate symbol.
+// e.g. @iteratorSymbol points to Symbol.iterator in this map rather than to a an actual private name.
+// FIXME: This is a weird hack and we shouldn't need to do this.
+#define INITIALIZE_SYMBOL_PUBLIC_TO_PRIVATE_ENTRY(name) m_publicToPrivateMap.add(m_##name##SymbolPrivateIdentifier.impl(), &m_##name##Symbol);
+
</ins><span class="cx"> class BuiltinNames {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(BuiltinNames); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">
</span><span class="lines">@@ -54,6 +59,7 @@
</span><span class="cx"> JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PRIVATE_TO_PUBLIC_ENTRY)
</span><span class="cx"> JSC_FOREACH_BUILTIN_FUNCTION_NAME(INITIALIZE_PUBLIC_TO_PRIVATE_ENTRY)
</span><span class="cx"> JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PUBLIC_TO_PRIVATE_ENTRY)
</span><ins>+ JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_SYMBOL_PUBLIC_TO_PRIVATE_ENTRY)
</ins><span class="cx"> m_privateToPublicMap.add(m_dollarVMPrivateName.impl(), &m_dollarVMName);
</span><span class="cx"> m_publicToPrivateMap.add(m_dollarVMName.impl(), &m_dollarVMPrivateName);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinUtilsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinUtils.h (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinUtils.h        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinUtils.h        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -37,8 +37,8 @@
</span><span class="cx"> const JSC::Identifier& name##PublicName() const { return m_##name; } \
</span><span class="cx"> const JSC::Identifier& name##PrivateName() const { return m_##name##PrivateName; }
</span><span class="cx">
</span><del>-#define INITIALIZE_BUILTIN_SYMBOLS(name) , m_##name##Symbol(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::Description, ASCIILiteral("Symbol." #name))))
-#define DECLARE_BUILTIN_SYMBOLS(name) const JSC::Identifier m_##name##Symbol;
</del><ins>+#define INITIALIZE_BUILTIN_SYMBOLS(name) , m_##name##Symbol(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::Description, ASCIILiteral("Symbol." #name)))), m_##name##SymbolPrivateIdentifier(JSC::Identifier::fromString(vm, #name "Symbol"))
+#define DECLARE_BUILTIN_SYMBOLS(name) const JSC::Identifier m_##name##Symbol; const JSC::Identifier m_##name##SymbolPrivateIdentifier;
</ins><span class="cx"> #define DECLARE_BUILTIN_SYMBOL_ACCESSOR(name) \
</span><span class="cx"> const JSC::Identifier& name##Symbol() const { return m_##name##Symbol; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsGlobalObjectjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/GlobalObject.js (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/GlobalObject.js        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/GlobalObject.js        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> return defaultConstructor;
</span><span class="cx"> if (!@isObject(constructor))
</span><span class="cx"> throw new @TypeError("|this|.constructor is not an Object or undefined");
</span><del>- constructor = constructor[@symbolSpecies];
</del><ins>+ constructor = constructor.@speciesSymbol;
</ins><span class="cx"> if (constructor == null)
</span><span class="cx"> return defaultConstructor;
</span><span class="cx"> if (@isConstructor(constructor))
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsStringPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/StringPrototype.js (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/StringPrototype.js        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/StringPrototype.js        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -36,14 +36,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (regexp != null) {
</span><del>- var matcher = regexp[@symbolMatch];
</del><ins>+ var matcher = regexp.@matchSymbol;
</ins><span class="cx"> if (matcher != @undefined)
</span><span class="cx"> return matcher.@call(regexp, this);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> let thisString = @toString(this);
</span><span class="cx"> let createdRegExp = @regExpCreate(regexp, @undefined);
</span><del>- return createdRegExp[@symbolMatch](thisString);
</del><ins>+ return createdRegExp.@matchSymbol(thisString);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function repeatSlowPath(string, count)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (search != null) {
</span><del>- let replacer = search[@symbolReplace];
</del><ins>+ let replacer = search.@replaceSymbol;
</ins><span class="cx"> if (replacer !== @undefined) {
</span><span class="cx"> if (!@hasObservableSideEffectsForStringReplace(search, replacer))
</span><span class="cx"> return @toString(this).@replaceUsingRegExp(search, replace);
</span><span class="lines">@@ -291,14 +291,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (regexp != null) {
</span><del>- var searcher = regexp[@symbolSearch];
</del><ins>+ var searcher = regexp.@searchSymbol;
</ins><span class="cx"> if (searcher != @undefined)
</span><span class="cx"> return searcher.@call(regexp, this);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> var thisString = @toString(this);
</span><span class="cx"> var createdRegExp = @regExpCreate(regexp, @undefined);
</span><del>- return createdRegExp[@symbolSearch](thisString);
</del><ins>+ return createdRegExp.@searchSymbol(thisString);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function split(separator, limit)
</span><span class="lines">@@ -312,7 +312,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (separator != null) {
</span><del>- var splitter = separator[@symbolSplit];
</del><ins>+ var splitter = separator.@splitSymbol;
</ins><span class="cx"> if (splitter != @undefined)
</span><span class="cx"> return splitter.@call(separator, this, limit);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsTypedArrayConstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> if (items == null)
</span><span class="cx"> throw new @TypeError("TypedArray.from requires an array-like object - not null or undefined");
</span><span class="cx">
</span><del>- let iteratorMethod = items[@symbolIterator];
</del><ins>+ let iteratorMethod = items.@iteratorSymbol;
</ins><span class="cx"> if (iteratorMethod != null) {
</span><span class="cx"> if (typeof iteratorMethod !== "function")
</span><span class="cx"> throw new @TypeError("TypedArray.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function");
</span><span class="lines">@@ -76,13 +76,9 @@
</span><span class="cx"> // Since for-of loop once more looks up the @@iterator property of a given iterable,
</span><span class="cx"> // it could be observable if the user defines a getter for @@iterator.
</span><span class="cx"> // To avoid this situation, we define a wrapper object that @@iterator just returns a given iterator.
</span><del>- let wrapper = {
- [@symbolIterator]() {
- return iterator;
- }
- };
</del><ins>+ let wrapper = {};
+ wrapper.@iteratorSymbol = function() { return iterator; }
</ins><span class="cx">
</span><del>-
</del><span class="cx"> for (let value of wrapper) {
</span><span class="cx"> if (mapFn)
</span><span class="cx"> @putByValDirect(accumulator, k, thisArg === @undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsTypedArrayPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx"> if (constructor === @undefined)
</span><span class="cx"> result = new (@typedArrayGetOriginalConstructor(this))(length);
</span><span class="cx"> else {
</span><del>- var speciesConstructor = @Object(constructor)[@symbolSpecies];
</del><ins>+ var speciesConstructor = @Object(constructor).@speciesSymbol;
</ins><span class="cx"> if (speciesConstructor === null || speciesConstructor === @undefined)
</span><span class="cx"> result = new (@typedArrayGetOriginalConstructor(this))(length);
</span><span class="cx"> else {
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx"> if (constructor === @undefined)
</span><span class="cx"> result = new (@typedArrayGetOriginalConstructor(this))(resultLength);
</span><span class="cx"> else {
</span><del>- var speciesConstructor = @Object(constructor)[@symbolSpecies];
</del><ins>+ var speciesConstructor = @Object(constructor).@speciesSymbol;
</ins><span class="cx"> if (speciesConstructor === null || speciesConstructor === @undefined)
</span><span class="cx"> result = new (@typedArrayGetOriginalConstructor(this))(resultLength);
</span><span class="cx"> else {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeIntrinsicRegistrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -54,12 +54,6 @@
</span><span class="cx"> m_promiseStatePending.set(m_vm, jsNumber(static_cast<unsigned>(JSPromise::Status::Pending)));
</span><span class="cx"> m_promiseStateFulfilled.set(m_vm, jsNumber(static_cast<unsigned>(JSPromise::Status::Fulfilled)));
</span><span class="cx"> m_promiseStateRejected.set(m_vm, jsNumber(static_cast<unsigned>(JSPromise::Status::Rejected)));
</span><del>- m_symbolIterator.set(m_vm, Symbol::create(m_vm, static_cast<SymbolImpl&>(*m_vm.propertyNames->iteratorSymbol.impl())));
- m_symbolMatch.set(m_vm, Symbol::create(m_vm, static_cast<SymbolImpl&>(*m_vm.propertyNames->matchSymbol.impl())));
- m_symbolReplace.set(m_vm, Symbol::create(m_vm, static_cast<SymbolImpl&>(*m_vm.propertyNames->replaceSymbol.impl())));
- m_symbolSearch.set(m_vm, Symbol::create(m_vm, static_cast<SymbolImpl&>(*m_vm.propertyNames->searchSymbol.impl())));
- m_symbolSpecies.set(m_vm, Symbol::create(m_vm, static_cast<SymbolImpl&>(*m_vm.propertyNames->speciesSymbol.impl())));
- m_symbolSplit.set(m_vm, Symbol::create(m_vm, static_cast<SymbolImpl&>(*m_vm.propertyNames->splitSymbol.impl())));
</del><span class="cx"> m_GeneratorResumeModeNormal.set(m_vm, jsNumber(static_cast<int32_t>(JSGeneratorFunction::GeneratorResumeMode::NormalMode)));
</span><span class="cx"> m_GeneratorResumeModeThrow.set(m_vm, jsNumber(static_cast<int32_t>(JSGeneratorFunction::GeneratorResumeMode::ThrowMode)));
</span><span class="cx"> m_GeneratorResumeModeReturn.set(m_vm, jsNumber(static_cast<int32_t>(JSGeneratorFunction::GeneratorResumeMode::ReturnMode)));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeIntrinsicRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -57,12 +57,6 @@
</span><span class="cx"> macro(promiseStatePending) \
</span><span class="cx"> macro(promiseStateFulfilled) \
</span><span class="cx"> macro(promiseStateRejected) \
</span><del>- macro(symbolIterator) \
- macro(symbolMatch) \
- macro(symbolReplace) \
- macro(symbolSearch) \
- macro(symbolSpecies) \
- macro(symbolSplit) \
</del><span class="cx"> macro(GeneratorResumeModeNormal) \
</span><span class="cx"> macro(GeneratorResumeModeThrow) \
</span><span class="cx"> macro(GeneratorResumeModeReturn) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -1727,9 +1727,11 @@
</span><span class="cx">
</span><span class="cx"> RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, const Identifier& identifier)
</span><span class="cx"> {
</span><ins>+ ASSERT(!identifier.isSymbol());
</ins><span class="cx"> JSString*& stringInMap = m_stringMap.add(identifier.impl(), nullptr).iterator->value;
</span><span class="cx"> if (!stringInMap)
</span><span class="cx"> stringInMap = jsOwnedString(vm(), identifier.string());
</span><ins>+
</ins><span class="cx"> return emitLoad(dst, JSValue(stringInMap));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (201824 => 201825)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-06-08 19:20:52 UTC (rev 201824)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-06-08 19:40:34 UTC (rev 201825)
</span><span class="lines">@@ -321,9 +321,8 @@
</span><span class="cx"> if (m_parsingBuiltin && isProgramParseMode(parseMode)) {
</span><span class="cx"> VariableEnvironment& lexicalVariables = scope->lexicalVariables();
</span><span class="cx"> const HashSet<UniquedStringImpl*>& closedVariableCandidates = scope->closedVariableCandidates();
</span><del>- const BuiltinNames& builtinNames = m_vm->propertyNames->builtinNames();
</del><span class="cx"> for (UniquedStringImpl* candidate : closedVariableCandidates) {
</span><del>- if (!lexicalVariables.contains(candidate) && !varDeclarations.contains(candidate) && !builtinNames.isPrivateName(*candidate)) {
</del><ins>+ if (!lexicalVariables.contains(candidate) && !varDeclarations.contains(candidate) && !candidate->isSymbol()) {
</ins><span class="cx"> dataLog("Bad global capture in builtin: '", candidate, "'\n");
</span><span class="cx"> dataLog(m_source->view());
</span><span class="cx"> CRASH();
</span></span></pre>
</div>
</div>
</body>
</html>