WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-141859-20150221094915.patch (text/plain), 174.20 KB, created by
Yusuke Suzuki
on 2015-02-20 16:49:22 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2015-02-20 16:49:22 PST
Size:
174.20 KB
patch
obsolete
>Subversion Revision: 180467 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 5f6c421a91e3f71d7358ca0b566e6a6f0d50b9bc..b2fe8a0f42c09efc902c5ec57375a37d41fba62e 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,151 @@ >+2015-02-20 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ REGRESSION(r179429): Can't type comments in Facebook >+ https://bugs.webkit.org/show_bug.cgi?id=141859 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Revert a change because it breaks Facebook comment input. >+ >+ * CMakeLists.txt: >+ * DerivedSources.make: >+ * JavaScriptCore.order: >+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: >+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: >+ * JavaScriptCore.xcodeproj/project.pbxproj: >+ * builtins/BuiltinExecutables.cpp: >+ (JSC::BuiltinExecutables::createBuiltinExecutable): >+ * builtins/BuiltinNames.h: >+ * dfg/DFGOperations.cpp: >+ (JSC::DFG::operationPutByValInternal): >+ * inspector/JSInjectedScriptHost.cpp: >+ (Inspector::JSInjectedScriptHost::subtype): >+ * interpreter/Interpreter.cpp: >+ * jit/JITOperations.cpp: >+ (JSC::getByVal): >+ * llint/LLIntData.cpp: >+ (JSC::LLInt::Data::performAssertions): >+ * llint/LLIntSlowPaths.cpp: >+ (JSC::LLInt::getByVal): >+ (JSC::LLInt::LLINT_SLOW_PATH_DECL): >+ * llint/LowLevelInterpreter.asm: >+ * runtime/CommonIdentifiers.h: >+ * runtime/CommonSlowPaths.cpp: >+ (JSC::SLOW_PATH_DECL): >+ * runtime/CommonSlowPaths.h: >+ (JSC::CommonSlowPaths::opIn): >+ * runtime/ExceptionHelpers.cpp: >+ (JSC::createUndefinedVariableError): >+ * runtime/JSCJSValue.cpp: >+ (JSC::JSValue::synthesizePrototype): >+ (JSC::JSValue::dumpInContextAssumingStructure): >+ (JSC::JSValue::toStringSlowCase): >+ * runtime/JSCJSValue.h: >+ * runtime/JSCJSValueInlines.h: >+ (JSC::JSValue::isPrimitive): >+ (JSC::JSValue::getPropertySlot): >+ (JSC::JSValue::get): >+ (JSC::JSValue::equalSlowCaseInline): >+ (JSC::JSValue::strictEqualSlowCaseInline): >+ (JSC::JSValue::isSymbol): Deleted. >+ (JSC::JSValue::toPropertyKey): Deleted. >+ * runtime/JSCell.cpp: >+ (JSC::JSCell::put): >+ (JSC::JSCell::putByIndex): >+ (JSC::JSCell::toPrimitive): >+ (JSC::JSCell::getPrimitiveNumber): >+ (JSC::JSCell::toNumber): >+ (JSC::JSCell::toObject): >+ * runtime/JSCell.h: >+ * runtime/JSCellInlines.h: >+ (JSC::JSCell::toBoolean): >+ (JSC::JSCell::pureToBoolean): >+ (JSC::JSCell::isSymbol): Deleted. >+ * runtime/JSGlobalObject.cpp: >+ (JSC::JSGlobalObject::init): >+ (JSC::JSGlobalObject::visitChildren): >+ * runtime/JSGlobalObject.h: >+ (JSC::JSGlobalObject::symbolPrototype): Deleted. >+ (JSC::JSGlobalObject::symbolObjectStructure): Deleted. >+ * runtime/JSONObject.cpp: >+ (JSC::Stringifier::Stringifier): >+ * runtime/JSSymbolTableObject.cpp: >+ (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames): >+ * runtime/JSType.h: >+ * runtime/JSTypeInfo.h: >+ (JSC::TypeInfo::isName): >+ * runtime/MapData.cpp: >+ (JSC::MapData::find): >+ (JSC::MapData::add): >+ (JSC::MapData::remove): >+ (JSC::MapData::replaceAndPackBackingStore): >+ * runtime/MapData.h: >+ (JSC::MapData::clear): >+ * runtime/NameConstructor.cpp: Renamed from Source/JavaScriptCore/runtime/SymbolConstructor.cpp. >+ (JSC::NameConstructor::NameConstructor): >+ (JSC::NameConstructor::finishCreation): >+ (JSC::constructPrivateName): >+ (JSC::NameConstructor::getConstructData): >+ (JSC::NameConstructor::getCallData): >+ * runtime/NameConstructor.h: Renamed from Source/JavaScriptCore/runtime/SymbolConstructor.h. >+ (JSC::NameConstructor::create): >+ (JSC::NameConstructor::createStructure): >+ * runtime/NameInstance.cpp: Copied from Source/JavaScriptCore/runtime/SymbolObject.cpp. >+ (JSC::NameInstance::NameInstance): >+ (JSC::NameInstance::destroy): >+ * runtime/NameInstance.h: Copied from Source/JavaScriptCore/runtime/SymbolPrototype.h. >+ (JSC::NameInstance::createStructure): >+ (JSC::NameInstance::create): >+ (JSC::NameInstance::privateName): >+ (JSC::NameInstance::nameString): >+ (JSC::NameInstance::finishCreation): >+ (JSC::isName): >+ * runtime/NamePrototype.cpp: Renamed from Source/JavaScriptCore/runtime/SymbolObject.cpp. >+ (JSC::NamePrototype::NamePrototype): >+ (JSC::NamePrototype::finishCreation): >+ (JSC::NamePrototype::getOwnPropertySlot): >+ (JSC::privateNameProtoFuncToString): >+ * runtime/NamePrototype.h: Renamed from Source/JavaScriptCore/runtime/SymbolPrototype.h. >+ (JSC::NamePrototype::create): >+ (JSC::NamePrototype::createStructure): >+ * runtime/ObjectConstructor.cpp: >+ (JSC::objectConstructorGetOwnPropertyDescriptor): >+ (JSC::objectConstructorDefineProperty): >+ * runtime/ObjectPrototype.cpp: >+ (JSC::objectProtoFuncHasOwnProperty): >+ (JSC::objectProtoFuncDefineGetter): >+ (JSC::objectProtoFuncDefineSetter): >+ (JSC::objectProtoFuncLookupGetter): >+ (JSC::objectProtoFuncLookupSetter): >+ (JSC::objectProtoFuncPropertyIsEnumerable): >+ * runtime/Operations.cpp: >+ (JSC::jsTypeStringForValue): >+ (JSC::jsIsObjectType): >+ * runtime/PrivateName.h: >+ (JSC::PrivateName::PrivateName): >+ (JSC::PrivateName::operator==): Deleted. >+ (JSC::PrivateName::operator!=): Deleted. >+ * runtime/PropertyMapHashTable.h: >+ (JSC::PropertyTable::find): >+ (JSC::PropertyTable::get): >+ * runtime/PropertyName.h: >+ (JSC::PropertyName::PropertyName): >+ (JSC::PropertyName::publicName): >+ * runtime/SmallStrings.h: >+ * runtime/StringConstructor.cpp: >+ (JSC::callStringConstructor): >+ * runtime/Structure.cpp: >+ (JSC::Structure::getPropertyNamesFromStructure): >+ * runtime/StructureInlines.h: >+ (JSC::Structure::prototypeForLookup): >+ * runtime/Symbol.cpp: Removed. >+ * runtime/Symbol.h: Removed. >+ * runtime/SymbolObject.h: Removed. >+ * runtime/SymbolPrototype.cpp: Removed. >+ * runtime/VM.cpp: >+ (JSC::VM::VM): >+ * runtime/VM.h: >+ > 2015-02-20 Mark Lam <mark.lam@apple.com> > > Refactor JSWrapperMap.mm to defer creation of the ObjC JSValue until the latest possible moment. >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index ee872041c93d32d1068980e4cf8dc17a703b5002..e71c1ebf493cafcbfd032f9193a876e2469545b0 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,28 @@ >+2015-02-20 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ REGRESSION(r179429): Can't type comments in Facebook >+ https://bugs.webkit.org/show_bug.cgi?id=141859 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/text/AtomicString.h: >+ (WTF::AtomicString::add): >+ (WTF::AtomicString::addWithStringTableProvider): >+ * wtf/text/StringImpl.cpp: >+ (WTF::StringImpl::~StringImpl): >+ (WTF::StringImpl::createUnique): Deleted. >+ * wtf/text/StringImpl.h: >+ (WTF::StringImpl::StringImpl): >+ (WTF::StringImpl::createEmptyUnique): >+ (WTF::StringImpl::isEmptyUnique): >+ (WTF::StringImpl::setIsAtomic): >+ (WTF::StringImpl::createUniqueEmpty): Deleted. >+ (WTF::StringImpl::flagIsUnique): Deleted. >+ (WTF::StringImpl::isUnique): Deleted. >+ * wtf/text/StringStatics.cpp: >+ (WTF::StringImpl::hashAndFlagsForEmptyUnique): >+ (WTF::StringImpl::hashAndFlagsForUnique): Deleted. >+ > 2015-02-20 Geoffrey Garen <ggaren@apple.com> > > Remove TCMalloc >diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt >index cb6d55e7379e23d42b3527c52adf656f53b3ed8a..fb2b677f2451a662a3e8a58ef45aac2edb92214e 100644 >--- a/Source/JavaScriptCore/CMakeLists.txt >+++ b/Source/JavaScriptCore/CMakeLists.txt >@@ -512,6 +512,9 @@ set(JavaScriptCore_RUNTIME_SOURCES > runtime/MathCommon.cpp > runtime/MathObject.cpp > runtime/MemoryStatistics.cpp >+ runtime/NameConstructor.cpp >+ runtime/NameInstance.cpp >+ runtime/NamePrototype.cpp > runtime/NativeErrorConstructor.cpp > runtime/NativeErrorPrototype.cpp > runtime/NullGetterFunction.cpp >@@ -552,10 +555,6 @@ set(JavaScriptCore_RUNTIME_SOURCES > runtime/StructureChain.cpp > runtime/StructureIDTable.cpp > runtime/StructureRareData.cpp >- runtime/Symbol.cpp >- runtime/SymbolObject.cpp >- runtime/SymbolPrototype.cpp >- runtime/SymbolConstructor.cpp > runtime/SymbolTable.cpp > runtime/TestRunnerUtils.cpp > runtime/TypeLocationCache.cpp >@@ -589,6 +588,7 @@ set(JavaScriptCore_LUT_FILES > runtime/JSONObject.cpp > runtime/JSPromiseConstructor.cpp > runtime/JSPromisePrototype.cpp >+ runtime/NamePrototype.cpp > runtime/NumberConstructor.cpp > runtime/NumberPrototype.cpp > runtime/ObjectConstructor.cpp >@@ -596,7 +596,6 @@ set(JavaScriptCore_LUT_FILES > runtime/RegExpObject.cpp > runtime/RegExpPrototype.cpp > runtime/StringConstructor.cpp >- runtime/SymbolPrototype.cpp > ) > > set(JavaScriptCore_LIBRARIES >diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make >index 4a2623ef5c9c756d5da547f1d3d65cea9a17695a..12afea24a6ee56a60dc5b82efbf06c42ab30dc44 100644 >--- a/Source/JavaScriptCore/DerivedSources.make >+++ b/Source/JavaScriptCore/DerivedSources.make >@@ -48,6 +48,7 @@ all : \ > JSPromiseConstructor.lut.h \ > KeywordLookup.h \ > Lexer.lut.h \ >+ NamePrototype.lut.h \ > NumberConstructor.lut.h \ > NumberPrototype.lut.h \ > ObjectConstructor.lut.h \ >@@ -56,7 +57,6 @@ all : \ > RegExpJitTables.h \ > RegExpObject.lut.h \ > StringConstructor.lut.h \ >- SymbolPrototype.lut.h \ > udis86_itab.h \ > Bytecodes.h \ > InitBytecodes.asm \ >diff --git a/Source/JavaScriptCore/JavaScriptCore.order b/Source/JavaScriptCore/JavaScriptCore.order >index 26be0ee276e0ee5c86e610999f2d476b0dd806de..fd684f6f0039c5929d0b133a3057bac3cc916c0b 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.order >+++ b/Source/JavaScriptCore/JavaScriptCore.order >@@ -4599,8 +4599,14 @@ __ZN3JSCL24regExpConstructorDollar6EPNS_9ExecStateENS_7JSValueENS_12PropertyName > __ZN3JSC5LexerIhE23parseIdentifierSlowCaseILb1EEENS_11JSTokenTypeEPNS_11JSTokenDataEjb > __ZN3JSC4Yarr13YarrGeneratorILNS0_18YarrJITCompileModeE1EE33generatePatternCharacterNonGreedyEm > __ZN3JSC4Yarr13YarrGeneratorILNS0_18YarrJITCompileModeE1EE34backtrackPatternCharacterNonGreedyEm >+__ZN3JSC13NamePrototypeC1EPNS_9ExecStateEPNS_9StructureE >+__ZN3JSC12NameInstanceC2ERNS_2VMEPNS_9StructureEPNS_8JSStringE >+__ZN3JSC13NamePrototype14finishCreationEPNS_9ExecStateE >+__ZN3JSC15NameConstructorC1EPNS_14JSGlobalObjectEPNS_9StructureE >+__ZN3JSC15NameConstructor14finishCreationEPNS_9ExecStateEPNS_13NamePrototypeE > _JSStringIsEqualToUTF8CString > _JSStringIsEqual >+__ZN3JSC12NameInstance7destroyEPNS_6JSCellE > __ZN3WTF3MD5C1Ev > __ZN3WTF3MD58addBytesEPKhm > __ZN3WTFL12MD5TransformEPjPKj >@@ -4750,7 +4756,9 @@ __ZN3JSC22createOutOfMemoryErrorEPNS_14JSGlobalObjectE > __ZN3JSCL17mathProtoFuncACosEPNS_9ExecStateE > __ZN3JSC11JSNameScope3putEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameENS_7JSValueERNS_15PutPropertySlotE > __ZN3JSC14symbolTablePutINS_11JSNameScopeEEEbPT_PNS_9ExecStateENS_12PropertyNameENS_7JSValueEb >+__ZN3JSC15NameConstructor11getCallDataEPNS_6JSCellERNS_8CallDataE > __ZN3JSCL20constructPrivateNameEPNS_9ExecStateE >+__ZN3JSC12NameInstanceC1ERNS_2VMEPNS_9StructureEPNS_8JSStringE > __ZN3JSCL29objectProtoFuncToLocaleStringEPNS_9ExecStateE > __ZN3JSC13JSNotAnObject24getOwnPropertyDescriptorEPNS_8JSObjectEPNS_9ExecStateENS_12PropertyNameERNS_18PropertyDescriptorE > __ZN3JSCL20isNonLatin1IdentPartEi >diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj >index 41b2bd179d40bd04ab80b5ad7c03d7b56122951a..a21bf20247f9f8fbb938dec742329bc234d9531c 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj >+++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj >@@ -779,6 +779,9 @@ > <ClCompile Include="..\runtime\MathCommon.cpp" /> > <ClCompile Include="..\runtime\MathObject.cpp" /> > <ClCompile Include="..\runtime\MemoryStatistics.cpp" /> >+ <ClCompile Include="..\runtime\NameConstructor.cpp" /> >+ <ClCompile Include="..\runtime\NameInstance.cpp" /> >+ <ClCompile Include="..\runtime\NamePrototype.cpp" /> > <ClCompile Include="..\runtime\NativeErrorConstructor.cpp" /> > <ClCompile Include="..\runtime\NativeErrorPrototype.cpp" /> > <ClCompile Include="..\runtime\NullGetterFunction.cpp" /> >@@ -819,10 +822,6 @@ > <ClCompile Include="..\runtime\StructureChain.cpp" /> > <ClCompile Include="..\runtime\StructureIDTable.cpp" /> > <ClCompile Include="..\runtime\StructureRareData.cpp" /> >- <ClCompile Include="..\runtime\Symbol.cpp" /> >- <ClCompile Include="..\runtime\SymbolConstructor.cpp" /> >- <ClCompile Include="..\runtime\SymbolObject.cpp" /> >- <ClCompile Include="..\runtime\SymbolPrototype.cpp" /> > <ClCompile Include="..\runtime\SymbolTable.cpp" /> > <ClCompile Include="..\runtime\TestRunnerUtils.cpp" /> > <ClCompile Include="..\runtime\TypedArrayController.cpp" /> >@@ -871,6 +870,7 @@ > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSPromisePrototype.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\KeywordLookup.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\Lexer.lut.h" /> >+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\NamePrototype.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\NumberConstructor.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\NumberPrototype.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ObjectConstructor.lut.h" /> >@@ -879,7 +879,6 @@ > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\RegExpObject.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\RegExpPrototype.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\StringConstructor.lut.h" /> >- <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SymbolPrototype.lut.h" /> > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCBuiltins.h" /> > </ItemGroup> > <ItemGroup> >@@ -1578,6 +1577,9 @@ > <ClInclude Include="..\runtime\MathObject.h" /> > <ClInclude Include="..\runtime\MemoryStatistics.h" /> > <ClInclude Include="..\runtime\Microtask.h" /> >+ <ClInclude Include="..\runtime\NameConstructor.h" /> >+ <ClInclude Include="..\runtime\NameInstance.h" /> >+ <ClInclude Include="..\runtime\NamePrototype.h" /> > <ClInclude Include="..\runtime\NativeErrorConstructor.h" /> > <ClInclude Include="..\runtime\NativeErrorPrototype.h" /> > <ClInclude Include="..\runtime\NullGetterFunction.h" /> >@@ -1632,10 +1634,6 @@ > <ClInclude Include="..\runtime\StructureRareData.h" /> > <ClInclude Include="..\runtime\StructureRareDataInlines.h" /> > <ClInclude Include="..\runtime\StructureTransitionTable.h" /> >- <ClInclude Include="..\runtime\Symbol.h" /> >- <ClInclude Include="..\runtime\SymbolConstructor.h" /> >- <ClInclude Include="..\runtime\SymbolObject.h" /> >- <ClInclude Include="..\runtime\SymbolPrototype.h" /> > <ClInclude Include="..\runtime\SymbolTable.h" /> > <ClInclude Include="..\runtime\TestRunnerUtils.h" /> > <ClInclude Include="..\runtime\Tracing.h" /> >diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters >index 8048abe4716aa70360f51328559974f13258e500..7d8cdc4832e6752273306d5d0f0cd7b2c7c984c8 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters >+++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters >@@ -741,6 +741,15 @@ > <ClCompile Include="..\runtime\MathObject.cpp"> > <Filter>runtime</Filter> > </ClCompile> >+ <ClCompile Include="..\runtime\NameConstructor.cpp"> >+ <Filter>runtime</Filter> >+ </ClCompile> >+ <ClCompile Include="..\runtime\NameInstance.cpp"> >+ <Filter>runtime</Filter> >+ </ClCompile> >+ <ClCompile Include="..\runtime\NamePrototype.cpp"> >+ <Filter>runtime</Filter> >+ </ClCompile> > <ClCompile Include="..\runtime\NativeErrorConstructor.cpp"> > <Filter>runtime</Filter> > </ClCompile> >@@ -852,18 +861,6 @@ > <ClCompile Include="..\runtime\StructureIDTable.cpp"> > <Filter>runtime</Filter> > </ClCompile> >- <ClCompile Include="..\runtime\Symbol.cpp"> >- <Filter>runtime</Filter> >- </ClCompile> >- <ClCompile Include="..\runtime\SymbolConstructor.cpp"> >- <Filter>runtime</Filter> >- </ClCompile> >- <ClCompile Include="..\runtime\SymbolObject.cpp"> >- <Filter>runtime</Filter> >- </ClCompile> >- <ClCompile Include="..\runtime\SymbolPrototype.cpp"> >- <Filter>runtime</Filter> >- </ClCompile> > <ClCompile Include="..\runtime\SymbolTable.cpp"> > <Filter>runtime</Filter> > </ClCompile> >@@ -2766,6 +2763,15 @@ > <ClInclude Include="..\runtime\MathObject.h"> > <Filter>runtime</Filter> > </ClInclude> >+ <ClInclude Include="..\runtime\NameConstructor.h"> >+ <Filter>runtime</Filter> >+ </ClInclude> >+ <ClInclude Include="..\runtime\NameInstance.h"> >+ <Filter>runtime</Filter> >+ </ClInclude> >+ <ClInclude Include="..\runtime\NamePrototype.h"> >+ <Filter>runtime</Filter> >+ </ClInclude> > <ClInclude Include="..\runtime\NativeErrorConstructor.h"> > <Filter>runtime</Filter> > </ClInclude> >@@ -2901,18 +2907,6 @@ > <ClInclude Include="..\runtime\StructureTransitionTable.h"> > <Filter>runtime</Filter> > </ClInclude> >- <ClInclude Include="..\runtime\Symbol.h"> >- <Filter>runtime</Filter> >- </ClInclude> >- <ClInclude Include="..\runtime\SymbolConstructor.h"> >- <Filter>runtime</Filter> >- </ClInclude> >- <ClInclude Include="..\runtime\SymbolObject.h"> >- <Filter>runtime</Filter> >- </ClInclude> >- <ClInclude Include="..\runtime\SymbolPrototype.h"> >- <Filter>runtime</Filter> >- </ClInclude> > <ClInclude Include="..\runtime\SymbolTable.h"> > <Filter>runtime</Filter> > </ClInclude> >@@ -3259,7 +3253,7 @@ > <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\RegExpObject.lut.h"> > <Filter>Derived Sources</Filter> > </ClInclude> >- <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SymbolPrototype.lut.h"> >+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\NamePrototype.lut.h"> > <Filter>Derived Sources</Filter> > </ClInclude> > <ClInclude Include="..\heap\CodeBlockSet.h"> >diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >index 2c01d6f10250b55b3f9c653dc0402002d8eeb488..369c0bc7f37cdb4cd4043587461c52adb4b2f149 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >@@ -941,14 +941,6 @@ > 65C0285D1717966800351E35 /* ARMv7DOpcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C0285B1717966800351E35 /* ARMv7DOpcode.h */; }; > 65FB5117184EEE7000C12B70 /* ProtoCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65FB5116184EE9BC00C12B70 /* ProtoCallFrame.cpp */; }; > 6AD2CB4D19B9140100065719 /* DebuggerEvalEnabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AD2CB4C19B9140100065719 /* DebuggerEvalEnabler.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 705B41AB1A6E501E00716757 /* Symbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 705B41A31A6E501E00716757 /* Symbol.cpp */; }; >- 705B41AC1A6E501E00716757 /* Symbol.h in Headers */ = {isa = PBXBuildFile; fileRef = 705B41A41A6E501E00716757 /* Symbol.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 705B41AD1A6E501E00716757 /* SymbolConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 705B41A51A6E501E00716757 /* SymbolConstructor.cpp */; }; >- 705B41AE1A6E501E00716757 /* SymbolConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 705B41A61A6E501E00716757 /* SymbolConstructor.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 705B41AF1A6E501E00716757 /* SymbolObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 705B41A71A6E501E00716757 /* SymbolObject.cpp */; }; >- 705B41B01A6E501E00716757 /* SymbolObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 705B41A81A6E501E00716757 /* SymbolObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 705B41B11A6E501E00716757 /* SymbolPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 705B41A91A6E501E00716757 /* SymbolPrototype.cpp */; }; >- 705B41B21A6E501E00716757 /* SymbolPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 705B41AA1A6E501E00716757 /* SymbolPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7C008CD2186F8A9300955C24 /* JSPromiseFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */; }; > 7C008CD3186F8A9300955C24 /* JSPromiseFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C008CD1186F8A9300955C24 /* JSPromiseFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7C008CDA187124BB00955C24 /* JSPromiseDeferred.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C008CD8187124BB00955C24 /* JSPromiseDeferred.cpp */; }; >@@ -1034,6 +1026,12 @@ > 86E3C61C167BABEE006D760A /* JSVirtualMachine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86E3C610167BAB87006D760A /* JSVirtualMachine.mm */; }; > 86E3C61D167BABEE006D760A /* JSVirtualMachineInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C611167BAB87006D760A /* JSVirtualMachineInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E85538111B9968001AF51E /* JSStringBuilder.h */; }; >+ 86EBF2FF1560F06A008E9222 /* NameConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EBF2F91560F036008E9222 /* NameConstructor.cpp */; }; >+ 86EBF3001560F06A008E9222 /* NameConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EBF2FA1560F036008E9222 /* NameConstructor.h */; }; >+ 86EBF3011560F06A008E9222 /* NameInstance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EBF2FB1560F036008E9222 /* NameInstance.cpp */; }; >+ 86EBF3021560F06A008E9222 /* NameInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EBF2FC1560F036008E9222 /* NameInstance.h */; }; >+ 86EBF3031560F06A008E9222 /* NamePrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EBF2FD1560F036008E9222 /* NamePrototype.cpp */; }; >+ 86EBF3041560F06A008E9222 /* NamePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EBF2FE1560F036008E9222 /* NamePrototype.h */; }; > 86EC9DC41328DF82002B2AD7 /* DFGByteCodeParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */; }; > 86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -2620,14 +2618,6 @@ > 65FB5116184EE9BC00C12B70 /* ProtoCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProtoCallFrame.cpp; sourceTree = "<group>"; }; > 6AD2CB4C19B9140100065719 /* DebuggerEvalEnabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerEvalEnabler.h; sourceTree = "<group>"; }; > 704FD35305697E6D003DBED9 /* BooleanObject.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = BooleanObject.h; sourceTree = "<group>"; tabWidth = 8; }; >- 705B41A31A6E501E00716757 /* Symbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Symbol.cpp; sourceTree = "<group>"; }; >- 705B41A41A6E501E00716757 /* Symbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Symbol.h; sourceTree = "<group>"; }; >- 705B41A51A6E501E00716757 /* SymbolConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolConstructor.cpp; sourceTree = "<group>"; }; >- 705B41A61A6E501E00716757 /* SymbolConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolConstructor.h; sourceTree = "<group>"; }; >- 705B41A71A6E501E00716757 /* SymbolObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolObject.cpp; sourceTree = "<group>"; }; >- 705B41A81A6E501E00716757 /* SymbolObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolObject.h; sourceTree = "<group>"; }; >- 705B41A91A6E501E00716757 /* SymbolPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolPrototype.cpp; sourceTree = "<group>"; }; >- 705B41AA1A6E501E00716757 /* SymbolPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolPrototype.h; sourceTree = "<group>"; }; > 7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSPromiseFunctions.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; > 7C008CD1186F8A9300955C24 /* JSPromiseFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromiseFunctions.h; sourceTree = "<group>"; }; > 7C008CD8187124BB00955C24 /* JSPromiseDeferred.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseDeferred.cpp; sourceTree = "<group>"; }; >@@ -2725,6 +2715,12 @@ > 86E3C610167BAB87006D760A /* JSVirtualMachine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSVirtualMachine.mm; sourceTree = "<group>"; }; > 86E3C611167BAB87006D760A /* JSVirtualMachineInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVirtualMachineInternal.h; sourceTree = "<group>"; }; > 86E85538111B9968001AF51E /* JSStringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringBuilder.h; sourceTree = "<group>"; }; >+ 86EBF2F91560F036008E9222 /* NameConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NameConstructor.cpp; sourceTree = "<group>"; }; >+ 86EBF2FA1560F036008E9222 /* NameConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NameConstructor.h; sourceTree = "<group>"; }; >+ 86EBF2FB1560F036008E9222 /* NameInstance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NameInstance.cpp; sourceTree = "<group>"; }; >+ 86EBF2FC1560F036008E9222 /* NameInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NameInstance.h; sourceTree = "<group>"; }; >+ 86EBF2FD1560F036008E9222 /* NamePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NamePrototype.cpp; sourceTree = "<group>"; }; >+ 86EBF2FE1560F036008E9222 /* NamePrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamePrototype.h; sourceTree = "<group>"; }; > 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGByteCodeParser.cpp; path = dfg/DFGByteCodeParser.cpp; sourceTree = "<group>"; }; > 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGByteCodeParser.h; path = dfg/DFGByteCodeParser.h; sourceTree = "<group>"; }; > 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGGenerationInfo.h; path = dfg/DFGGenerationInfo.h; sourceTree = "<group>"; }; >@@ -4478,6 +4474,12 @@ > 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */, > 90213E3C123A40C200D422F3 /* MemoryStatistics.h */, > 7C008CE5187631B600955C24 /* Microtask.h */, >+ 86EBF2F91560F036008E9222 /* NameConstructor.cpp */, >+ 86EBF2FA1560F036008E9222 /* NameConstructor.h */, >+ 86EBF2FB1560F036008E9222 /* NameInstance.cpp */, >+ 86EBF2FC1560F036008E9222 /* NameInstance.h */, >+ 86EBF2FD1560F036008E9222 /* NamePrototype.cpp */, >+ 86EBF2FE1560F036008E9222 /* NamePrototype.h */, > BC02E9080E1839DB000F9297 /* NativeErrorConstructor.cpp */, > BC02E9090E1839DB000F9297 /* NativeErrorConstructor.h */, > BC02E90A0E1839DB000F9297 /* NativeErrorPrototype.cpp */, >@@ -4575,14 +4577,6 @@ > C2FE18A316BAEC4000AF3061 /* StructureRareData.h */, > C20BA92C16BB1C1500B3AEA2 /* StructureRareDataInlines.h */, > BC9041470EB9250900FE26FA /* StructureTransitionTable.h */, >- 705B41A31A6E501E00716757 /* Symbol.cpp */, >- 705B41A41A6E501E00716757 /* Symbol.h */, >- 705B41A51A6E501E00716757 /* SymbolConstructor.cpp */, >- 705B41A61A6E501E00716757 /* SymbolConstructor.h */, >- 705B41A71A6E501E00716757 /* SymbolObject.cpp */, >- 705B41A81A6E501E00716757 /* SymbolObject.h */, >- 705B41A91A6E501E00716757 /* SymbolPrototype.cpp */, >- 705B41AA1A6E501E00716757 /* SymbolPrototype.h */, > 0F919D2715856770004A4E7D /* SymbolTable.cpp */, > 14A396A60CD2933100B5B4FF /* SymbolTable.h */, > 0FA2C17917D7CF84009D015F /* TestRunnerUtils.cpp */, >@@ -6092,6 +6086,9 @@ > 0F3D0BBD194A414300FC9CF9 /* ConstantStructureCheck.h in Headers */, > 7C008CE7187631B600955C24 /* Microtask.h in Headers */, > 86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */, >+ 86EBF3001560F06A008E9222 /* NameConstructor.h in Headers */, >+ 86EBF3021560F06A008E9222 /* NameInstance.h in Headers */, >+ 86EBF3041560F06A008E9222 /* NamePrototype.h in Headers */, > BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */, > BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */, > 99CC0B6318BE9950006CEBCC /* CodeGeneratorReplayInputs.py in Headers */, >@@ -6251,10 +6248,6 @@ > BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */, > BC9041480EB9250900FE26FA /* StructureTransitionTable.h in Headers */, > C2DF44301707AC0100A5CA96 /* SuperRegion.h in Headers */, >- 705B41AC1A6E501E00716757 /* Symbol.h in Headers */, >- 705B41AE1A6E501E00716757 /* SymbolConstructor.h in Headers */, >- 705B41B01A6E501E00716757 /* SymbolObject.h in Headers */, >- 705B41B21A6E501E00716757 /* SymbolPrototype.h in Headers */, > BC18C46B0E16F5CD00B34460 /* SymbolTable.h in Headers */, > A784A26411D16622005776AC /* SyntaxChecker.h in Headers */, > 0F24E54F17EE274900ABB217 /* TempRegisterSet.h in Headers */, >@@ -7227,6 +7220,9 @@ > 14469DDF107EC7E700650446 /* MathObject.cpp in Sources */, > 90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */, > 0FB5467D14F5CFD6002C2989 /* MethodOfGettingAValueProfile.cpp in Sources */, >+ 86EBF2FF1560F06A008E9222 /* NameConstructor.cpp in Sources */, >+ 86EBF3011560F06A008E9222 /* NameInstance.cpp in Sources */, >+ 86EBF3031560F06A008E9222 /* NamePrototype.cpp in Sources */, > 14469DE0107EC7E700650446 /* NativeErrorConstructor.cpp in Sources */, > 14469DE1107EC7E700650446 /* NativeErrorPrototype.cpp in Sources */, > 148F21B7107EC5470042EC2C /* Nodes.cpp in Sources */, >@@ -7328,10 +7324,6 @@ > 0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */, > BCCF0D0C0EF0B8A500413C8F /* StructureStubInfo.cpp in Sources */, > C2DF442F1707AC0100A5CA96 /* SuperRegion.cpp in Sources */, >- 705B41AB1A6E501E00716757 /* Symbol.cpp in Sources */, >- 705B41AD1A6E501E00716757 /* SymbolConstructor.cpp in Sources */, >- 705B41AF1A6E501E00716757 /* SymbolObject.cpp in Sources */, >- 705B41B11A6E501E00716757 /* SymbolPrototype.cpp in Sources */, > 0F919D2815856773004A4E7D /* SymbolTable.cpp in Sources */, > 0FC314131814559100033232 /* TempRegisterSet.cpp in Sources */, > 0FA2C17B17D7CF84009D015F /* TestRunnerUtils.cpp in Sources */, >diff --git a/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp b/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp >index 9fcdaa1e38dc6575bb791399a8e3aadc01913328..ef6737ee2c7e775bffd056a512dc3c23b0e885ed 100644 >--- a/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp >+++ b/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp >@@ -75,7 +75,7 @@ UnlinkedFunctionExecutable* BuiltinExecutables::createBuiltinExecutable(const So > > if (closedVariable == m_vm.propertyNames->undefinedKeyword.impl()) > continue; >- RELEASE_ASSERT(closedVariable->isUnique()); >+ RELEASE_ASSERT(closedVariable->isEmptyUnique()); > } > body->overrideName(name); > UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&m_vm, source, body, UnlinkedBuiltinFunction); >diff --git a/Source/JavaScriptCore/builtins/BuiltinNames.h b/Source/JavaScriptCore/builtins/BuiltinNames.h >index 9b8896b968014913f46b32c480e057896379dfa4..67e1f563bca018d03209cf81052623601ba4405b 100644 >--- a/Source/JavaScriptCore/builtins/BuiltinNames.h >+++ b/Source/JavaScriptCore/builtins/BuiltinNames.h >@@ -31,7 +31,7 @@ > > namespace JSC { > >-#define INITIALISE_BUILTIN_NAMES(name) , m_##name(vm, #name), m_##name##PrivateName(Identifier::from(PrivateName(ASCIILiteral("Symbol." #name)))) >+#define INITIALISE_BUILTIN_NAMES(name) , m_##name(vm, #name), m_##name##PrivateName(Identifier::from(PrivateName())) > #define DECLARE_BUILTIN_NAMES(name) const Identifier m_##name; const Identifier m_##name##PrivateName;; > #define DECLARE_BUILTIN_IDENTIFIER_ACCESSOR(name) \ > const Identifier& name##PublicName() const { return m_##name; } \ >diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp >index 9c46fc976d314916187554ed450f9425a0199b75..dba62e1c9fffd4404c04d08537f49a1b9bb062e8 100644 >--- a/Source/JavaScriptCore/dfg/DFGOperations.cpp >+++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp >@@ -48,11 +48,11 @@ > #include "JSLexicalEnvironment.h" > #include "VM.h" > #include "JSNameScope.h" >+#include "NameInstance.h" > #include "ObjectConstructor.h" > #include "JSCInlines.h" > #include "Repatch.h" > #include "StringConstructor.h" >-#include "Symbol.h" > #include "TypeProfilerLog.h" > #include "TypedArrayInlines.h" > #include <wtf/InlineASM.h> >@@ -110,15 +110,25 @@ ALWAYS_INLINE static void JIT_OPERATION operationPutByValInternal(ExecState* exe > } > } > >+ if (isName(property)) { >+ PutPropertySlot slot(baseValue, strict); >+ if (direct) { >+ RELEASE_ASSERT(baseValue.isObject()); >+ asObject(baseValue)->putDirect(*vm, jsCast<NameInstance*>(property.asCell())->privateName(), value, slot); >+ } else >+ baseValue.put(exec, jsCast<NameInstance*>(property.asCell())->privateName(), value, slot); >+ return; >+ } >+ > // Don't put to an object if toString throws an exception. >- PropertyName propertyName = property.toPropertyKey(exec); >+ Identifier ident = property.toString(exec)->toIdentifier(exec); > if (!vm->exception()) { > PutPropertySlot slot(baseValue, strict); > if (direct) { > RELEASE_ASSERT(baseValue.isObject()); >- asObject(baseValue)->putDirect(*vm, propertyName, value, slot); >+ asObject(baseValue)->putDirect(*vm, ident, value, slot); > } else >- baseValue.put(exec, propertyName, value, slot); >+ baseValue.put(exec, ident, value, slot); > } > } > >@@ -296,8 +306,11 @@ EncodedJSValue JIT_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue e > } > } > >- PropertyName propertyName = property.toPropertyKey(exec); >- return JSValue::encode(baseValue.get(exec, propertyName)); >+ if (isName(property)) >+ return JSValue::encode(baseValue.get(exec, jsCast<NameInstance*>(property.asCell())->privateName())); >+ >+ Identifier ident = property.toString(exec)->toIdentifier(exec); >+ return JSValue::encode(baseValue.get(exec, ident)); > } > > EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base, EncodedJSValue encodedProperty) >@@ -324,8 +337,11 @@ EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base > } > } > >- PropertyName propertyName = property.toPropertyKey(exec); >- return JSValue::encode(JSValue(base).get(exec, propertyName)); >+ if (isName(property)) >+ return JSValue::encode(JSValue(base).get(exec, jsCast<NameInstance*>(property.asCell())->privateName())); >+ >+ Identifier ident = property.toString(exec)->toIdentifier(exec); >+ return JSValue::encode(JSValue(base).get(exec, ident)); > } > > ALWAYS_INLINE EncodedJSValue getByValCellInt(ExecState* exec, JSCell* base, int32_t index) >diff --git a/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp b/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp >index 5b3d3e6d3e155effabea3369d98b5e7d00f7d64c..f26b406a6f995478417fcf4ec52a7152a8cd8e1e 100644 >--- a/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp >+++ b/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp >@@ -126,8 +126,6 @@ JSValue JSInjectedScriptHost::subtype(ExecState* exec) > return exec->vm().smallStrings.booleanString(); > if (value.isNumber()) > return exec->vm().smallStrings.numberString(); >- if (value.isSymbol()) >- return exec->vm().smallStrings.symbolString(); > > JSObject* object = asObject(value); > if (object && object->isErrorInstance()) >diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp >index febd0205398c0a42f954d049266939ac0b1843cc..ae762c0f95f63b8a0d366c785038b818eccc3b20 100644 >--- a/Source/JavaScriptCore/interpreter/Interpreter.cpp >+++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp >@@ -54,6 +54,7 @@ > #include "LLIntThunks.h" > #include "LegacyProfiler.h" > #include "LiteralParser.h" >+#include "NameInstance.h" > #include "ObjectPrototype.h" > #include "JSCInlines.h" > #include "Parser.h" >@@ -66,7 +67,6 @@ > #include "StackVisitor.h" > #include "StrictEvalActivation.h" > #include "StrongInlines.h" >-#include "Symbol.h" > #include "VMEntryScope.h" > #include "VirtualRegister.h" > >diff --git a/Source/JavaScriptCore/jit/JITOperations.cpp b/Source/JavaScriptCore/jit/JITOperations.cpp >index 9b797c87ff0463303b35aa9ea096dfae8f0e03bd..4a200d11c0266d777d6a2476c9c95635f69c5757 100644 >--- a/Source/JavaScriptCore/jit/JITOperations.cpp >+++ b/Source/JavaScriptCore/jit/JITOperations.cpp >@@ -159,7 +159,7 @@ EncodedJSValue JIT_OPERATION operationGetByIdOptimize(ExecState* exec, Structure > { > VM* vm = &exec->vm(); > NativeCallFrameTracer tracer(vm, exec); >- Identifier ident = uid->isUnique() ? Identifier::from(PrivateName(uid)) : Identifier(vm, uid); >+ Identifier ident = uid->isEmptyUnique() ? Identifier::from(PrivateName(uid)) : Identifier(vm, uid); > > JSValue baseValue = JSValue::decode(base); > PropertySlot slot(baseValue); >@@ -466,8 +466,11 @@ static void putByVal(CallFrame* callFrame, JSValue baseValue, JSValue subscript, > object->methodTable(vm)->putByIndex(object, callFrame, i, value, callFrame->codeBlock()->isStrictMode()); > } else > baseValue.putByIndex(callFrame, i, value, callFrame->codeBlock()->isStrictMode()); >+ } else if (isName(subscript)) { >+ PutPropertySlot slot(baseValue, callFrame->codeBlock()->isStrictMode()); >+ baseValue.put(callFrame, jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot); > } else { >- PropertyName property = subscript.toPropertyKey(callFrame); >+ Identifier property = subscript.toString(callFrame)->toIdentifier(callFrame); > if (!callFrame->vm().exception()) { // Don't put to an object if toString threw an exception. > PutPropertySlot slot(baseValue, callFrame->codeBlock()->isStrictMode()); > baseValue.put(callFrame, property, value, slot); >@@ -480,8 +483,11 @@ static void directPutByVal(CallFrame* callFrame, JSObject* baseObject, JSValue s > if (LIKELY(subscript.isUInt32())) { > uint32_t i = subscript.asUInt32(); > baseObject->putDirectIndex(callFrame, i, value); >+ } else if (isName(subscript)) { >+ PutPropertySlot slot(baseObject, callFrame->codeBlock()->isStrictMode()); >+ baseObject->putDirect(callFrame->vm(), jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot); > } else { >- PropertyName property = subscript.toPropertyKey(callFrame); >+ Identifier property = subscript.toString(callFrame)->toIdentifier(callFrame); > if (!callFrame->vm().exception()) { // Don't put to an object if toString threw an exception. > PutPropertySlot slot(baseObject, callFrame->codeBlock()->isStrictMode()); > baseObject->putDirect(callFrame->vm(), property, value, slot); >@@ -1429,7 +1435,10 @@ static JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript, R > return baseValue.get(exec, i); > } > >- PropertyName property = subscript.toPropertyKey(exec); >+ if (isName(subscript)) >+ return baseValue.get(exec, jsCast<NameInstance*>(subscript.asCell())->privateName()); >+ >+ Identifier property = subscript.toString(exec)->toIdentifier(exec); > return baseValue.get(exec, property); > } > >@@ -1564,8 +1573,10 @@ EncodedJSValue JIT_OPERATION operationGetByValString(ExecState* exec, EncodedJSV > if (!isJSString(baseValue)) > ctiPatchCallByReturnAddress(exec->codeBlock(), ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationGetByValDefault)); > } >- } else { >- PropertyName property = subscript.toPropertyKey(exec); >+ } else if (isName(subscript)) >+ result = baseValue.get(exec, jsCast<NameInstance*>(subscript.asCell())->privateName()); >+ else { >+ Identifier property = subscript.toString(exec)->toIdentifier(exec); > result = baseValue.get(exec, property); > } > >diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp >index ab01501b12917d9ee80ed31523f9258dc442da2e..997e3b98ff97f8684d07a117b7714fb10e96f541 100644 >--- a/Source/JavaScriptCore/llint/LLIntData.cpp >+++ b/Source/JavaScriptCore/llint/LLIntData.cpp >@@ -132,8 +132,8 @@ void Data::performAssertions(VM& vm) > ASSERT(maxFrameExtentForSlowPathCall == 64); > #endif > ASSERT(StringType == 6); >- ASSERT(ObjectType == 18); >- ASSERT(FinalObjectType == 19); >+ ASSERT(ObjectType == 17); >+ ASSERT(FinalObjectType == 18); > ASSERT(MasqueradesAsUndefined == 1); > ASSERT(ImplementsHasInstance == 2); > ASSERT(ImplementsDefaultHasInstance == 8); >diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >index 83345a585e9f7f8c6886c0983d441dd308e021ff..40d68ba78e94d85734efd8297a5c0ace45742001 100644 >--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >@@ -745,7 +745,10 @@ inline JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript) > return baseValue.get(exec, i); > } > >- PropertyName property = subscript.toPropertyKey(exec); >+ if (isName(subscript)) >+ return baseValue.get(exec, jsCast<NameInstance*>(subscript.asCell())->privateName()); >+ >+ Identifier property = subscript.toString(exec)->toIdentifier(exec); > return baseValue.get(exec, property); > } > >@@ -795,7 +798,13 @@ inline JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript) > LLINT_END(); > } > >- PropertyName property = subscript.toPropertyKey(exec); >+ if (isName(subscript)) { >+ PutPropertySlot slot(baseValue, exec->codeBlock()->isStrictMode()); >+ baseValue.put(exec, jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot); >+ LLINT_END(); >+ } >+ >+ Identifier property = subscript.toString(exec)->toIdentifier(exec); > LLINT_CHECK_EXCEPTION(); > PutPropertySlot slot(baseValue, exec->codeBlock()->isStrictMode()); > baseValue.put(exec, property, value, slot); >@@ -814,8 +823,11 @@ inline JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript) > if (LIKELY(subscript.isUInt32())) { > uint32_t i = subscript.asUInt32(); > baseObject->putDirectIndex(exec, i, value); >+ } else if (isName(subscript)) { >+ PutPropertySlot slot(baseObject, exec->codeBlock()->isStrictMode()); >+ baseObject->putDirect(exec->vm(), jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot); > } else { >- PropertyName property = subscript.toPropertyKey(exec); >+ Identifier property = subscript.toString(exec)->toIdentifier(exec); > if (!exec->vm().exception()) { // Don't put to an object if toString threw an exception. > PutPropertySlot slot(baseObject, exec->codeBlock()->isStrictMode()); > baseObject->putDirect(exec->vm(), property, value, slot); >@@ -837,9 +849,11 @@ inline JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript) > uint32_t i; > if (subscript.getUInt32(i)) > couldDelete = baseObject->methodTable()->deletePropertyByIndex(baseObject, exec, i); >+ else if (isName(subscript)) >+ couldDelete = baseObject->methodTable()->deleteProperty(baseObject, exec, jsCast<NameInstance*>(subscript.asCell())->privateName()); > else { > LLINT_CHECK_EXCEPTION(); >- PropertyName property = subscript.toPropertyKey(exec); >+ Identifier property = subscript.toString(exec)->toIdentifier(exec); > LLINT_CHECK_EXCEPTION(); > couldDelete = baseObject->methodTable()->deleteProperty(baseObject, exec, property); > } >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm >index b7bdc03ee531035306587549472ea2389f9d1e83..1a8dac0e41048e82ce427eaec9b3c874e320f90b 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm >@@ -156,8 +156,8 @@ const SlowPutArrayStorageShape = 30 > > # Type constants. > const StringType = 6 >-const ObjectType = 18 >-const FinalObjectType = 19 >+const ObjectType = 17 >+const FinalObjectType = 18 > > # Type flags constants. > const MasqueradesAsUndefined = 1 >diff --git a/Source/JavaScriptCore/runtime/CommonIdentifiers.h b/Source/JavaScriptCore/runtime/CommonIdentifiers.h >index f111773f105574981e96877c4793e4e95adb5858..fca1eae699a5547564438f19c7887996016835e7 100644 >--- a/Source/JavaScriptCore/runtime/CommonIdentifiers.h >+++ b/Source/JavaScriptCore/runtime/CommonIdentifiers.h >@@ -52,7 +52,6 @@ > macro(Set)\ > macro(SetIterator)\ > macro(String) \ >- macro(Symbol) \ > macro(SyntaxError) \ > macro(TypeError) \ > macro(URIError) \ >@@ -220,21 +219,8 @@ > macro(with) \ > macro(yield) > >-#define JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(macro) \ >- macro(hasInstance) \ >- macro(isConcatSpreadable) \ >- macro(iterator) \ >- macro(match) \ >- macro(replace) \ >- macro(search) \ >- macro(species) \ >- macro(split) \ >- macro(toPrimitive) \ >- macro(toStringTag) \ >- macro(unscopable) >- > #define JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \ >- JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(macro) \ >+ macro(iterator) \ > macro(iteratorNext) \ > macro(resolve) \ > macro(reject) \ >diff --git a/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp b/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp >index dfb94121690dc37e6015654bebad7404d1c363d7..08091a87e09d1f1ee98f4c0cc6b27bf50db15434 100644 >--- a/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp >+++ b/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp >@@ -486,9 +486,11 @@ static CommonSlowPaths::ArityCheckData* setupArityCheckData(VM& vm, int slotsToA > uint32_t i; > if (subscript.getUInt32(i)) > couldDelete = baseObject->methodTable()->deletePropertyByIndex(baseObject, exec, i); >+ else if (isName(subscript)) >+ couldDelete = baseObject->methodTable()->deleteProperty(baseObject, exec, jsCast<NameInstance*>(subscript.asCell())->privateName()); > else { > CHECK_EXCEPTION(); >- PropertyName property = subscript.toPropertyKey(exec); >+ Identifier property = subscript.toString(exec)->toIdentifier(exec); > CHECK_EXCEPTION(); > couldDelete = baseObject->methodTable()->deleteProperty(baseObject, exec, property); > } >@@ -573,7 +575,7 @@ static CommonSlowPaths::ArityCheckData* setupArityCheckData(VM& vm, int slotsToA > JSValue baseValue = OP_C(2).jsValue(); > JSValue property = OP(3).jsValue(); > ASSERT(property.isString()); >- RETURN(baseValue.get(exec, property.toPropertyKey(exec))); >+ RETURN(baseValue.get(exec, property.toString(exec)->toIdentifier(exec))); > } > > SLOW_PATH_DECL(slow_path_get_structure_property_enumerator) >diff --git a/Source/JavaScriptCore/runtime/CommonSlowPaths.h b/Source/JavaScriptCore/runtime/CommonSlowPaths.h >index bfe483df6f98bf15c7df506e14f27fafd36a75a6..a56358cd6e0977743e87b3c165e2cea1aa47eda6 100644 >--- a/Source/JavaScriptCore/runtime/CommonSlowPaths.h >+++ b/Source/JavaScriptCore/runtime/CommonSlowPaths.h >@@ -30,8 +30,8 @@ > #include "CodeSpecializationKind.h" > #include "ExceptionHelpers.h" > #include "JSStackInlines.h" >+#include "NameInstance.h" > #include "StackAlignment.h" >-#include "Symbol.h" > #include "VM.h" > #include <wtf/StdLibExtras.h> > >@@ -82,7 +82,10 @@ inline bool opIn(ExecState* exec, JSValue propName, JSValue baseVal) > if (propName.getUInt32(i)) > return baseObj->hasProperty(exec, i); > >- PropertyName property = propName.toPropertyKey(exec); >+ if (isName(propName)) >+ return baseObj->hasProperty(exec, jsCast<NameInstance*>(propName.asCell())->privateName()); >+ >+ Identifier property = propName.toString(exec)->toIdentifier(exec); > if (exec->vm().exception()) > return false; > return baseObj->hasProperty(exec, property); >diff --git a/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp b/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp >index 105aaef7f09aae152b85f3208b14bbf90a1f5ac3..5555395f32732582647bc9e57c62f0660da62ea3 100644 >--- a/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp >+++ b/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp >@@ -82,7 +82,7 @@ JSObject* createStackOverflowError(JSGlobalObject* globalObject) > JSObject* createUndefinedVariableError(ExecState* exec, const Identifier& ident) > { > >- if (ident.impl()->isUnique()) { >+ if (ident.impl()->isEmptyUnique()) { > String message(makeString("Can't find private variable: @", exec->propertyNames().getPublicName(ident).string())); > return createReferenceError(exec, message); > } >diff --git a/Source/JavaScriptCore/runtime/JSCJSValue.cpp b/Source/JavaScriptCore/runtime/JSCJSValue.cpp >index 48756ba3b33f6cde8904e01f7f7b0934dd3e0ad7..c233f4c70021cd78532859e15b0cb63076c9e95a 100644 >--- a/Source/JavaScriptCore/runtime/JSCJSValue.cpp >+++ b/Source/JavaScriptCore/runtime/JSCJSValue.cpp >@@ -99,10 +99,8 @@ JSValue JSValue::toThisSlowCase(ExecState* exec, ECMAMode ecmaMode) const > JSObject* JSValue::synthesizePrototype(ExecState* exec) const > { > if (isCell()) { >- if (isString()) >- return exec->lexicalGlobalObject()->stringPrototype(); >- ASSERT(isSymbol()); >- return exec->lexicalGlobalObject()->symbolPrototype(); >+ ASSERT(isString()); >+ return exec->lexicalGlobalObject()->stringPrototype(); > } > > if (isNumber()) >@@ -233,7 +231,7 @@ void JSValue::dumpInContextAssumingStructure( > out.print(" (atomic)"); > if (impl->isAtomic()) > out.print(" (identifier)"); >- if (impl->isUnique()) >+ if (impl->isEmptyUnique()) > out.print(" (unique)"); > } else > out.print(" (unresolved)"); >@@ -366,10 +364,6 @@ JSString* JSValue::toStringSlowCase(ExecState* exec) const > return vm.smallStrings.nullString(); > if (isUndefined()) > return vm.smallStrings.undefinedString(); >- if (isSymbol()) { >- throwTypeError(exec); >- return jsEmptyString(exec); >- } > > ASSERT(isCell()); > JSValue value = asCell()->toPrimitive(exec, PreferString); >diff --git a/Source/JavaScriptCore/runtime/JSCJSValue.h b/Source/JavaScriptCore/runtime/JSCJSValue.h >index acab3fa6240a1112aa10e2931e6fdc115a03bdf1..c00cb5712d7c1c35fe2a882b579f02a2a68ae17c 100644 >--- a/Source/JavaScriptCore/runtime/JSCJSValue.h >+++ b/Source/JavaScriptCore/runtime/JSCJSValue.h >@@ -217,7 +217,6 @@ class JSValue { > bool isMachineInt() const; > bool isNumber() const; > bool isString() const; >- bool isSymbol() const; > bool isPrimitive() const; > bool isGetterSetter() const; > bool isCustomGetterSetter() const; >@@ -243,7 +242,6 @@ class JSValue { > // been set in the ExecState already. > double toNumber(ExecState*) const; > JSString* toString(ExecState*) const; >- PropertyName toPropertyKey(ExecState*) const; > WTF::String toWTFString(ExecState*) const; > WTF::String toWTFStringInline(ExecState*) const; > JSObject* toObject(ExecState*) const; >diff --git a/Source/JavaScriptCore/runtime/JSCJSValueInlines.h b/Source/JavaScriptCore/runtime/JSCJSValueInlines.h >index d876dbe109e30f75245d8342ac7aa7fd4f04e842..1510b4185274e8a27e1d3bdf4ef8d8c713fa0ae8 100644 >--- a/Source/JavaScriptCore/runtime/JSCJSValueInlines.h >+++ b/Source/JavaScriptCore/runtime/JSCJSValueInlines.h >@@ -26,7 +26,6 @@ > #ifndef JSValueInlines_h > #define JSValueInlines_h > >-#include "Identifier.h" > #include "InternalFunction.h" > #include "JSCJSValue.h" > #include "JSCellInlines.h" >@@ -550,14 +549,9 @@ inline bool JSValue::isString() const > return isCell() && asCell()->isString(); > } > >-inline bool JSValue::isSymbol() const >-{ >- return isCell() && asCell()->isSymbol(); >-} >- > inline bool JSValue::isPrimitive() const > { >- return !isCell() || asCell()->isString() || asCell()->isSymbol(); >+ return !isCell() || asCell()->isString(); > } > > inline bool JSValue::isGetterSetter() const >@@ -610,17 +604,6 @@ ALWAYS_INLINE bool JSValue::getUInt32(uint32_t& v) const > return false; > } > >-ALWAYS_INLINE PropertyName JSValue::toPropertyKey(ExecState* exec) const >-{ >- if (isString()) >- return asString(*this)->toIdentifier(exec); >- >- JSValue primitive = toPrimitive(exec, PreferString); >- if (primitive.isSymbol()) >- return asSymbol(primitive)->privateName(); >- return primitive.toString(exec)->toIdentifier(exec); >-} >- > inline JSValue JSValue::toPrimitive(ExecState* exec, PreferredPrimitiveType preferredType) const > { > return isCell() ? asCell()->toPrimitive(exec, preferredType) : asValue(); >@@ -709,7 +692,7 @@ ALWAYS_INLINE bool JSValue::getPropertySlot(ExecState* exec, PropertyName proper > // and if it's a string there are special properties to check first. > JSObject* object; > if (UNLIKELY(!isObject())) { >- if (isString() && asString(*this)->getStringPropertySlot(exec, propertyName, slot)) >+ if (isCell() && asString(*this)->getStringPropertySlot(exec, propertyName, slot)) > return true; > object = synthesizePrototype(exec); > } else >@@ -730,7 +713,7 @@ ALWAYS_INLINE JSValue JSValue::get(ExecState* exec, unsigned propertyName, Prope > // and if it's a string there are special properties to check first. > JSObject* object; > if (UNLIKELY(!isObject())) { >- if (isString() && asString(*this)->getStringPropertySlot(exec, propertyName, slot)) >+ if (isCell() && asString(*this)->getStringPropertySlot(exec, propertyName, slot)) > return slot.getValue(exec, propertyName); > object = synthesizePrototype(exec); > } else >@@ -823,14 +806,6 @@ ALWAYS_INLINE bool JSValue::equalSlowCaseInline(ExecState* exec, JSValue v1, JSV > continue; > } > >- bool sym1 = v1.isSymbol(); >- bool sym2 = v2.isSymbol(); >- if (sym1 || sym2) { >- if (sym1 && sym2) >- return asSymbol(v1)->privateName() == asSymbol(v2)->privateName(); >- return false; >- } >- > if (s1 || s2) { > double d1 = v1.toNumber(exec); > double d2 = v2.toNumber(exec); >@@ -856,8 +831,6 @@ ALWAYS_INLINE bool JSValue::strictEqualSlowCaseInline(ExecState* exec, JSValue v > > if (v1.asCell()->isString() && v2.asCell()->isString()) > return WTF::equal(*asString(v1)->value(exec).impl(), *asString(v2)->value(exec).impl()); >- if (v1.asCell()->isSymbol() && v2.asCell()->isSymbol()) >- return asSymbol(v1)->privateName() == asSymbol(v2)->privateName(); > > return v1 == v2; > } >diff --git a/Source/JavaScriptCore/runtime/JSCell.cpp b/Source/JavaScriptCore/runtime/JSCell.cpp >index 2c403c813fb38568b0e60ce78989ddea4c953c12..694081db5f17784a54a48e085bad6e13d89f09c8 100644 >--- a/Source/JavaScriptCore/runtime/JSCell.cpp >+++ b/Source/JavaScriptCore/runtime/JSCell.cpp >@@ -96,7 +96,7 @@ ConstructType JSCell::getConstructData(JSCell*, ConstructData& constructData) > > void JSCell::put(JSCell* cell, ExecState* exec, PropertyName identifier, JSValue value, PutPropertySlot& slot) > { >- if (cell->isString() || cell->isSymbol()) { >+ if (cell->isString()) { > JSValue(cell).putToPrimitive(exec, identifier, value, slot); > return; > } >@@ -106,7 +106,7 @@ void JSCell::put(JSCell* cell, ExecState* exec, PropertyName identifier, JSValue > > void JSCell::putByIndex(JSCell* cell, ExecState* exec, unsigned identifier, JSValue value, bool shouldThrow) > { >- if (cell->isString() || cell->isSymbol()) { >+ if (cell->isString()) { > PutPropertySlot slot(cell, shouldThrow); > JSValue(cell).putToPrimitive(exec, Identifier::from(exec, identifier), value, slot); > return; >@@ -138,8 +138,6 @@ JSValue JSCell::toPrimitive(ExecState* exec, PreferredPrimitiveType preferredTyp > { > if (isString()) > return static_cast<const JSString*>(this)->toPrimitive(exec, preferredType); >- if (isSymbol()) >- return static_cast<const Symbol*>(this)->toPrimitive(exec, preferredType); > return static_cast<const JSObject*>(this)->toPrimitive(exec, preferredType); > } > >@@ -147,8 +145,6 @@ bool JSCell::getPrimitiveNumber(ExecState* exec, double& number, JSValue& value) > { > if (isString()) > return static_cast<const JSString*>(this)->getPrimitiveNumber(exec, number, value); >- if (isSymbol()) >- return static_cast<const Symbol*>(this)->getPrimitiveNumber(exec, number, value); > return static_cast<const JSObject*>(this)->getPrimitiveNumber(exec, number, value); > } > >@@ -156,8 +152,6 @@ double JSCell::toNumber(ExecState* exec) const > { > if (isString()) > return static_cast<const JSString*>(this)->toNumber(exec); >- if (isSymbol()) >- return static_cast<const Symbol*>(this)->toNumber(exec); > return static_cast<const JSObject*>(this)->toNumber(exec); > } > >@@ -165,8 +159,6 @@ JSObject* JSCell::toObject(ExecState* exec, JSGlobalObject* globalObject) const > { > if (isString()) > return static_cast<const JSString*>(this)->toObject(exec, globalObject); >- if (isSymbol()) >- return static_cast<const Symbol*>(this)->toObject(exec, globalObject); > ASSERT(isObject()); > return jsCast<JSObject*>(const_cast<JSCell*>(this)); > } >diff --git a/Source/JavaScriptCore/runtime/JSCell.h b/Source/JavaScriptCore/runtime/JSCell.h >index 4839f64fa1a820eeacb709f98c30b7af7c4e8194..f57a5c87995ca4c332e28a3657205a2d5c5e101e 100644 >--- a/Source/JavaScriptCore/runtime/JSCell.h >+++ b/Source/JavaScriptCore/runtime/JSCell.h >@@ -85,7 +85,6 @@ class JSCell { > public: > // Querying the type. > bool isString() const; >- bool isSymbol() const; > bool isObject() const; > bool isGetterSetter() const; > bool isCustomGetterSetter() const; >diff --git a/Source/JavaScriptCore/runtime/JSCellInlines.h b/Source/JavaScriptCore/runtime/JSCellInlines.h >index b2fa4066bd2b50838f79b1ef6cad55b24ac6b7ed..151ae77adbd9003d974c0376fb6e2080d54cb75e 100644 >--- a/Source/JavaScriptCore/runtime/JSCellInlines.h >+++ b/Source/JavaScriptCore/runtime/JSCellInlines.h >@@ -35,7 +35,6 @@ > #include "JSString.h" > #include "MarkedBlock.h" > #include "Structure.h" >-#include "Symbol.h" > #include <wtf/CompilationThread.h> > > namespace JSC { >@@ -165,11 +164,6 @@ inline bool JSCell::isString() const > return m_type == StringType; > } > >-inline bool JSCell::isSymbol() const >-{ >- return m_type == SymbolType; >-} >- > inline bool JSCell::isGetterSetter() const > { > return m_type == GetterSetterType; >@@ -253,19 +247,15 @@ inline const ClassInfo* JSCell::classInfo() const > > inline bool JSCell::toBoolean(ExecState* exec) const > { >- if (isString()) >+ if (isString()) > return static_cast<const JSString*>(this)->toBoolean(); >- if (isSymbol()) >- return static_cast<const Symbol*>(this)->toBoolean(); > return !structure()->masqueradesAsUndefined(exec->lexicalGlobalObject()); > } > > inline TriState JSCell::pureToBoolean() const > { >- if (isString()) >+ if (isString()) > return static_cast<const JSString*>(this)->toBoolean() ? TrueTriState : FalseTriState; >- if (isSymbol()) >- return static_cast<const Symbol*>(this)->toBoolean() ? TrueTriState : FalseTriState; > return MixedTriState; > } > >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >index bb75492c5683ac65bbb9979dc0d885ae1c1608d8..db5e6b5dcbd1a55bc478b6578f0683352900707a 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >@@ -95,6 +95,9 @@ > #include "MapPrototype.h" > #include "MathObject.h" > #include "Microtask.h" >+#include "NameConstructor.h" >+#include "NameInstance.h" >+#include "NamePrototype.h" > #include "NativeErrorConstructor.h" > #include "NativeErrorPrototype.h" > #include "NullGetterFunction.h" >@@ -116,9 +119,6 @@ > #include "StrictEvalActivation.h" > #include "StringConstructor.h" > #include "StringPrototype.h" >-#include "Symbol.h" >-#include "SymbolConstructor.h" >-#include "SymbolPrototype.h" > #include "VariableWatchpointSetInlines.h" > #include "WeakMapConstructor.h" > #include "WeakMapPrototype.h" >@@ -437,6 +437,15 @@ void JSGlobalObject::init(VM& vm) > JSConsole* consoleObject = JSConsole::create(vm, m_consoleStructure.get()); > putDirectWithoutTransition(vm, Identifier(exec, "console"), consoleObject, DontEnum); > >+ if (m_experimentsEnabled) { >+ NamePrototype* privateNamePrototype = NamePrototype::create(exec, NamePrototype::createStructure(vm, this, m_objectPrototype.get())); >+ m_privateNameStructure.set(vm, this, NameInstance::createStructure(vm, this, privateNamePrototype)); >+ >+ JSCell* privateNameConstructor = NameConstructor::create(vm, NameConstructor::createStructure(vm, this, m_functionPrototype.get()), privateNamePrototype); >+ privateNamePrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, privateNameConstructor, DontEnum); >+ putDirectWithoutTransition(vm, Identifier(exec, "Name"), privateNameConstructor, DontEnum); >+ } >+ > resetPrototype(vm, prototype()); > } > >@@ -699,7 +708,7 @@ void JSGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor) > visitor.append(&thisObject->m_functionStructure); > visitor.append(&thisObject->m_boundFunctionStructure); > visitor.append(&thisObject->m_namedFunctionStructure); >- visitor.append(&thisObject->m_symbolObjectStructure); >+ visitor.append(&thisObject->m_privateNameStructure); > visitor.append(&thisObject->m_regExpMatchesArrayStructure); > visitor.append(&thisObject->m_regExpStructure); > visitor.append(&thisObject->m_consoleStructure); >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h >index cac847089ad4e7afc7339338edaef5de15824eb8..b2d9b81c0a1ab9efaba0659f206c6224b6521c81 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.h >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h >@@ -35,7 +35,6 @@ > #include "StringPrototype.h" > #include "StructureChain.h" > #include "StructureRareDataInlines.h" >-#include "SymbolPrototype.h" > #include "VM.h" > #include "Watchpoint.h" > #include <JavaScriptCore/JSBase.h> >@@ -92,7 +91,6 @@ > macro(Map, map, map, JSMap, Map) \ > macro(Date, date, date, DateInstance, Date) \ > macro(String, string, stringObject, StringObject, String) \ >- macro(Symbol, symbol, symbolObject, SymbolObject, Symbol) \ > macro(Boolean, boolean, booleanObject, BooleanObject, Boolean) \ > macro(Number, number, numberObject, NumberObject, Number) \ > macro(Error, error, error, ErrorInstance, Error) \ >@@ -396,7 +394,6 @@ class JSGlobalObject : public JSSegmentedVariableObject { > ArrayPrototype* arrayPrototype() const { return m_arrayPrototype.get(); } > BooleanPrototype* booleanPrototype() const { return m_booleanPrototype.get(); } > StringPrototype* stringPrototype() const { return m_stringPrototype.get(); } >- SymbolPrototype* symbolPrototype() const { return m_symbolPrototype.get(); } > NumberPrototype* numberPrototype() const { return m_numberPrototype.get(); } > DatePrototype* datePrototype() const { return m_datePrototype.get(); } > RegExpPrototype* regExpPrototype() const { return m_regExpPrototype.get(); } >@@ -456,7 +453,6 @@ class JSGlobalObject : public JSSegmentedVariableObject { > Structure* regExpStructure() const { return m_regExpStructure.get(); } > Structure* setStructure() const { return m_setStructure.get(); } > Structure* stringObjectStructure() const { return m_stringObjectStructure.get(); } >- Structure* symbolObjectStructure() const { return m_symbolObjectStructure.get(); } > Structure* iteratorResultStructure() const { return m_iteratorResultStructure.get(); } > static ptrdiff_t iteratorResultStructureOffset() { return OBJECT_OFFSETOF(JSGlobalObject, m_iteratorResultStructure); } > >diff --git a/Source/JavaScriptCore/runtime/JSONObject.cpp b/Source/JavaScriptCore/runtime/JSONObject.cpp >index 990743a558eea887993e227a6ed18e550c23e1a3..4974e882dc88ff2482d5a33d38ea02ac3140ad3b 100644 >--- a/Source/JavaScriptCore/runtime/JSONObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSONObject.cpp >@@ -226,8 +226,7 @@ JSValue PropertyNameForFunctionCall::value(ExecState* exec) const > if (name.isObject()) { > if (!asObject(name)->inherits(NumberObject::info()) && !asObject(name)->inherits(StringObject::info())) > continue; >- } else if (!name.isNumber() && !name.isString()) >- continue; >+ } > > m_arrayReplacerPropertyNames.add(name.toString(exec)->toIdentifier(exec)); > } >diff --git a/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp b/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp >index b8fb2282afae87ecc4110245ce9bb873e950f0ff..38d8b7fb30fa5185d006b645c5fe6d138f052c44 100644 >--- a/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp >@@ -61,7 +61,7 @@ void JSSymbolTableObject::getOwnNonIndexPropertyNames(JSObject* object, ExecStat > ConcurrentJITLocker locker(thisObject->symbolTable()->m_lock); > SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker); > for (SymbolTable::Map::iterator it = thisObject->symbolTable()->begin(locker); it != end; ++it) { >- if (it->key->isUnique()) >+ if (it->key->isEmptyUnique()) > continue; > if (!(it->value.getAttributes() & DontEnum) || shouldIncludeDontEnumProperties(mode)) > propertyNames.add(Identifier(exec, it->key.get())); >diff --git a/Source/JavaScriptCore/runtime/JSType.h b/Source/JavaScriptCore/runtime/JSType.h >index f86b54cf762d29bc3b78f5a247e912ed0688a325..ab14172b0c019fa2c58d67add68e9050a52eae2d 100644 >--- a/Source/JavaScriptCore/runtime/JSType.h >+++ b/Source/JavaScriptCore/runtime/JSType.h >@@ -33,7 +33,6 @@ enum JSType : uint8_t { > // The CellType value must come before any JSType that is a JSCell. > CellType, > StringType, >- SymbolType, > > GetterSetterType, > CustomGetterSetterType, >@@ -53,6 +52,7 @@ enum JSType : uint8_t { > FinalObjectType, > JSCalleeType, > JSFunctionType, >+ NameInstanceType, > NumberObjectType, > ErrorInstanceType, > PureForwardingProxyType, >diff --git a/Source/JavaScriptCore/runtime/JSTypeInfo.h b/Source/JavaScriptCore/runtime/JSTypeInfo.h >index f69596890922e5f426e11e57da2515962a6392d7..49118f34cb8111fc1798796bd4815884a6c7d024 100644 >--- a/Source/JavaScriptCore/runtime/JSTypeInfo.h >+++ b/Source/JavaScriptCore/runtime/JSTypeInfo.h >@@ -77,6 +77,7 @@ class TypeInfo { > static bool isObject(JSType type) { return type >= ObjectType; } > bool isFinalObject() const { return type() == FinalObjectType; } > bool isNumberObject() const { return type() == NumberObjectType; } >+ bool isName() const { return type() == NameInstanceType; } > > unsigned flags() const { return (static_cast<unsigned>(m_flags2) << 8) | static_cast<unsigned>(m_flags); } > bool masqueradesAsUndefined() const { return isSetOnFlags1(MasqueradesAsUndefined); } >diff --git a/Source/JavaScriptCore/runtime/MapData.cpp b/Source/JavaScriptCore/runtime/MapData.cpp >index b05691c852ab2fd2bb3e547a4cdc09de36cb17fe..d7ca294e36db5a844183f4d39890b751cc3b95d6 100644 >--- a/Source/JavaScriptCore/runtime/MapData.cpp >+++ b/Source/JavaScriptCore/runtime/MapData.cpp >@@ -60,12 +60,6 @@ > return 0; > return &m_entries[iter->value]; > } >- if (key.value.isSymbol()) { >- auto iter = m_symbolKeyedTable.find(asSymbol(key.value)->privateName().uid()); >- if (iter == m_symbolKeyedTable.end()) >- return 0; >- return &m_entries[iter->value]; >- } > if (key.value.isCell()) { > auto iter = m_cellKeyedTable.find(key.value.asCell()); > if (iter == m_cellKeyedTable.end()) >@@ -113,8 +107,6 @@ void MapData::set(CallFrame* callFrame, KeyType key, JSValue value) > { > if (key.value.isString()) > return add(callFrame, m_stringKeyedTable, asString(key.value)->value(callFrame).impl(), key); >- if (key.value.isSymbol()) >- return add(callFrame, m_symbolKeyedTable, asSymbol(key.value)->privateName().uid(), key); > if (key.value.isCell()) > return add(callFrame, m_cellKeyedTable, key.value.asCell(), key); > return add(callFrame, m_valueKeyedTable, JSValue::encode(key.value), key); >@@ -136,12 +128,6 @@ bool MapData::remove(CallFrame* callFrame, KeyType key) > return false; > location = iter->value; > m_stringKeyedTable.remove(iter); >- } else if (key.value.isSymbol()) { >- auto iter = m_symbolKeyedTable.find(asSymbol(key.value)->privateName().uid()); >- if (iter == m_symbolKeyedTable.end()) >- return false; >- location = iter->value; >- m_symbolKeyedTable.remove(iter); > } else if (key.value.isCell()) { > auto iter = m_cellKeyedTable.find(key.value.asCell()); > if (iter == m_cellKeyedTable.end()) >@@ -187,8 +173,6 @@ void MapData::replaceAndPackBackingStore(Entry* destination, int32_t newCapacity > ptr->value = m_entries[ptr->value].value.get().asInt32(); > for (auto ptr = m_stringKeyedTable.begin(); ptr != m_stringKeyedTable.end(); ++ptr) > ptr->value = m_entries[ptr->value].value.get().asInt32(); >- for (auto ptr = m_symbolKeyedTable.begin(); ptr != m_symbolKeyedTable.end(); ++ptr) >- ptr->value = m_entries[ptr->value].value.get().asInt32(); > > ASSERT((m_size - newEnd) == m_deletedCount); > m_deletedCount = 0; >diff --git a/Source/JavaScriptCore/runtime/MapData.h b/Source/JavaScriptCore/runtime/MapData.h >index b1d5306296e5046bd4073ee99918ea6fe4fb1945..c0504a67599d262241d789636d017f56d854ee34 100644 >--- a/Source/JavaScriptCore/runtime/MapData.h >+++ b/Source/JavaScriptCore/runtime/MapData.h >@@ -112,7 +112,6 @@ class MapData : public JSCell { > typedef HashMap<JSCell*, int32_t, typename WTF::DefaultHash<JSCell*>::Hash, WTF::HashTraits<JSCell*>, IndexTraits> CellKeyedMap; > typedef HashMap<EncodedJSValue, int32_t, EncodedJSValueHash, EncodedJSValueHashTraits, IndexTraits> ValueKeyedMap; > typedef HashMap<StringImpl*, int32_t, typename WTF::DefaultHash<StringImpl*>::Hash, WTF::HashTraits<StringImpl*>, IndexTraits> StringKeyedMap; >- typedef HashMap<AtomicStringImpl*, int32_t, typename WTF::DefaultHash<AtomicStringImpl*>::Hash, WTF::HashTraits<AtomicStringImpl*>, IndexTraits> SymbolKeyedMap; > > size_t capacityInBytes() { return m_capacity * sizeof(Entry); } > >@@ -135,7 +134,6 @@ class MapData : public JSCell { > CellKeyedMap m_cellKeyedTable; > ValueKeyedMap m_valueKeyedTable; > StringKeyedMap m_stringKeyedTable; >- SymbolKeyedMap m_symbolKeyedTable; > int32_t m_capacity; > int32_t m_size; > int32_t m_deletedCount; >@@ -148,7 +146,6 @@ ALWAYS_INLINE void MapData::clear() > m_cellKeyedTable.clear(); > m_valueKeyedTable.clear(); > m_stringKeyedTable.clear(); >- m_symbolKeyedTable.clear(); > m_capacity = 0; > m_size = 0; > m_deletedCount = 0; >diff --git a/Source/JavaScriptCore/runtime/NameConstructor.cpp b/Source/JavaScriptCore/runtime/NameConstructor.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..e497a96ecc37ada4918c4c03e822b59e4cf23255 >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/NameConstructor.cpp >@@ -0,0 +1,69 @@ >+/* >+ * Copyright (C) 2012 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "NameConstructor.h" >+ >+#include "JSGlobalObject.h" >+#include "NamePrototype.h" >+#include "JSCInlines.h" >+ >+namespace JSC { >+ >+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(NameConstructor); >+ >+const ClassInfo NameConstructor::s_info = { "Function", &Base::s_info, 0, CREATE_METHOD_TABLE(NameConstructor) }; >+ >+NameConstructor::NameConstructor(VM& vm, Structure* structure) >+ : InternalFunction(vm, structure) >+{ >+} >+ >+void NameConstructor::finishCreation(VM& vm, NamePrototype* prototype) >+{ >+ Base::finishCreation(vm, prototype->classInfo()->className); >+ putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly); >+ putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum); >+} >+ >+static EncodedJSValue JSC_HOST_CALL constructPrivateName(ExecState* exec) >+{ >+ JSValue publicName = exec->argument(0); >+ return JSValue::encode(NameInstance::create(exec->vm(), exec->lexicalGlobalObject()->privateNameStructure(), publicName.toString(exec))); >+} >+ >+ConstructType NameConstructor::getConstructData(JSCell*, ConstructData& constructData) >+{ >+ constructData.native.function = constructPrivateName; >+ return ConstructTypeHost; >+} >+ >+CallType NameConstructor::getCallData(JSCell*, CallData& callData) >+{ >+ callData.native.function = constructPrivateName; >+ return CallTypeHost; >+} >+ >+} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/NameConstructor.h b/Source/JavaScriptCore/runtime/NameConstructor.h >new file mode 100644 >index 0000000000000000000000000000000000000000..8e20f28fc88e5a06029463095a54c039551d4592 >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/NameConstructor.h >@@ -0,0 +1,65 @@ >+/* >+ * Copyright (C) 2012 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef NameConstructor_h >+#define NameConstructor_h >+ >+#include "InternalFunction.h" >+#include "NameInstance.h" >+ >+namespace JSC { >+ >+class NamePrototype; >+ >+class NameConstructor : public InternalFunction { >+public: >+ typedef InternalFunction Base; >+ >+ static NameConstructor* create(VM& vm, Structure* structure, NamePrototype* prototype) >+ { >+ NameConstructor* constructor = new (NotNull, allocateCell<NameConstructor>(vm.heap)) NameConstructor(vm, structure); >+ constructor->finishCreation(vm, prototype); >+ return constructor; >+ } >+ >+ DECLARE_INFO; >+ >+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) >+ { >+ return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); >+ } >+ >+protected: >+ void finishCreation(VM&, NamePrototype*); >+ >+private: >+ NameConstructor(VM&, Structure*); >+ static ConstructType getConstructData(JSCell*, ConstructData&); >+ static CallType getCallData(JSCell*, CallData&); >+}; >+ >+} // namespace JSC >+ >+#endif // NameConstructor_h >diff --git a/Source/JavaScriptCore/runtime/NameInstance.cpp b/Source/JavaScriptCore/runtime/NameInstance.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..f6d7f7808542194663ecc87eff5dfe770581b0f6 >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/NameInstance.cpp >@@ -0,0 +1,47 @@ >+/* >+ * Copyright (C) 2012 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "NameInstance.h" >+ >+#include "JSScope.h" >+#include "JSCInlines.h" >+ >+namespace JSC { >+ >+const ClassInfo NameInstance::s_info = { "Name", &Base::s_info, 0, CREATE_METHOD_TABLE(NameInstance) }; >+ >+NameInstance::NameInstance(VM& vm, Structure* structure, JSString* nameString) >+ : Base(vm, structure) >+{ >+ m_nameString.set(vm, this, nameString); >+} >+ >+void NameInstance::destroy(JSCell* cell) >+{ >+ static_cast<NameInstance*>(cell)->NameInstance::~NameInstance(); >+} >+ >+} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/NameInstance.h b/Source/JavaScriptCore/runtime/NameInstance.h >new file mode 100644 >index 0000000000000000000000000000000000000000..55842d52b89d3de7082713ab1d8dee7b318c057c >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/NameInstance.h >@@ -0,0 +1,77 @@ >+/* >+ * Copyright (C) 2012 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef NameInstance_h >+#define NameInstance_h >+ >+#include "JSDestructibleObject.h" >+#include "PrivateName.h" >+ >+namespace JSC { >+ >+class NameInstance : public JSDestructibleObject { >+public: >+ typedef JSDestructibleObject Base; >+ >+ DECLARE_INFO; >+ >+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) >+ { >+ return Structure::create(vm, globalObject, prototype, TypeInfo(NameInstanceType, StructureFlags), info()); >+ } >+ >+ static NameInstance* create(VM& vm, Structure* structure, JSString* nameString) >+ { >+ NameInstance* name = new (NotNull, allocateCell<NameInstance>(vm.heap)) NameInstance(vm, structure, nameString); >+ name->finishCreation(vm); >+ return name; >+ } >+ >+ const PrivateName& privateName() { return m_privateName; } >+ JSString* nameString() { return m_nameString.get(); } >+ >+protected: >+ static void destroy(JSCell*); >+ >+ NameInstance(VM&, Structure*, JSString*); >+ >+ void finishCreation(VM& vm) >+ { >+ Base::finishCreation(vm); >+ ASSERT(inherits(info())); >+ } >+ >+ PrivateName m_privateName; >+ WriteBarrier<JSString> m_nameString; >+}; >+ >+inline bool isName(JSValue v) >+{ >+ return v.isCell() && v.asCell()->type() == NameInstanceType; >+} >+ >+} // namespace JSC >+ >+#endif // NameInstance_h >diff --git a/Source/JavaScriptCore/runtime/NamePrototype.cpp b/Source/JavaScriptCore/runtime/NamePrototype.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..bf08d9aaea396932994f47e5f80d7b94f1521d1c >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/NamePrototype.cpp >@@ -0,0 +1,81 @@ >+/* >+ * Copyright (C) 2012 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "NamePrototype.h" >+ >+#include "Error.h" >+#include "JSCInlines.h" >+ >+namespace JSC { >+ >+static EncodedJSValue JSC_HOST_CALL privateNameProtoFuncToString(ExecState*); >+ >+} >+ >+#include "NamePrototype.lut.h" >+ >+namespace JSC { >+ >+const ClassInfo NamePrototype::s_info = { "Name", &Base::s_info, &privateNamePrototypeTable, CREATE_METHOD_TABLE(NamePrototype) }; >+ >+/* Source for NamePrototype.lut.h >+@begin privateNamePrototypeTable >+ toString privateNameProtoFuncToString DontEnum|Function 0 >+@end >+*/ >+ >+NamePrototype::NamePrototype(ExecState* exec, Structure* structure) >+ : Base(exec->vm(), structure, jsEmptyString(exec)) >+{ >+} >+ >+void NamePrototype::finishCreation(VM& vm) >+{ >+ Base::finishCreation(vm); >+ ASSERT(inherits(info())); >+} >+ >+bool NamePrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot) >+{ >+ return getStaticFunctionSlot<Base>(exec, privateNamePrototypeTable, jsCast<NamePrototype*>(object), propertyName, slot); >+} >+ >+// ------------------------------ Functions --------------------------- >+ >+EncodedJSValue JSC_HOST_CALL privateNameProtoFuncToString(ExecState* exec) >+{ >+ JSValue thisValue = exec->thisValue(); >+ if (!thisValue.isObject()) >+ return throwVMTypeError(exec); >+ >+ JSObject* thisObject = asObject(thisValue); >+ if (!thisObject->inherits(NameInstance::info())) >+ return throwVMTypeError(exec); >+ >+ return JSValue::encode(jsCast<NameInstance*>(thisObject)->nameString()); >+} >+ >+} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/NamePrototype.h b/Source/JavaScriptCore/runtime/NamePrototype.h >new file mode 100644 >index 0000000000000000000000000000000000000000..d4b947f72d3b03cfeaf0177f15d7e55b38aa6946 >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/NamePrototype.h >@@ -0,0 +1,64 @@ >+/* >+ * Copyright (C) 2012 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef NamePrototype_h >+#define NamePrototype_h >+ >+#include "NameInstance.h" >+ >+namespace JSC { >+ >+class NamePrototype : public NameInstance { >+public: >+ typedef NameInstance Base; >+ >+ static NamePrototype* create(ExecState* exec, Structure* structure) >+ { >+ VM& vm = exec->vm(); >+ NamePrototype* prototype = new (NotNull, allocateCell<NamePrototype>(vm.heap)) NamePrototype(exec, structure); >+ prototype->finishCreation(vm); >+ return prototype; >+ } >+ >+ DECLARE_INFO; >+ >+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) >+ { >+ return Structure::create(vm, globalObject, prototype, TypeInfo(NameInstanceType, StructureFlags), info()); >+ } >+ >+protected: >+ NamePrototype(ExecState*, Structure*); >+ void finishCreation(VM&); >+ >+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NameInstance::StructureFlags; >+ >+private: >+ static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); >+}; >+ >+} // namespace JSC >+ >+#endif // NamePrototype_h >diff --git a/Source/JavaScriptCore/runtime/ObjectConstructor.cpp b/Source/JavaScriptCore/runtime/ObjectConstructor.cpp >index 602e575289e16cdc16a0bba349785f2e27ef17dd..a87a4fc3cc906de05c0103083b25d3ddc2c8b2ba 100644 >--- a/Source/JavaScriptCore/runtime/ObjectConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/ObjectConstructor.cpp >@@ -173,7 +173,7 @@ EncodedJSValue JSC_HOST_CALL objectConstructorGetOwnPropertyDescriptor(ExecState > { > if (!exec->argument(0).isObject()) > return throwVMError(exec, createTypeError(exec, ASCIILiteral("Requested property descriptor of a value that is not an object."))); >- PropertyName propertyName = exec->argument(1).toPropertyKey(exec); >+ Identifier propertyName = exec->argument(1).toString(exec)->toIdentifier(exec); > if (exec->hadException()) > return JSValue::encode(jsNull()); > JSObject* object = asObject(exec->argument(0)); >@@ -316,7 +316,7 @@ EncodedJSValue JSC_HOST_CALL objectConstructorDefineProperty(ExecState* exec) > if (!exec->argument(0).isObject()) > return throwVMError(exec, createTypeError(exec, ASCIILiteral("Properties can only be defined on Objects."))); > JSObject* O = asObject(exec->argument(0)); >- PropertyName propertyName = exec->argument(1).toPropertyKey(exec); >+ Identifier propertyName = exec->argument(1).toString(exec)->toIdentifier(exec); > if (exec->hadException()) > return JSValue::encode(jsNull()); > PropertyDescriptor descriptor; >diff --git a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp >index a74b2a55fc4c96a7f23693fcd06107a6fb4a0688..33b4420fbccf8b4002d451f3a00db4948f5fb84c 100644 >--- a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp >@@ -85,7 +85,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncValueOf(ExecState* exec) > EncodedJSValue JSC_HOST_CALL objectProtoFuncHasOwnProperty(ExecState* exec) > { > JSValue thisValue = exec->thisValue().toThis(exec, StrictMode); >- return JSValue::encode(jsBoolean(thisValue.toObject(exec)->hasOwnProperty(exec, exec->argument(0).toPropertyKey(exec)))); >+ return JSValue::encode(jsBoolean(thisValue.toObject(exec)->hasOwnProperty(exec, exec->argument(0).toString(exec)->toIdentifier(exec)))); > } > > EncodedJSValue JSC_HOST_CALL objectProtoFuncIsPrototypeOf(ExecState* exec) >@@ -122,7 +122,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncDefineGetter(ExecState* exec) > descriptor.setGetter(get); > descriptor.setEnumerable(true); > descriptor.setConfigurable(true); >- thisObject->methodTable(exec->vm())->defineOwnProperty(thisObject, exec, exec->argument(0).toPropertyKey(exec), descriptor, false); >+ thisObject->methodTable(exec->vm())->defineOwnProperty(thisObject, exec, exec->argument(0).toString(exec)->toIdentifier(exec), descriptor, false); > > return JSValue::encode(jsUndefined()); > } >@@ -142,7 +142,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncDefineSetter(ExecState* exec) > descriptor.setSetter(set); > descriptor.setEnumerable(true); > descriptor.setConfigurable(true); >- thisObject->methodTable(exec->vm())->defineOwnProperty(thisObject, exec, exec->argument(0).toPropertyKey(exec), descriptor, false); >+ thisObject->methodTable(exec->vm())->defineOwnProperty(thisObject, exec, exec->argument(0).toString(exec)->toIdentifier(exec), descriptor, false); > > return JSValue::encode(jsUndefined()); > } >@@ -154,7 +154,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncLookupGetter(ExecState* exec) > return JSValue::encode(jsUndefined()); > > PropertySlot slot(thisObject); >- if (thisObject->getPropertySlot(exec, exec->argument(0).toPropertyKey(exec), slot) >+ if (thisObject->getPropertySlot(exec, exec->argument(0).toString(exec)->toIdentifier(exec), slot) > && slot.isAccessor()) { > GetterSetter* getterSetter = slot.getterSetter(); > return getterSetter->isGetterNull() ? JSValue::encode(jsUndefined()) : JSValue::encode(getterSetter->getter()); >@@ -170,7 +170,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState* exec) > return JSValue::encode(jsUndefined()); > > PropertySlot slot(thisObject); >- if (thisObject->getPropertySlot(exec, exec->argument(0).toPropertyKey(exec), slot) >+ if (thisObject->getPropertySlot(exec, exec->argument(0).toString(exec)->toIdentifier(exec), slot) > && slot.isAccessor()) { > GetterSetter* getterSetter = slot.getterSetter(); > return getterSetter->isSetterNull() ? JSValue::encode(jsUndefined()) : JSValue::encode(getterSetter->setter()); >@@ -182,7 +182,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState* exec) > EncodedJSValue JSC_HOST_CALL objectProtoFuncPropertyIsEnumerable(ExecState* exec) > { > JSObject* thisObject = exec->thisValue().toThis(exec, StrictMode).toObject(exec); >- PropertyName propertyName = exec->argument(0).toPropertyKey(exec); >+ Identifier propertyName = exec->argument(0).toString(exec)->toIdentifier(exec); > > PropertyDescriptor descriptor; > bool enumerable = thisObject->getOwnPropertyDescriptor(exec, propertyName, descriptor) && descriptor.enumerable(); >diff --git a/Source/JavaScriptCore/runtime/Operations.cpp b/Source/JavaScriptCore/runtime/Operations.cpp >index 0c9ccb6e39dd12dc0ea60d9dcad38d846c4a18c7..36d832f4420b73e316ad81820c4fc34bb177146a 100644 >--- a/Source/JavaScriptCore/runtime/Operations.cpp >+++ b/Source/JavaScriptCore/runtime/Operations.cpp >@@ -65,8 +65,6 @@ JSValue jsTypeStringForValue(VM& vm, JSGlobalObject* globalObject, JSValue v) > return vm.smallStrings.numberString(); > if (v.isString()) > return vm.smallStrings.stringString(); >- if (v.isSymbol()) >- return vm.smallStrings.symbolString(); > if (v.isObject()) { > // Return "undefined" for objects that should be treated > // as null when doing comparisons. >@@ -91,7 +89,7 @@ bool jsIsObjectType(CallFrame* callFrame, JSValue v) > return v.isNull(); > > JSType type = v.asCell()->type(); >- if (type == StringType || type == SymbolType) >+ if (type == StringType) > return false; > if (type >= ObjectType) { > if (asObject(v)->structure(callFrame->vm())->masqueradesAsUndefined(callFrame->lexicalGlobalObject())) >diff --git a/Source/JavaScriptCore/runtime/PrivateName.h b/Source/JavaScriptCore/runtime/PrivateName.h >index 21416446645c7fff03f7c82d178739ad5608bf64..55ee634d2a93a5952c71eb0ffd625c7581c0eb16 100644 >--- a/Source/JavaScriptCore/runtime/PrivateName.h >+++ b/Source/JavaScriptCore/runtime/PrivateName.h >@@ -33,26 +33,17 @@ > class PrivateName { > public: > PrivateName() >- : m_impl(StringImpl::createUniqueEmpty()) >+ : m_impl(StringImpl::createEmptyUnique()) > { >- ASSERT(m_impl->isUnique()); >- } >- PrivateName(const String& description) >- : m_impl(StringImpl::createUnique(description.impl())) >- { >- ASSERT(m_impl->isUnique()); > } > explicit PrivateName(StringImpl* uid) > : m_impl(uid) > { >- ASSERT(m_impl->isUnique()); >+ ASSERT(m_impl->isEmptyUnique()); > } > > AtomicStringImpl* uid() const { return static_cast<AtomicStringImpl*>(m_impl.get()); } > >- bool operator==(const PrivateName& other) const { return uid() == other.uid(); } >- bool operator!=(const PrivateName& other) const { return uid() != other.uid(); } >- > private: > RefPtr<StringImpl> m_impl; > }; >diff --git a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h >index 0370a3548da986d0411313e04dac2d15c6ba0904..d7334c0aedc0fea55ecd1743cf4e9281045b7616 100644 >--- a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h >+++ b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h >@@ -271,7 +271,7 @@ inline PropertyTable::const_iterator PropertyTable::end() const > inline PropertyTable::find_iterator PropertyTable::find(const KeyType& key) > { > ASSERT(key); >- ASSERT(key->isAtomic() || key->isUnique()); >+ ASSERT(key->isAtomic() || key->isEmptyUnique()); > unsigned hash = key->existingHash(); > unsigned step = 0; > >@@ -305,7 +305,7 @@ inline PropertyTable::find_iterator PropertyTable::find(const KeyType& key) > inline PropertyTable::ValueType* PropertyTable::get(const KeyType& key) > { > ASSERT(key); >- ASSERT(key->isAtomic() || key->isUnique()); >+ ASSERT(key->isAtomic() || key->isEmptyUnique()); > > if (!m_keyCount) > return nullptr; >diff --git a/Source/JavaScriptCore/runtime/PropertyName.h b/Source/JavaScriptCore/runtime/PropertyName.h >index 3074c72e1070133b97b03b1dff4a43de132fc0a6..22a8ff850fe04b6ed400a1edfdbe2bbfddad2e58 100644 >--- a/Source/JavaScriptCore/runtime/PropertyName.h >+++ b/Source/JavaScriptCore/runtime/PropertyName.h >@@ -93,7 +93,7 @@ class PropertyName { > : m_impl(static_cast<AtomicStringImpl*>(propertyName.uid())) > { > ASSERT(m_impl); >- ASSERT(m_impl->isUnique()); >+ ASSERT(m_impl->isEmptyUnique()); > ASSERT(m_impl->isAtomic()); > } > >@@ -104,7 +104,7 @@ class PropertyName { > > AtomicStringImpl* publicName() const > { >- return m_impl->isUnique() ? nullptr : m_impl; >+ return m_impl->isEmptyUnique() ? nullptr : m_impl; > } > > static const uint32_t NotAnIndex = UINT_MAX; >diff --git a/Source/JavaScriptCore/runtime/SmallStrings.h b/Source/JavaScriptCore/runtime/SmallStrings.h >index fd2b76a00befb665ba4f8e8ce512d38250d7640a..31b39f0282c0227b3c7320acfebb17948b6472b8 100644 >--- a/Source/JavaScriptCore/runtime/SmallStrings.h >+++ b/Source/JavaScriptCore/runtime/SmallStrings.h >@@ -38,7 +38,6 @@ > macro(object) \ > macro(undefined) \ > macro(string) \ >- macro(symbol) \ > macro(true) > > namespace WTF { >diff --git a/Source/JavaScriptCore/runtime/StringConstructor.cpp b/Source/JavaScriptCore/runtime/StringConstructor.cpp >index becacbe6559062ceff3b4fdd41aaf9849a341054..4bae9047a32e778bd1cc192f992bc1da32450cbf 100644 >--- a/Source/JavaScriptCore/runtime/StringConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/StringConstructor.cpp >@@ -110,10 +110,7 @@ static EncodedJSValue JSC_HOST_CALL callStringConstructor(ExecState* exec) > { > if (!exec->argumentCount()) > return JSValue::encode(jsEmptyString(exec)); >- JSValue argument = exec->uncheckedArgument(0); >- if (argument.isSymbol()) >- return JSValue::encode(jsString(exec, asSymbol(argument)->descriptiveString())); >- return JSValue::encode(argument.toString(exec)); >+ return JSValue::encode(exec->uncheckedArgument(0).toString(exec)); > } > > CallType StringConstructor::getCallData(JSCell*, CallData& callData) >diff --git a/Source/JavaScriptCore/runtime/Structure.cpp b/Source/JavaScriptCore/runtime/Structure.cpp >index c7690513d7aa703b7fb23d15c3f207a5c0eb1d27..6d756121c5bb662792b1531c04f8e5ec26fb7049 100644 >--- a/Source/JavaScriptCore/runtime/Structure.cpp >+++ b/Source/JavaScriptCore/runtime/Structure.cpp >@@ -947,7 +947,7 @@ void Structure::getPropertyNamesFromStructure(VM& vm, PropertyNameArray& propert > PropertyTable::iterator end = propertyTable()->end(); > for (PropertyTable::iterator iter = propertyTable()->begin(); iter != end; ++iter) { > ASSERT(hasNonEnumerableProperties() || !(iter->attributes & DontEnum)); >- if (!iter->key->isUnique() && (!(iter->attributes & DontEnum) || shouldIncludeDontEnumProperties(mode))) { >+ if (!iter->key->isEmptyUnique() && (!(iter->attributes & DontEnum) || shouldIncludeDontEnumProperties(mode))) { > if (knownUnique) > propertyNames.addKnownUnique(iter->key); > else >diff --git a/Source/JavaScriptCore/runtime/StructureInlines.h b/Source/JavaScriptCore/runtime/StructureInlines.h >index f17bc1b17a401c0dc8918c6db8339c5331085230..269292b7d3eac0408ccc79369c64d4e242231fd2 100644 >--- a/Source/JavaScriptCore/runtime/StructureInlines.h >+++ b/Source/JavaScriptCore/runtime/StructureInlines.h >@@ -168,8 +168,6 @@ inline JSValue Structure::prototypeForLookup(JSGlobalObject* globalObject) const > { > if (isObject()) > return m_prototype.get(); >- if (typeInfo().type() == SymbolType) >- return globalObject->symbolPrototype(); > > ASSERT(typeInfo().type() == StringType); > return globalObject->stringPrototype(); >diff --git a/Source/JavaScriptCore/runtime/Symbol.cpp b/Source/JavaScriptCore/runtime/Symbol.cpp >deleted file mode 100644 >index 294f67e176d4384a28903dea55d63693fb21a16e..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/Symbol.cpp >+++ /dev/null >@@ -1,105 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "Symbol.h" >- >-#include "Error.h" >-#include "JSCInlines.h" >-#include "SymbolObject.h" >- >-namespace JSC { >- >-const ClassInfo Symbol::s_info = { "symbol", nullptr, nullptr, CREATE_METHOD_TABLE(Symbol) }; >- >-Symbol::Symbol(VM& vm) >- : Base(vm, vm.symbolStructure.get()) >- , m_privateName() >-{ >-} >- >-Symbol::Symbol(VM& vm, const String& string) >- : Base(vm, vm.symbolStructure.get()) >- , m_privateName(string) >-{ >-} >- >-Symbol::Symbol(VM& vm, AtomicStringImpl* uid) >- : Base(vm, vm.symbolStructure.get()) >- , m_privateName(uid) >-{ >-} >- >-inline SymbolObject* SymbolObject::create(VM& vm, JSGlobalObject* globalObject, Symbol* symbol) >-{ >- SymbolObject* object = new (NotNull, allocateCell<SymbolObject>(vm.heap)) SymbolObject(vm, globalObject->symbolObjectStructure()); >- object->finishCreation(vm, symbol); >- return object; >-} >- >-JSValue Symbol::toPrimitive(ExecState*, PreferredPrimitiveType) const >-{ >- return const_cast<Symbol*>(this); >-} >- >-bool Symbol::toBoolean() const >-{ >- return true; >-} >- >-bool Symbol::getPrimitiveNumber(ExecState* exec, double& number, JSValue& result) const >-{ >- result = this; >- number = toNumber(exec); >- return true; >-} >- >-JSObject* Symbol::toObject(ExecState* exec, JSGlobalObject* globalObject) const >-{ >- return SymbolObject::create(exec->vm(), globalObject, const_cast<Symbol*>(this)); >-} >- >-double Symbol::toNumber(ExecState* exec) const >-{ >- throwTypeError(exec); >- return 0.0; >-} >- >-void Symbol::destroy(JSCell* cell) >-{ >- static_cast<Symbol*>(cell)->Symbol::~Symbol(); >-} >- >-String Symbol::descriptiveString() const >-{ >- StringBuilder builder; >- builder.appendLiteral("Symbol("); >- builder.append(privateName().uid()); >- builder.append(')'); >- return builder.toString(); >-} >- >-} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/Symbol.h b/Source/JavaScriptCore/runtime/Symbol.h >deleted file mode 100644 >index 27b01fc450ba10986b923ff29d19a3ec4f8fba4d..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/Symbol.h >+++ /dev/null >@@ -1,111 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * Copyright (C) 2014 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#ifndef Symbol_h >-#define Symbol_h >- >-#include "JSCell.h" >-#include "JSString.h" >-#include "PrivateName.h" >- >-namespace JSC { >- >-class Symbol : public JSCell { >-public: >- typedef JSCell Base; >- >- DECLARE_EXPORT_INFO; >- >- static const bool needsDestruction = true; >- static const bool hasImmortalStructure = true; >- >- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) >- { >- return Structure::create(vm, globalObject, prototype, TypeInfo(SymbolType, StructureFlags), info()); >- } >- >- static Symbol* create(VM& vm) >- { >- Symbol* symbol = new (NotNull, allocateCell<Symbol>(vm.heap)) Symbol(vm); >- symbol->finishCreation(vm); >- return symbol; >- } >- >- static Symbol* create(ExecState* exec, JSString* description) >- { >- VM& vm = exec->vm(); >- String desc = description->value(exec); >- Symbol* symbol = new (NotNull, allocateCell<Symbol>(vm.heap)) Symbol(vm, desc); >- symbol->finishCreation(vm); >- return symbol; >- } >- >- static Symbol* create(VM& vm, AtomicStringImpl* uid) >- { >- Symbol* symbol = new (NotNull, allocateCell<Symbol>(vm.heap)) Symbol(vm, uid); >- symbol->finishCreation(vm); >- return symbol; >- } >- >- const PrivateName& privateName() const { return m_privateName; } >- String descriptiveString() const; >- >- JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; >- JS_EXPORT_PRIVATE bool toBoolean() const; >- bool getPrimitiveNumber(ExecState*, double& number, JSValue&) const; >- JSObject* toObject(ExecState*, JSGlobalObject*) const; >- double toNumber(ExecState*) const; >- >-protected: >- static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | StructureIsImmortal; >- >- static void destroy(JSCell*); >- >- Symbol(VM&); >- Symbol(VM&, const String&); >- Symbol(VM&, AtomicStringImpl* uid); >- >- void finishCreation(VM& vm) >- { >- Base::finishCreation(vm); >- ASSERT(inherits(info())); >- } >- >- PrivateName m_privateName; >-}; >- >-Symbol* asSymbol(JSValue); >- >-inline Symbol* asSymbol(JSValue value) >-{ >- ASSERT(value.asCell()->isSymbol()); >- return jsCast<Symbol*>(value.asCell()); >-} >- >-} // namespace JSC >- >-#endif // Symbol_h >diff --git a/Source/JavaScriptCore/runtime/SymbolConstructor.cpp b/Source/JavaScriptCore/runtime/SymbolConstructor.cpp >deleted file mode 100644 >index 99ce686274fd773928ddd59ff1f9caf4eebe211e..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/SymbolConstructor.cpp >+++ /dev/null >@@ -1,77 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "SymbolConstructor.h" >- >-#include "Error.h" >-#include "JSCInlines.h" >-#include "JSGlobalObject.h" >-#include "SymbolPrototype.h" >- >-namespace JSC { >- >-STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(SymbolConstructor); >- >-const ClassInfo SymbolConstructor::s_info = { "Function", &Base::s_info, 0, CREATE_METHOD_TABLE(SymbolConstructor) }; >- >-SymbolConstructor::SymbolConstructor(VM& vm, Structure* structure) >- : InternalFunction(vm, structure) >-{ >-} >- >-#define INITIALIZE_WELL_KNOWN_SYMBOLS(name) \ >- putDirectWithoutTransition(vm, Identifier(&vm, #name), Symbol::create(vm, vm.propertyNames->name##PrivateName.impl()), DontEnum | DontDelete | ReadOnly); >- >-void SymbolConstructor::finishCreation(VM& vm, SymbolPrototype* prototype) >-{ >- Base::finishCreation(vm, prototype->classInfo()->className); >- putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly); >- putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum); >- >- JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_WELL_KNOWN_SYMBOLS) >-} >- >-static EncodedJSValue JSC_HOST_CALL callSymbol(ExecState* exec) >-{ >- JSValue description = exec->argument(0); >- if (description.isUndefined()) >- return JSValue::encode(Symbol::create(exec->vm())); >- return JSValue::encode(Symbol::create(exec, description.toString(exec))); >-} >- >-ConstructType SymbolConstructor::getConstructData(JSCell*, ConstructData&) >-{ >- return ConstructTypeNone; >-} >- >-CallType SymbolConstructor::getCallData(JSCell*, CallData& callData) >-{ >- callData.native.function = callSymbol; >- return CallTypeHost; >-} >- >-} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/SymbolConstructor.h b/Source/JavaScriptCore/runtime/SymbolConstructor.h >deleted file mode 100644 >index 0ae12d7fdd5c424bb69a26d1dc13ae08084a6839..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/SymbolConstructor.h >+++ /dev/null >@@ -1,66 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#ifndef SymbolConstructor_h >-#define SymbolConstructor_h >- >-#include "InternalFunction.h" >-#include "Symbol.h" >- >-namespace JSC { >- >-class SymbolPrototype; >- >-class SymbolConstructor : public InternalFunction { >-public: >- typedef InternalFunction Base; >- >- static SymbolConstructor* create(VM& vm, Structure* structure, SymbolPrototype* prototype) >- { >- SymbolConstructor* constructor = new (NotNull, allocateCell<SymbolConstructor>(vm.heap)) SymbolConstructor(vm, structure); >- constructor->finishCreation(vm, prototype); >- return constructor; >- } >- >- DECLARE_INFO; >- >- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) >- { >- return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); >- } >- >-protected: >- void finishCreation(VM&, SymbolPrototype*); >- >-private: >- SymbolConstructor(VM&, Structure*); >- static ConstructType getConstructData(JSCell*, ConstructData&); >- static CallType getCallData(JSCell*, CallData&); >-}; >- >-} // namespace JSC >- >-#endif // SymbolConstructor_h >diff --git a/Source/JavaScriptCore/runtime/SymbolObject.cpp b/Source/JavaScriptCore/runtime/SymbolObject.cpp >deleted file mode 100644 >index 9ab7a7ecbade1785929af3c44afbad22c719c3ca..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/SymbolObject.cpp >+++ /dev/null >@@ -1,56 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "SymbolObject.h" >- >-#include "JSCInlines.h" >- >-namespace JSC { >- >-STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(SymbolObject); >- >-const ClassInfo SymbolObject::s_info = { "Symbol", &JSWrapperObject::s_info, nullptr, CREATE_METHOD_TABLE(SymbolObject) }; >- >-SymbolObject::SymbolObject(VM& vm, Structure* structure) >- : JSWrapperObject(vm, structure) >-{ >-} >- >-void SymbolObject::finishCreation(VM& vm, Symbol* symbol) >-{ >- Base::finishCreation(vm); >- ASSERT(inherits(info())); >- setInternalValue(vm, symbol); >-} >- >-JSValue SymbolObject::defaultValue(const JSObject* object, ExecState*, PreferredPrimitiveType) >-{ >- const SymbolObject* symbolObject = jsCast<const SymbolObject*>(object); >- return symbolObject->internalValue(); >-} >- >-} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/SymbolObject.h b/Source/JavaScriptCore/runtime/SymbolObject.h >deleted file mode 100644 >index 46a0491702af0749ddce69d3db8bfda19bcfa0d9..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/SymbolObject.h >+++ /dev/null >@@ -1,67 +0,0 @@ >-/* >- * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) >- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * This library is free software; you can redistribute it and/or >- * modify it under the terms of the GNU Lesser General Public >- * License as published by the Free Software Foundation; either >- * version 2 of the License, or (at your option) any later version. >- * >- * This library is distributed in the hope that it will be useful, >- * but WITHOUT ANY WARRANTY; without even the implied warranty of >- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- * Lesser General Public License for more details. >- * >- * You should have received a copy of the GNU Lesser General Public >- * License along with this library; if not, write to the Free Software >- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA >- * >- */ >- >-#ifndef SymbolObject_h >-#define SymbolObject_h >- >-#include "JSWrapperObject.h" >-#include "Symbol.h" >- >-namespace JSC { >- >-class SymbolObject : public JSWrapperObject { >-public: >- typedef JSWrapperObject Base; >- >- static SymbolObject* create(VM& vm, Structure* structure) >- { >- Symbol* symbol = Symbol::create(vm); >- SymbolObject* object = new (NotNull, allocateCell<SymbolObject>(vm.heap)) SymbolObject(vm, structure); >- object->finishCreation(vm, symbol); >- return object; >- } >- static SymbolObject* create(VM& vm, Structure* structure, Symbol* symbol) >- { >- SymbolObject* object = new (NotNull, allocateCell<SymbolObject>(vm.heap)) SymbolObject(vm, structure); >- object->finishCreation(vm, symbol); >- return object; >- } >- static SymbolObject* create(VM&, JSGlobalObject*, Symbol*); >- >- DECLARE_EXPORT_INFO; >- >- Symbol* internalValue() const { return asSymbol(JSWrapperObject::internalValue());} >- >- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) >- { >- return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); >- } >- >- static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType); >- >-protected: >- JS_EXPORT_PRIVATE void finishCreation(VM&, Symbol*); >- JS_EXPORT_PRIVATE SymbolObject(VM&, Structure*); >-}; >- >-} // namespace JSC >- >-#endif // SymbolObject_h >diff --git a/Source/JavaScriptCore/runtime/SymbolPrototype.cpp b/Source/JavaScriptCore/runtime/SymbolPrototype.cpp >deleted file mode 100644 >index b8db16194ee95387f9896c09695392619c745247..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/SymbolPrototype.cpp >+++ /dev/null >@@ -1,105 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "SymbolPrototype.h" >- >-#include "Error.h" >-#include "JSCInlines.h" >- >-namespace JSC { >- >-static EncodedJSValue JSC_HOST_CALL symbolProtoFuncToString(ExecState*); >-static EncodedJSValue JSC_HOST_CALL symbolProtoFuncValueOf(ExecState*); >- >-} >- >-#include "SymbolPrototype.lut.h" >- >-namespace JSC { >- >-const ClassInfo SymbolPrototype::s_info = { "Symbol", &Base::s_info, &symbolPrototypeTable, CREATE_METHOD_TABLE(SymbolPrototype) }; >- >-/* Source for SymbolPrototype.lut.h >-@begin symbolPrototypeTable >- toString symbolProtoFuncToString DontEnum|Function 0 >- valueOf symbolProtoFuncValueOf DontEnum|Function 0 >-@end >-*/ >- >-SymbolPrototype::SymbolPrototype(VM& vm, Structure* structure) >- : Base(vm, structure) >-{ >-} >- >-void SymbolPrototype::finishCreation(VM& vm) >-{ >- Base::finishCreation(vm); >- ASSERT(inherits(info())); >-} >- >-bool SymbolPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot) >-{ >- return getStaticFunctionSlot<Base>(exec, symbolPrototypeTable, jsCast<SymbolPrototype*>(object), propertyName, slot); >-} >- >-// ------------------------------ Functions --------------------------- >- >-EncodedJSValue JSC_HOST_CALL symbolProtoFuncToString(ExecState* exec) >-{ >- JSValue thisValue = exec->thisValue(); >- Symbol* symbol = nullptr; >- if (thisValue.isSymbol()) >- symbol = asSymbol(thisValue); >- else if (!thisValue.isObject()) >- return throwVMTypeError(exec); >- else { >- JSObject* thisObject = asObject(thisValue); >- if (!thisObject->inherits(SymbolObject::info())) >- return throwVMTypeError(exec); >- symbol = asSymbol(jsCast<SymbolObject*>(thisObject)->internalValue()); >- } >- >- return JSValue::encode(jsString(exec, symbol->descriptiveString())); >-} >- >-EncodedJSValue JSC_HOST_CALL symbolProtoFuncValueOf(ExecState* exec) >-{ >- JSValue thisValue = exec->thisValue(); >- if (thisValue.isSymbol()) >- return JSValue::encode(thisValue); >- >- if (!thisValue.isObject()) >- return throwVMTypeError(exec); >- >- JSObject* thisObject = asObject(thisValue); >- if (!thisObject->inherits(SymbolObject::info())) >- return throwVMTypeError(exec); >- >- return JSValue::encode(jsCast<SymbolObject*>(thisObject)->internalValue()); >-} >- >-} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/SymbolPrototype.h b/Source/JavaScriptCore/runtime/SymbolPrototype.h >deleted file mode 100644 >index 85a93d3bb07235fda1b9c67ee9b497730fafa32d..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/runtime/SymbolPrototype.h >+++ /dev/null >@@ -1,66 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#ifndef SymbolPrototype_h >-#define SymbolPrototype_h >- >-#include "Symbol.h" >-#include "SymbolObject.h" >- >-namespace JSC { >- >-// In the ES6 spec, Symbol.prototype object is an ordinary JS object, not one of the symbol wrapper object instance. >-class SymbolPrototype : public JSDestructibleObject { >-public: >- typedef JSDestructibleObject Base; >- >- static SymbolPrototype* create(VM& vm, JSGlobalObject*, Structure* structure) >- { >- SymbolPrototype* prototype = new (NotNull, allocateCell<SymbolPrototype>(vm.heap)) SymbolPrototype(vm, structure); >- prototype->finishCreation(vm); >- return prototype; >- } >- >- DECLARE_INFO; >- >- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) >- { >- return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); >- } >- >-protected: >- SymbolPrototype(VM&, Structure*); >- void finishCreation(VM&); >- >- static const unsigned StructureFlags = OverridesGetOwnPropertySlot | Base::StructureFlags; >- >-private: >- static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); >-}; >- >-} // namespace JSC >- >-#endif // SymbolPrototype_h >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index 0f73540f43596a7246e294242be052a1d4566df8..c532c27798f64a2c7544eca3e9deaa278cdc2e6c 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -220,7 +220,6 @@ static bool enableAssembler(ExecutableAllocator& executableAllocator) > programExecutableStructure.set(*this, ProgramExecutable::createStructure(*this, 0, jsNull())); > functionExecutableStructure.set(*this, FunctionExecutable::createStructure(*this, 0, jsNull())); > regExpStructure.set(*this, RegExp::createStructure(*this, 0, jsNull())); >- symbolStructure.set(*this, Symbol::createStructure(*this, 0, jsNull())); > symbolTableStructure.set(*this, SymbolTable::createStructure(*this, 0, jsNull())); > structureChainStructure.set(*this, StructureChain::createStructure(*this, 0, jsNull())); > sparseArrayValueMapStructure.set(*this, SparseArrayValueMap::createStructure(*this, 0, jsNull())); >diff --git a/Source/JavaScriptCore/runtime/VM.h b/Source/JavaScriptCore/runtime/VM.h >index 94c483b723602283ed40da55ded29553a0317825..e87ad95b53c4ebffceffa5aab4c7756e68303dec 100644 >--- a/Source/JavaScriptCore/runtime/VM.h >+++ b/Source/JavaScriptCore/runtime/VM.h >@@ -258,7 +258,6 @@ class VM : public ThreadSafeRefCounted<VM> { > Strong<Structure> programExecutableStructure; > Strong<Structure> functionExecutableStructure; > Strong<Structure> regExpStructure; >- Strong<Structure> symbolStructure; > Strong<Structure> symbolTableStructure; > Strong<Structure> structureChainStructure; > Strong<Structure> sparseArrayValueMapStructure; >diff --git a/Source/WTF/wtf/text/AtomicString.h b/Source/WTF/wtf/text/AtomicString.h >index bae9d362d2751e5a73ce0b1b7e2a411b01837f33..a79076c0ef3431e120f70673067ce3246772b61f 100644 >--- a/Source/WTF/wtf/text/AtomicString.h >+++ b/Source/WTF/wtf/text/AtomicString.h >@@ -184,7 +184,7 @@ class AtomicString { > ALWAYS_INLINE static RefPtr<StringImpl> add(StringImpl* string) > { > if (!string || string->isAtomic()) { >- ASSERT_WITH_MESSAGE(!string || !string->length() || string->isUnique() || isInAtomicStringTable(string), "The atomic string comes from an other thread!"); >+ ASSERT_WITH_MESSAGE(!string || !string->length() || isInAtomicStringTable(string), "The atomic string comes from an other thread!"); > return string; > } > return addSlowCase(*string); >@@ -198,7 +198,7 @@ class AtomicString { > ALWAYS_INLINE static RefPtr<StringImpl> addWithStringTableProvider(StringTableProvider& stringTableProvider, StringImpl* string) > { > if (!string || string->isAtomic()) { >- ASSERT_WITH_MESSAGE(!string || !string->length() || string->isUnique() || isInAtomicStringTable(string), "The atomic string comes from an other thread!"); >+ ASSERT_WITH_MESSAGE(!string || !string->length() || isInAtomicStringTable(string), "The atomic string comes from an other thread!"); > return string; > } > return addSlowCase(*stringTableProvider.atomicStringTable(), *string); >diff --git a/Source/WTF/wtf/text/StringImpl.cpp b/Source/WTF/wtf/text/StringImpl.cpp >index c249f4d7ffd5dabee164064a621924dcf3457dc8..28a23b42398f98c035c183996357b8260f7bccc2 100644 >--- a/Source/WTF/wtf/text/StringImpl.cpp >+++ b/Source/WTF/wtf/text/StringImpl.cpp >@@ -109,7 +109,7 @@ void StringStats::printStats() > > STRING_STATS_REMOVE_STRING(*this); > >- if (isAtomic() && length() && !isUnique()) >+ if (isAtomic() && m_length) > AtomicString::remove(this); > > BufferOwnership ownership = bufferOwnership(); >@@ -286,16 +286,6 @@ void StringImpl::destroy(StringImpl* stringImpl) > return create(string, length); > } > >-Ref<StringImpl> StringImpl::createUnique(PassRefPtr<StringImpl> rep) >-{ >- unsigned length = rep->length(); >- if (!length) >- return createUniqueEmpty(); >- Ref<StringImpl> string = createSubstringSharingImpl(rep, 0, length); >- string->m_hashAndFlags = hashAndFlagsForUnique(string->m_hashAndFlags); >- return string; >-} >- > bool StringImpl::containsOnlyWhitespace() > { > // FIXME: The definition of whitespace here includes a number of characters >diff --git a/Source/WTF/wtf/text/StringImpl.h b/Source/WTF/wtf/text/StringImpl.h >index 266b97e4c88667bf1460e7b91bb051c4ba53897b..1fa295c1ad721293f8017b5cb4a0a47c044527ed 100644 >--- a/Source/WTF/wtf/text/StringImpl.h >+++ b/Source/WTF/wtf/text/StringImpl.h >@@ -280,7 +280,7 @@ class StringImpl { > // We expect m_length to be initialized to 0 as we use it > // to represent a null terminated buffer. > , m_data8(reinterpret_cast<const LChar*>(&m_length)) >- , m_hashAndFlags(hashAndFlagsForUnique(s_hashFlag8BitBuffer | BufferInternal)) >+ , m_hashAndFlags(hashAndFlagsForEmptyUnique()) > { > ASSERT(m_data8); > >@@ -378,13 +378,11 @@ class StringImpl { > return constructInternal<T>(resultImpl, length); > } > >- ALWAYS_INLINE static Ref<StringImpl> createUniqueEmpty() >+ static Ref<StringImpl> createEmptyUnique() > { > return adoptRef(*new StringImpl(CreateEmptyUnique)); > } > >- WTF_EXPORT_STRING_API static Ref<StringImpl> createUnique(PassRefPtr<StringImpl> rep); >- > // Reallocate the StringImpl. The originalString must be only owned by the PassRefPtr, > // and the buffer ownership must be BufferInternal. Just like the input pointer of realloc(), > // the originalString can't be used after this function. >@@ -394,7 +392,6 @@ class StringImpl { > static unsigned flagsOffset() { return OBJECT_OFFSETOF(StringImpl, m_hashAndFlags); } > static unsigned flagIs8Bit() { return s_hashFlag8BitBuffer; } > static unsigned flagIsAtomic() { return s_hashFlagIsAtomic; } >- static unsigned flagIsUnique() { return s_hashFlagIsUnique; } > static unsigned dataOffset() { return OBJECT_OFFSETOF(StringImpl, m_data8); } > > template<typename CharType, size_t inlineCapacity, typename OverflowHandler> >@@ -454,13 +451,16 @@ class StringImpl { > > WTF_EXPORT_STRING_API size_t sizeInBytes() const; > >- bool isUnique() const { return m_hashAndFlags & s_hashFlagIsUnique; } >+ bool isEmptyUnique() const >+ { >+ return !length() && !isStatic(); >+ } > > bool isAtomic() const { return m_hashAndFlags & s_hashFlagIsAtomic; } > void setIsAtomic(bool isAtomic) > { > ASSERT(!isStatic()); >- ASSERT(!isUnique()); >+ ASSERT(!isEmptyUnique()); > if (isAtomic) > m_hashAndFlags |= s_hashFlagIsAtomic; > else >@@ -772,18 +772,17 @@ class StringImpl { > template <typename CharType> static Ref<StringImpl> reallocateInternal(PassRefPtr<StringImpl>, unsigned, CharType*&); > template <typename CharType> static Ref<StringImpl> createInternal(const CharType*, unsigned); > WTF_EXPORT_PRIVATE NEVER_INLINE unsigned hashSlowCase() const; >- WTF_EXPORT_PRIVATE static unsigned hashAndFlagsForUnique(unsigned flags); >+ WTF_EXPORT_PRIVATE unsigned hashAndFlagsForEmptyUnique(); > > // The bottom bit in the ref count indicates a static (immortal) string. > static const unsigned s_refCountFlagIsStaticString = 0x1; > static const unsigned s_refCountIncrement = 0x2; // This allows us to ref / deref without disturbing the static string flag. > >- // The bottom 7 bits in the hash are flags. >- static const unsigned s_flagCount = 7; >+ // The bottom 6 bits in the hash are flags. >+ static const unsigned s_flagCount = 6; > static const unsigned s_flagMask = (1u << s_flagCount) - 1; > COMPILE_ASSERT(s_flagCount <= StringHasher::flagCount, StringHasher_reserves_enough_bits_for_StringImpl_flags); > >- static const unsigned s_hashFlagIsUnique = 1u << 6; > static const unsigned s_hashFlag8BitBuffer = 1u << 5; > static const unsigned s_hashFlagIsAtomic = 1u << 4; > static const unsigned s_hashFlagDidReportCost = 1u << 3; >diff --git a/Source/WTF/wtf/text/StringStatics.cpp b/Source/WTF/wtf/text/StringStatics.cpp >index 65bb6721d743fa1041c292b60f4d0329283d8e51..a234ffd2936e67e6a2fc8eeffae09b74195f37f9 100644 >--- a/Source/WTF/wtf/text/StringStatics.cpp >+++ b/Source/WTF/wtf/text/StringStatics.cpp >@@ -47,18 +47,17 @@ StringImpl* StringImpl::empty() > return &emptyString.get(); > } > >-// Set the hash early, so that all unique StringImpls have a hash, >+// Set the hash early, so that all empty unique StringImpls have a hash, > // and don't use the normal hashing algorithm - the unique nature of these > // keys means that we don't need them to match any other string (in fact, > // that's exactly the oposite of what we want!), and the normal hash would > // lead to lots of conflicts. >-unsigned StringImpl::hashAndFlagsForUnique(unsigned flags) >+unsigned StringImpl::hashAndFlagsForEmptyUnique() > { >- static unsigned s_nextHashAndFlagsForUnique = 0; >- s_nextHashAndFlagsForUnique += 1 << s_flagCount; >- s_nextHashAndFlagsForUnique |= 1 << 31; >- unsigned flagsForUnique = (flags & s_flagMask) | s_hashFlagIsAtomic | s_hashFlagIsUnique; >- return s_nextHashAndFlagsForUnique | flagsForUnique; >+ static unsigned s_nextHashAndFlagsForEmptyUnique = BufferInternal | s_hashFlag8BitBuffer | s_hashFlagIsAtomic; >+ s_nextHashAndFlagsForEmptyUnique += 1 << s_flagCount; >+ s_nextHashAndFlagsForEmptyUnique |= 1 << 31; >+ return s_nextHashAndFlagsForEmptyUnique; > } > > WTF_EXPORTDATA DEFINE_GLOBAL(AtomicString, nullAtom) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index d5c84abf9724238bfcd9c6b07b7a4afb112f7cbe..76b0be9a556402546784315484dc33904008a56a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,36 @@ >+2015-02-20 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ REGRESSION(r179429): Can't type comments in Facebook >+ https://bugs.webkit.org/show_bug.cgi?id=141859 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * js/names-expected.txt: Renamed from LayoutTests/js/symbols-expected.txt. >+ * js/names.html: Renamed from LayoutTests/js/symbols.html. >+ * js/script-tests/names.js: Renamed from LayoutTests/js/script-tests/symbols.js. >+ (forIn): >+ * js/script-tests/symbol-abstract-equality-comparison.js: Removed. >+ * js/script-tests/symbol-abstract-relational-comparison.js: Removed. >+ * js/script-tests/symbol-in-map.js: Removed. >+ * js/script-tests/symbol-object.js: Removed. >+ * js/script-tests/symbol-prototype-is-ordinary-object.js: Removed. >+ * js/script-tests/symbol-strict-equality-comparison.js: Removed. >+ * js/script-tests/symbol-tostring.js: Removed. >+ * js/symbol-abstract-equality-comparison-expected.txt: Removed. >+ * js/symbol-abstract-equality-comparison.html: Removed. >+ * js/symbol-abstract-relational-comparison-expected.txt: Removed. >+ * js/symbol-abstract-relational-comparison.html: Removed. >+ * js/symbol-in-map-expected.txt: Removed. >+ * js/symbol-in-map.html: Removed. >+ * js/symbol-object-expected.txt: Removed. >+ * js/symbol-object.html: Removed. >+ * js/symbol-prototype-is-ordinary-object-expected.txt: Removed. >+ * js/symbol-prototype-is-ordinary-object.html: Removed. >+ * js/symbol-strict-equality-comparison-expected.txt: Removed. >+ * js/symbol-strict-equality-comparison.html: Removed. >+ * js/symbol-tostring-expected.txt: Removed. >+ * js/symbol-tostring.html: Removed. >+ > 2015-02-20 Zalan Bujtas <zalan@apple.com> > > Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore >diff --git a/LayoutTests/js/names-expected.txt b/LayoutTests/js/names-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..f12be861636b3891d1856dd78ba69625ae880257 >--- /dev/null >+++ b/LayoutTests/js/names-expected.txt >@@ -0,0 +1,25 @@ >+This tests an early experimental implementation of ES6-esque private names. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS prop in o is false >+PASS 'prop' in o is false >+PASS Object.getOwnPropertyNames(o).length is 0 >+PASS forIn(o) is [] >+PASS prop in o is true >+PASS 'prop' in o is false >+PASS Object.getOwnPropertyNames(o).length is 0 >+PASS forIn(o) is [] >+PASS o[prop] is 42 >+PASS o['prop'] is 101 >+PASS Object.getOwnPropertyNames(o).length is 1 >+PASS forIn(o) is ["prop"] >+PASS prop in o is false >+PASS 'prop' in o is true >+PASS Object.getOwnPropertyNames(o).length is 1 >+PASS forIn(o) is ["prop"] >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/js/names.html b/LayoutTests/js/names.html >new file mode 100644 >index 0000000000000000000000000000000000000000..23aef4a9c613ce8d15962367bf9dbbe996cd6307 >--- /dev/null >+++ b/LayoutTests/js/names.html >@@ -0,0 +1,10 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../resources/js-test-pre.js"></script> >+</head> >+<body> >+<script src="script-tests/names.js"></script> >+<script src="../resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/js/script-tests/names.js b/LayoutTests/js/script-tests/names.js >new file mode 100644 >index 0000000000000000000000000000000000000000..14dc141660babeadb6c52ebc443e9dfad70f51c4 >--- /dev/null >+++ b/LayoutTests/js/script-tests/names.js >@@ -0,0 +1,42 @@ >+description( >+"This tests an early experimental implementation of ES6-esque private names." >+); >+ >+function forIn(o) >+{ >+ var a = []; >+ for (x in o) >+ a.push(x); >+ return a; >+} >+ >+var prop = Name("prop"); >+var o = {}; >+ >+shouldBeFalse("prop in o"); >+shouldBeFalse("'prop' in o"); >+shouldBe("Object.getOwnPropertyNames(o).length", '0'); >+shouldBe("forIn(o)", '[]'); >+ >+o[prop] = 42; >+ >+shouldBeTrue("prop in o"); >+shouldBeFalse("'prop' in o"); >+shouldBe("Object.getOwnPropertyNames(o).length", '0'); >+shouldBe("forIn(o)", '[]'); >+ >+o['prop'] = 101; >+ >+shouldBe("o[prop]", '42'); >+shouldBe("o['prop']", '101'); >+shouldBe("Object.getOwnPropertyNames(o).length", '1'); >+shouldBe("forIn(o)", '["prop"]'); >+ >+delete o[prop]; >+ >+shouldBeFalse("prop in o"); >+shouldBeTrue("'prop' in o"); >+shouldBe("Object.getOwnPropertyNames(o).length", '1'); >+shouldBe("forIn(o)", '["prop"]'); >+ >+successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbol-abstract-equality-comparison.js b/LayoutTests/js/script-tests/symbol-abstract-equality-comparison.js >deleted file mode 100644 >index 1118f0f017d9da3b964ca0e7f5d0751f734d039d..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbol-abstract-equality-comparison.js >+++ /dev/null >@@ -1,49 +0,0 @@ >-description( >-"This tests Abstract Equality Comparison results with Symbols." >-); >- >-var symbol = Symbol("Cocoa"); >-var symbolObject = Object(symbol); >-// Test Abstract Relational Comparison. >-var relationalOperators = [ >- "==", "!=" >-]; >-var object = {}; >-var array = []; >-var date = new Date(); >- >-function Pair(key, result) { >- return [ key, result ]; >-} >- >-relationalOperators.forEach(function (op) { >- var targets = [ >- Pair("42", false), >- Pair("NaN", false), >- Pair("Infinity", false), >- Pair("true", false), >- Pair("false", false), >- Pair("null", false), >- Pair("undefined", false), >- Pair("'Cappuccino'", false), >- Pair("symbol", true), >- Pair("Symbol.iterator", false), >- Pair("object", false), >- Pair("array", false), >- Pair("date", false), >- Pair("symbolObject", true), >- Pair("Symbol('Cocoa')", false), >- ]; >- >- targets.forEach(function (pair) { >- var target = pair[0]; >- var result = pair[1]; >- if (op === "!=") { >- result = !result; >- } >- shouldBe(target + " " + op + " symbol", String(result)); >- shouldBe("symbol " + op + " " + target, String(result)); >- }); >-}); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbol-abstract-relational-comparison.js b/LayoutTests/js/script-tests/symbol-abstract-relational-comparison.js >deleted file mode 100644 >index a2e775b126c4a21b3a601c5634057bda9a534cf3..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbol-abstract-relational-comparison.js >+++ /dev/null >@@ -1,37 +0,0 @@ >-description( >-"This tests Abstract Relatioal Comparison results with Symbols." >-); >- >-var symbol = Symbol("Cocoa"); >-// Test Abstract Relational Comparison. >-var relationalOperators = [ >- "<", "<=", ">", ">=" >-]; >-var object = {}; >-var array = []; >-var date = new Date(); >- >-relationalOperators.forEach(function (op) { >- var targets = [ >- "42", >- "NaN", >- "Infinity", >- "true", >- "false", >- "null", >- "undefined", >- "'Cappuccino'", >- "symbol", >- "Symbol.iterator", >- "object", >- "array", >- "date", >- ]; >- >- targets.forEach(function (target) { >- shouldThrow(target + " " + op + " symbol", "'TypeError: Type error'"); >- shouldThrow("symbol " + op + " " + target, "'TypeError: Type error'"); >- }); >-}); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbol-in-map.js b/LayoutTests/js/script-tests/symbol-in-map.js >deleted file mode 100644 >index f9df40fd7ac9a84bbc4a133b8caf98c2107b8109..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbol-in-map.js >+++ /dev/null >@@ -1,43 +0,0 @@ >-description( >-"This tests Symbols work in ES6 Map." >-); >- >-var symbol = Symbol("Cocoa"); >-var symbol2 = Symbol("Matcha"); >-var map = new Map(); >- >-map.set(symbol, "Cappuccino"); >-shouldBe("map.size", "1"); >-shouldBeEqualToString("map.get(symbol)", "Cappuccino"); >-shouldBeFalse("map.has(Symbol('Cocoa'))"); >-shouldBe("map.get(Symbol('Cocoa'))", "undefined"); >-shouldBeFalse("map.has('Cocoa')"); >-shouldBe("map.get('Cocoa')", "undefined"); >-shouldBeFalse("map.has(symbol2)"); >-shouldBe("map.get(symbol2)", "undefined"); >- >-map.set(symbol2, "Kilimanjaro"); >-shouldBe("map.size", "2"); >-shouldBeEqualToString("map.get(symbol)", "Cappuccino"); >-shouldBeEqualToString("map.get(symbol2)", "Kilimanjaro"); >-shouldBeFalse("map.has(Symbol('Matcha'))"); >-shouldBe("map.get(Symbol('Matcha'))", "undefined"); >-shouldBeFalse("map.has('Matcha')"); >-shouldBe("map.get('Matcha')", "undefined"); >- >-map.delete(symbol2); >-shouldBeFalse("map.has(symbol2)"); >-shouldBe("map.get(symbol2)", "undefined"); >-shouldBeTrue("map.has(symbol)"); >-shouldBeEqualToString("map.get(symbol)", "Cappuccino"); >- >-shouldBe("map.size", "1"); >-var key, value; >-map.forEach(function (v, k) { >- key = k; >- value = v; >-}); >-shouldBe("key", "symbol"); >-shouldBeEqualToString("value", "Cappuccino"); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbol-object.js b/LayoutTests/js/script-tests/symbol-object.js >deleted file mode 100644 >index 077c64e8d0995a0b95edecee231196c47daca14c..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbol-object.js >+++ /dev/null >@@ -1,34 +0,0 @@ >-description( >-"This tests Symbol object behaviors." >-); >- >-// Symbol constructor cannot be called with `new` style. >-// To create Symbol object, call `Object(symbol)`. >-shouldThrow("new Symbol", "\"TypeError: function is not a constructor (evaluating 'new Symbol')\""); >-shouldThrow("new Symbol('Cappuccino')", "\"TypeError: function is not a constructor (evaluating 'new Symbol('Cappuccino')')\""); >- >-var symbolObject = Object(Symbol.iterator); >-shouldBeTrue("symbolObject instanceof Symbol"); >-// Since Symbol object's @@toPrimitive returns Symbol value, >-// ToString(symbol) will be called. >-shouldThrow("String(symbolObject)", "'TypeError: Type error'"); >-shouldBeEqualToString("symbolObject.toString()", "Symbol(Symbol.iterator)"); >- >-var object = {}; >-object[symbolObject] = 42; >-// ToPropertyKey(symbolObject) will call toPrimitive(symbolObject), and toPrimitive(symbolObject) will return symbol primitive value. As a result, object[symbolObject] equals to object[symbol in the symbolObject]. >-shouldBe("object[symbolObject]", "42"); >-shouldBe("object['Symbol(Symbol.iterator)']", "undefined"); >-shouldBe("object[Symbol.iterator]", "42"); >- >-var symbol = Symbol("Matcha"); >-object[symbol] = 'Cocoa'; >-shouldBeEqualToString("object[symbol]", "Cocoa"); >-shouldBeEqualToString("object[symbol.valueOf()]", "Cocoa"); >-shouldBeEqualToString("object[Object(symbol)]", "Cocoa"); >-shouldBe("object['Matcha']", "undefined"); >- >-// ToObject will be called. >-shouldBe("Symbol.iterator.hello", "undefined"); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbol-prototype-is-ordinary-object.js b/LayoutTests/js/script-tests/symbol-prototype-is-ordinary-object.js >deleted file mode 100644 >index 9a8186e18e06c3e646eba03df0d75e8e71b48066..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbol-prototype-is-ordinary-object.js >+++ /dev/null >@@ -1,8 +0,0 @@ >-description( >-"This tests that Symbol.prototype object is ordinary object (not Symbol wrapper object)." >-); >- >-shouldThrow("Symbol.prototype.toString.call(Symbol.prototype)", "'TypeError: Type error'"); >-shouldBeEqualToString("Symbol.prototype.toString.call(Symbol.iterator)", "Symbol(Symbol.iterator)"); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbol-strict-equality-comparison.js b/LayoutTests/js/script-tests/symbol-strict-equality-comparison.js >deleted file mode 100644 >index b26ff60b71171c0125dfe296dfd8bde672611d2d..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbol-strict-equality-comparison.js >+++ /dev/null >@@ -1,49 +0,0 @@ >-description( >-"This tests Strict Equality Comparison results with Symbols." >-); >- >-var symbol = Symbol("Cocoa"); >-var symbolObject = Object(symbol); >-// Test Abstract Relational Comparison. >-var relationalOperators = [ >- "===", "!==" >-]; >-var object = {}; >-var array = []; >-var date = new Date(); >- >-function Pair(key, result) { >- return [ key, result ]; >-} >- >-relationalOperators.forEach(function (op) { >- var targets = [ >- Pair("42", false), >- Pair("NaN", false), >- Pair("Infinity", false), >- Pair("true", false), >- Pair("false", false), >- Pair("null", false), >- Pair("undefined", false), >- Pair("'Cappuccino'", false), >- Pair("symbol", true), >- Pair("Symbol.iterator", false), >- Pair("object", false), >- Pair("array", false), >- Pair("date", false), >- Pair("symbolObject", false), >- Pair("Symbol('Cocoa')", false), >- ]; >- >- targets.forEach(function (pair) { >- var target = pair[0]; >- var result = pair[1]; >- if (op === "!==") { >- result = !result; >- } >- shouldBe(target + " " + op + " symbol", String(result)); >- shouldBe("symbol " + op + " " + target, String(result)); >- }); >-}); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbol-tostring.js b/LayoutTests/js/script-tests/symbol-tostring.js >deleted file mode 100644 >index 71836da3456d1f2802be1f162314fd48896f6371..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbol-tostring.js >+++ /dev/null >@@ -1,14 +0,0 @@ >-description( >-"This tests that ToString(Symbol) behaviors." >-); >- >-shouldBeEqualToString("String(Symbol.iterator)", "Symbol(Symbol.iterator)"); >-shouldThrow("String(Symbol.prototype)", "'TypeError: Type error'"); >-shouldBeEqualToString("Symbol.prototype.toString.call(Symbol.iterator)", "Symbol(Symbol.iterator)"); >-shouldBeEqualToString("Symbol.prototype.toString.call(Symbol('hello'))", "Symbol(hello)"); >-shouldBeEqualToString("Symbol.prototype.toString.call(Symbol())", "Symbol()"); >-shouldBeEqualToString("Object.prototype.toString.call(Symbol())", "[object Symbol]"); >-shouldBeEqualToString("Object.prototype.toString.call(Symbol.prototype)", "[object Symbol]"); >-shouldBeEqualToString("Object.prototype.toString.call(Symbol)", "[object Function]"); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/script-tests/symbols.js b/LayoutTests/js/script-tests/symbols.js >deleted file mode 100644 >index e47a0e2edc535db2f5f70af910ef865fd37d212e..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/script-tests/symbols.js >+++ /dev/null >@@ -1,42 +0,0 @@ >-description( >-"This tests an early experimental implementation of ES6-esque Symbols." >-); >- >-function forIn(o) >-{ >- var a = []; >- for (x in o) >- a.push(x); >- return a; >-} >- >-var prop = Symbol("prop"); >-var o = {}; >- >-shouldBeFalse("prop in o"); >-shouldBeFalse("'prop' in o"); >-shouldBe("Object.getOwnPropertyNames(o).length", '0'); >-shouldBe("forIn(o)", '[]'); >- >-o[prop] = 42; >- >-shouldBeTrue("prop in o"); >-shouldBeFalse("'prop' in o"); >-shouldBe("Object.getOwnPropertyNames(o).length", '0'); >-shouldBe("forIn(o)", '[]'); >- >-o['prop'] = 101; >- >-shouldBe("o[prop]", '42'); >-shouldBe("o['prop']", '101'); >-shouldBe("Object.getOwnPropertyNames(o).length", '1'); >-shouldBe("forIn(o)", '["prop"]'); >- >-delete o[prop]; >- >-shouldBeFalse("prop in o"); >-shouldBeTrue("'prop' in o"); >-shouldBe("Object.getOwnPropertyNames(o).length", '1'); >-shouldBe("forIn(o)", '["prop"]'); >- >-successfullyParsed = true; >diff --git a/LayoutTests/js/symbol-abstract-equality-comparison-expected.txt b/LayoutTests/js/symbol-abstract-equality-comparison-expected.txt >deleted file mode 100644 >index 062b07e822992a049d783c0d124b2f0eadac84f3..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-abstract-equality-comparison-expected.txt >+++ /dev/null >@@ -1,69 +0,0 @@ >-This tests Abstract Equality Comparison results with Symbols. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS 42 == symbol is false >-PASS symbol == 42 is false >-PASS NaN == symbol is false >-PASS symbol == NaN is false >-PASS Infinity == symbol is false >-PASS symbol == Infinity is false >-PASS true == symbol is false >-PASS symbol == true is false >-PASS false == symbol is false >-PASS symbol == false is false >-PASS null == symbol is false >-PASS symbol == null is false >-PASS undefined == symbol is false >-PASS symbol == undefined is false >-PASS 'Cappuccino' == symbol is false >-PASS symbol == 'Cappuccino' is false >-PASS symbol == symbol is true >-PASS symbol == symbol is true >-PASS Symbol.iterator == symbol is false >-PASS symbol == Symbol.iterator is false >-PASS object == symbol is false >-PASS symbol == object is false >-PASS array == symbol is false >-PASS symbol == array is false >-PASS date == symbol is false >-PASS symbol == date is false >-PASS symbolObject == symbol is true >-PASS symbol == symbolObject is true >-PASS Symbol('Cocoa') == symbol is false >-PASS symbol == Symbol('Cocoa') is false >-PASS 42 != symbol is true >-PASS symbol != 42 is true >-PASS NaN != symbol is true >-PASS symbol != NaN is true >-PASS Infinity != symbol is true >-PASS symbol != Infinity is true >-PASS true != symbol is true >-PASS symbol != true is true >-PASS false != symbol is true >-PASS symbol != false is true >-PASS null != symbol is true >-PASS symbol != null is true >-PASS undefined != symbol is true >-PASS symbol != undefined is true >-PASS 'Cappuccino' != symbol is true >-PASS symbol != 'Cappuccino' is true >-PASS symbol != symbol is false >-PASS symbol != symbol is false >-PASS Symbol.iterator != symbol is true >-PASS symbol != Symbol.iterator is true >-PASS object != symbol is true >-PASS symbol != object is true >-PASS array != symbol is true >-PASS symbol != array is true >-PASS date != symbol is true >-PASS symbol != date is true >-PASS symbolObject != symbol is false >-PASS symbol != symbolObject is false >-PASS Symbol('Cocoa') != symbol is true >-PASS symbol != Symbol('Cocoa') is true >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbol-abstract-equality-comparison.html b/LayoutTests/js/symbol-abstract-equality-comparison.html >deleted file mode 100644 >index e40a3068c6e48c32a299b57a14480d38e3206307..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-abstract-equality-comparison.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbol-abstract-equality-comparison.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/js/symbol-abstract-relational-comparison-expected.txt b/LayoutTests/js/symbol-abstract-relational-comparison-expected.txt >deleted file mode 100644 >index 79071d3111d2400218730400ae98b288e07ce214..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-abstract-relational-comparison-expected.txt >+++ /dev/null >@@ -1,113 +0,0 @@ >-This tests Abstract Relatioal Comparison results with Symbols. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS 42 < symbol threw exception TypeError: Type error. >-PASS symbol < 42 threw exception TypeError: Type error. >-PASS NaN < symbol threw exception TypeError: Type error. >-PASS symbol < NaN threw exception TypeError: Type error. >-PASS Infinity < symbol threw exception TypeError: Type error. >-PASS symbol < Infinity threw exception TypeError: Type error. >-PASS true < symbol threw exception TypeError: Type error. >-PASS symbol < true threw exception TypeError: Type error. >-PASS false < symbol threw exception TypeError: Type error. >-PASS symbol < false threw exception TypeError: Type error. >-PASS null < symbol threw exception TypeError: Type error. >-PASS symbol < null threw exception TypeError: Type error. >-PASS undefined < symbol threw exception TypeError: Type error. >-PASS symbol < undefined threw exception TypeError: Type error. >-PASS 'Cappuccino' < symbol threw exception TypeError: Type error. >-PASS symbol < 'Cappuccino' threw exception TypeError: Type error. >-PASS symbol < symbol threw exception TypeError: Type error. >-PASS symbol < symbol threw exception TypeError: Type error. >-PASS Symbol.iterator < symbol threw exception TypeError: Type error. >-PASS symbol < Symbol.iterator threw exception TypeError: Type error. >-PASS object < symbol threw exception TypeError: Type error. >-PASS symbol < object threw exception TypeError: Type error. >-PASS array < symbol threw exception TypeError: Type error. >-PASS symbol < array threw exception TypeError: Type error. >-PASS date < symbol threw exception TypeError: Type error. >-PASS symbol < date threw exception TypeError: Type error. >-PASS 42 <= symbol threw exception TypeError: Type error. >-PASS symbol <= 42 threw exception TypeError: Type error. >-PASS NaN <= symbol threw exception TypeError: Type error. >-PASS symbol <= NaN threw exception TypeError: Type error. >-PASS Infinity <= symbol threw exception TypeError: Type error. >-PASS symbol <= Infinity threw exception TypeError: Type error. >-PASS true <= symbol threw exception TypeError: Type error. >-PASS symbol <= true threw exception TypeError: Type error. >-PASS false <= symbol threw exception TypeError: Type error. >-PASS symbol <= false threw exception TypeError: Type error. >-PASS null <= symbol threw exception TypeError: Type error. >-PASS symbol <= null threw exception TypeError: Type error. >-PASS undefined <= symbol threw exception TypeError: Type error. >-PASS symbol <= undefined threw exception TypeError: Type error. >-PASS 'Cappuccino' <= symbol threw exception TypeError: Type error. >-PASS symbol <= 'Cappuccino' threw exception TypeError: Type error. >-PASS symbol <= symbol threw exception TypeError: Type error. >-PASS symbol <= symbol threw exception TypeError: Type error. >-PASS Symbol.iterator <= symbol threw exception TypeError: Type error. >-PASS symbol <= Symbol.iterator threw exception TypeError: Type error. >-PASS object <= symbol threw exception TypeError: Type error. >-PASS symbol <= object threw exception TypeError: Type error. >-PASS array <= symbol threw exception TypeError: Type error. >-PASS symbol <= array threw exception TypeError: Type error. >-PASS date <= symbol threw exception TypeError: Type error. >-PASS symbol <= date threw exception TypeError: Type error. >-PASS 42 > symbol threw exception TypeError: Type error. >-PASS symbol > 42 threw exception TypeError: Type error. >-PASS NaN > symbol threw exception TypeError: Type error. >-PASS symbol > NaN threw exception TypeError: Type error. >-PASS Infinity > symbol threw exception TypeError: Type error. >-PASS symbol > Infinity threw exception TypeError: Type error. >-PASS true > symbol threw exception TypeError: Type error. >-PASS symbol > true threw exception TypeError: Type error. >-PASS false > symbol threw exception TypeError: Type error. >-PASS symbol > false threw exception TypeError: Type error. >-PASS null > symbol threw exception TypeError: Type error. >-PASS symbol > null threw exception TypeError: Type error. >-PASS undefined > symbol threw exception TypeError: Type error. >-PASS symbol > undefined threw exception TypeError: Type error. >-PASS 'Cappuccino' > symbol threw exception TypeError: Type error. >-PASS symbol > 'Cappuccino' threw exception TypeError: Type error. >-PASS symbol > symbol threw exception TypeError: Type error. >-PASS symbol > symbol threw exception TypeError: Type error. >-PASS Symbol.iterator > symbol threw exception TypeError: Type error. >-PASS symbol > Symbol.iterator threw exception TypeError: Type error. >-PASS object > symbol threw exception TypeError: Type error. >-PASS symbol > object threw exception TypeError: Type error. >-PASS array > symbol threw exception TypeError: Type error. >-PASS symbol > array threw exception TypeError: Type error. >-PASS date > symbol threw exception TypeError: Type error. >-PASS symbol > date threw exception TypeError: Type error. >-PASS 42 >= symbol threw exception TypeError: Type error. >-PASS symbol >= 42 threw exception TypeError: Type error. >-PASS NaN >= symbol threw exception TypeError: Type error. >-PASS symbol >= NaN threw exception TypeError: Type error. >-PASS Infinity >= symbol threw exception TypeError: Type error. >-PASS symbol >= Infinity threw exception TypeError: Type error. >-PASS true >= symbol threw exception TypeError: Type error. >-PASS symbol >= true threw exception TypeError: Type error. >-PASS false >= symbol threw exception TypeError: Type error. >-PASS symbol >= false threw exception TypeError: Type error. >-PASS null >= symbol threw exception TypeError: Type error. >-PASS symbol >= null threw exception TypeError: Type error. >-PASS undefined >= symbol threw exception TypeError: Type error. >-PASS symbol >= undefined threw exception TypeError: Type error. >-PASS 'Cappuccino' >= symbol threw exception TypeError: Type error. >-PASS symbol >= 'Cappuccino' threw exception TypeError: Type error. >-PASS symbol >= symbol threw exception TypeError: Type error. >-PASS symbol >= symbol threw exception TypeError: Type error. >-PASS Symbol.iterator >= symbol threw exception TypeError: Type error. >-PASS symbol >= Symbol.iterator threw exception TypeError: Type error. >-PASS object >= symbol threw exception TypeError: Type error. >-PASS symbol >= object threw exception TypeError: Type error. >-PASS array >= symbol threw exception TypeError: Type error. >-PASS symbol >= array threw exception TypeError: Type error. >-PASS date >= symbol threw exception TypeError: Type error. >-PASS symbol >= date threw exception TypeError: Type error. >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbol-abstract-relational-comparison.html b/LayoutTests/js/symbol-abstract-relational-comparison.html >deleted file mode 100644 >index 01b8bd35ddb1a888a8ba1fabfe2baf5f11dc7202..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-abstract-relational-comparison.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbol-abstract-relational-comparison.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/js/symbol-in-map-expected.txt b/LayoutTests/js/symbol-in-map-expected.txt >deleted file mode 100644 >index ed65e3b66806c58bf7b934136f48dcef156eccc1..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-in-map-expected.txt >+++ /dev/null >@@ -1,31 +0,0 @@ >-This tests Symbols work in ES6 Map. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS map.size is 1 >-PASS map.get(symbol) is "Cappuccino" >-PASS map.has(Symbol('Cocoa')) is false >-PASS map.get(Symbol('Cocoa')) is undefined >-PASS map.has('Cocoa') is false >-PASS map.get('Cocoa') is undefined >-PASS map.has(symbol2) is false >-PASS map.get(symbol2) is undefined >-PASS map.size is 2 >-PASS map.get(symbol) is "Cappuccino" >-PASS map.get(symbol2) is "Kilimanjaro" >-PASS map.has(Symbol('Matcha')) is false >-PASS map.get(Symbol('Matcha')) is undefined >-PASS map.has('Matcha') is false >-PASS map.get('Matcha') is undefined >-PASS map.has(symbol2) is false >-PASS map.get(symbol2) is undefined >-PASS map.has(symbol) is true >-PASS map.get(symbol) is "Cappuccino" >-PASS map.size is 1 >-PASS key is symbol >-PASS value is "Cappuccino" >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbol-in-map.html b/LayoutTests/js/symbol-in-map.html >deleted file mode 100644 >index 2bc15927a1ef3b55df18d16463fd0e40018f6def..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-in-map.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbol-in-map.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/js/symbol-object-expected.txt b/LayoutTests/js/symbol-object-expected.txt >deleted file mode 100644 >index 3d59d98d23682d4ebb7cdb68cfeb36edd4c08588..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-object-expected.txt >+++ /dev/null >@@ -1,22 +0,0 @@ >-This tests Symbol object behaviors. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS new Symbol threw exception TypeError: function is not a constructor (evaluating 'new Symbol'). >-PASS new Symbol('Cappuccino') threw exception TypeError: function is not a constructor (evaluating 'new Symbol('Cappuccino')'). >-PASS symbolObject instanceof Symbol is true >-PASS String(symbolObject) threw exception TypeError: Type error. >-PASS symbolObject.toString() is "Symbol(Symbol.iterator)" >-PASS object[symbolObject] is 42 >-PASS object['Symbol(Symbol.iterator)'] is undefined >-PASS object[Symbol.iterator] is 42 >-PASS object[symbol] is "Cocoa" >-PASS object[symbol.valueOf()] is "Cocoa" >-PASS object[Object(symbol)] is "Cocoa" >-PASS object['Matcha'] is undefined >-PASS Symbol.iterator.hello is undefined >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbol-object.html b/LayoutTests/js/symbol-object.html >deleted file mode 100644 >index 57109042877b1ed3e70baa395409d92af36a5e62..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-object.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbol-object.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/js/symbol-prototype-is-ordinary-object-expected.txt b/LayoutTests/js/symbol-prototype-is-ordinary-object-expected.txt >deleted file mode 100644 >index 8ff3c2b8bcccf6e635fc50f713354cd25bc53c2c..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-prototype-is-ordinary-object-expected.txt >+++ /dev/null >@@ -1,11 +0,0 @@ >-This tests that Symbol.prototype object is ordinary object (not Symbol wrapper object). >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS Symbol.prototype.toString.call(Symbol.prototype) threw exception TypeError: Type error. >-PASS Symbol.prototype.toString.call(Symbol.iterator) is "Symbol(Symbol.iterator)" >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbol-prototype-is-ordinary-object.html b/LayoutTests/js/symbol-prototype-is-ordinary-object.html >deleted file mode 100644 >index a2b100a1a31f31d7c033477db34fc62c2a3cce66..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-prototype-is-ordinary-object.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbol-prototype-is-ordinary-object.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/js/symbol-strict-equality-comparison-expected.txt b/LayoutTests/js/symbol-strict-equality-comparison-expected.txt >deleted file mode 100644 >index 9970ca985012d264626e63e5766ad0d02a15f900..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-strict-equality-comparison-expected.txt >+++ /dev/null >@@ -1,69 +0,0 @@ >-This tests Strict Equality Comparison results with Symbols. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS 42 === symbol is false >-PASS symbol === 42 is false >-PASS NaN === symbol is false >-PASS symbol === NaN is false >-PASS Infinity === symbol is false >-PASS symbol === Infinity is false >-PASS true === symbol is false >-PASS symbol === true is false >-PASS false === symbol is false >-PASS symbol === false is false >-PASS null === symbol is false >-PASS symbol === null is false >-PASS undefined === symbol is false >-PASS symbol === undefined is false >-PASS 'Cappuccino' === symbol is false >-PASS symbol === 'Cappuccino' is false >-PASS symbol === symbol is true >-PASS symbol === symbol is true >-PASS Symbol.iterator === symbol is false >-PASS symbol === Symbol.iterator is false >-PASS object === symbol is false >-PASS symbol === object is false >-PASS array === symbol is false >-PASS symbol === array is false >-PASS date === symbol is false >-PASS symbol === date is false >-PASS symbolObject === symbol is false >-PASS symbol === symbolObject is false >-PASS Symbol('Cocoa') === symbol is false >-PASS symbol === Symbol('Cocoa') is false >-PASS 42 !== symbol is true >-PASS symbol !== 42 is true >-PASS NaN !== symbol is true >-PASS symbol !== NaN is true >-PASS Infinity !== symbol is true >-PASS symbol !== Infinity is true >-PASS true !== symbol is true >-PASS symbol !== true is true >-PASS false !== symbol is true >-PASS symbol !== false is true >-PASS null !== symbol is true >-PASS symbol !== null is true >-PASS undefined !== symbol is true >-PASS symbol !== undefined is true >-PASS 'Cappuccino' !== symbol is true >-PASS symbol !== 'Cappuccino' is true >-PASS symbol !== symbol is false >-PASS symbol !== symbol is false >-PASS Symbol.iterator !== symbol is true >-PASS symbol !== Symbol.iterator is true >-PASS object !== symbol is true >-PASS symbol !== object is true >-PASS array !== symbol is true >-PASS symbol !== array is true >-PASS date !== symbol is true >-PASS symbol !== date is true >-PASS symbolObject !== symbol is true >-PASS symbol !== symbolObject is true >-PASS Symbol('Cocoa') !== symbol is true >-PASS symbol !== Symbol('Cocoa') is true >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbol-strict-equality-comparison.html b/LayoutTests/js/symbol-strict-equality-comparison.html >deleted file mode 100644 >index cba86d6526392550d9f32fe2136abf3b62665db9..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-strict-equality-comparison.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbol-strict-equality-comparison.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/js/symbol-tostring-expected.txt b/LayoutTests/js/symbol-tostring-expected.txt >deleted file mode 100644 >index be39daf19c2ae3a439e305ccf5f5532e0134a06f..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-tostring-expected.txt >+++ /dev/null >@@ -1,17 +0,0 @@ >-This tests that ToString(Symbol) behaviors. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS String(Symbol.iterator) is "Symbol(Symbol.iterator)" >-PASS String(Symbol.prototype) threw exception TypeError: Type error. >-PASS Symbol.prototype.toString.call(Symbol.iterator) is "Symbol(Symbol.iterator)" >-PASS Symbol.prototype.toString.call(Symbol('hello')) is "Symbol(hello)" >-PASS Symbol.prototype.toString.call(Symbol()) is "Symbol()" >-PASS Object.prototype.toString.call(Symbol()) is "[object Symbol]" >-PASS Object.prototype.toString.call(Symbol.prototype) is "[object Symbol]" >-PASS Object.prototype.toString.call(Symbol) is "[object Function]" >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbol-tostring.html b/LayoutTests/js/symbol-tostring.html >deleted file mode 100644 >index bcd176b92444194edd3da4925b2a16f6c593c36e..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbol-tostring.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbol-tostring.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/js/symbols-expected.txt b/LayoutTests/js/symbols-expected.txt >deleted file mode 100644 >index 0a84e70a00bc2b1d0af80a2a5affd9c059cfb885..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbols-expected.txt >+++ /dev/null >@@ -1,25 +0,0 @@ >-This tests an early experimental implementation of ES6-esque Symbols. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS prop in o is false >-PASS 'prop' in o is false >-PASS Object.getOwnPropertyNames(o).length is 0 >-PASS forIn(o) is [] >-PASS prop in o is true >-PASS 'prop' in o is false >-PASS Object.getOwnPropertyNames(o).length is 0 >-PASS forIn(o) is [] >-PASS o[prop] is 42 >-PASS o['prop'] is 101 >-PASS Object.getOwnPropertyNames(o).length is 1 >-PASS forIn(o) is ["prop"] >-PASS prop in o is false >-PASS 'prop' in o is true >-PASS Object.getOwnPropertyNames(o).length is 1 >-PASS forIn(o) is ["prop"] >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/js/symbols.html b/LayoutTests/js/symbols.html >deleted file mode 100644 >index 4113455ea87725393c76cfee2b23876d52e595b1..0000000000000000000000000000000000000000 >--- a/LayoutTests/js/symbols.html >+++ /dev/null >@@ -1,10 +0,0 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >-<html> >-<head> >-<script src="../resources/js-test-pre.js"></script> >-</head> >-<body> >-<script src="script-tests/symbols.js"></script> >-<script src="../resources/js-test-post.js"></script> >-</body> >-</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 141859
:
247012
|
247022
|
247029
|
247043
|
247045
|
247113
|
247117
|
247120
|
247127
|
247208
|
247209
|
247210