Changeset 180551 in webkit
- Timestamp:
- Feb 23, 2015 11:27:24 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 11 deleted
- 79 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r180550 r180551 1 2015-02-23 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r180547 and r180550. 4 https://bugs.webkit.org/show_bug.cgi?id=141957 5 6 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit). 7 8 Reverted changesets: 9 10 "REGRESSION(r179429): Can't type comments in Facebook" 11 https://bugs.webkit.org/show_bug.cgi?id=141859 12 http://trac.webkit.org/changeset/180547 13 14 "Constructor returning null should construct an object instead 15 of null" 16 https://bugs.webkit.org/show_bug.cgi?id=141640 17 http://trac.webkit.org/changeset/180550 18 1 19 2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com> 2 20 -
trunk/Source/JavaScriptCore/ChangeLog
r180550 r180551 1 2015-02-23 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r180547 and r180550. 4 https://bugs.webkit.org/show_bug.cgi?id=141957 5 6 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit). 7 8 Reverted changesets: 9 10 "REGRESSION(r179429): Can't type comments in Facebook" 11 https://bugs.webkit.org/show_bug.cgi?id=141859 12 http://trac.webkit.org/changeset/180547 13 14 "Constructor returning null should construct an object instead 15 of null" 16 https://bugs.webkit.org/show_bug.cgi?id=141640 17 http://trac.webkit.org/changeset/180550 18 1 19 2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com> 2 20 -
trunk/Source/JavaScriptCore/JavaScriptCore.order
r180550 r180551 638 638 _JSGlobalContextCreateInGroup 639 639 __ZN3JSC14JSGlobalObjectC1ERNS_2VMEPNS_9StructureEPKNS_23GlobalObjectMethodTableE 640 __ZN3JSC14JSGlobalObject28javaScriptExperimentsEnabledEPKS0_ 640 641 _JSGlobalContextRetain 641 642 _JSStringCreateWithCFString … … 1349 1350 __ZN3JSC11PostfixNode11emitResolveERNS_17BytecodeGeneratorEPNS_10RegisterIDE 1350 1351 __ZN3JSC17BytecodeGenerator7emitIncEPNS_10RegisterIDE 1352 __ZN3JSC14jsIsObjectTypeEPNS_9ExecStateENS_7JSValueE 1351 1353 __ZN3JSC6JSCell11getCallDataEPS0_RNS_8CallDataE 1352 1354 __ZN3JSC8JSObject16getPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE … … 1665 1667 _cti_op_stricteq 1666 1668 _cti_op_jtrue 1667 _cti_op_is_object _or_null1669 _cti_op_is_object 1668 1670 __ZN3JSC8JSString12toThisObjectEPNS_6JSCellEPNS_9ExecStateE 1669 1671 __ZN3JSC12StringObjectC1ERNS_2VMEPNS_9StructureE … … 2963 2965 __ZN3WTF15BinarySemaphore4waitEd 2964 2966 __ZN3WTF15BinarySemaphore6signalEv 2967 _JSValueIsObject 2965 2968 __ZN3JSCL19arrayProtoFuncShiftEPNS_9ExecStateE 2966 2969 __ZN3JSC5shiftILNS_7JSArray14ShiftCountModeE0EEEvPNS_9ExecStateEPNS_8JSObjectEjjjj … … 3389 3392 __ZN3JSC8JSObject20ensureContiguousSlowERNS_2VMENS0_22DoubleToContiguousModeE 3390 3393 _operationMakeRope3 3394 _operationIsObject 3391 3395 __ZN3JSC3DFG12slowPathCallINS_22AbstractMacroAssemblerINS_12X86AssemblerEE4JumpEPFxPNS_9ExecStateExPNS_7JSArrayEENS0_11NoResultTagENS_12X86Registers10RegisterIDESE_SE_EEN3WTF10PassOwnPtrINS0_17SlowPathGeneratorEEET_PNS0_14SpeculativeJITET0_T1_T2_T3_T4_NS0_18SpillRegistersModeE 3392 3396 __ZN3JSC3DFG14SpeculativeJIT13callOperationEPFxPNS_9ExecStateExPNS_7JSArrayEENS_12X86Registers10RegisterIDES9_S9_ … … 4895 4899 _llint_slow_path_instanceof 4896 4900 _llint_slow_path_typeof 4897 _llint_slow_path_is_object _or_null4901 _llint_slow_path_is_object 4898 4902 _llint_slow_path_is_function 4899 4903 _llint_slow_path_in … … 5033 5037 _llint_op_mod 5034 5038 _llint_op_typeof 5035 _llint_op_is_object _or_null5039 _llint_op_is_object 5036 5040 _llint_op_is_function 5037 5041 _llint_op_in -
trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
r180547 r180551 1612 1612 <ClInclude Include="..\runtime\RegExpPrototype.h" /> 1613 1613 <ClInclude Include="..\runtime\Reject.h" /> 1614 <ClInclude Include="..\runtime\RuntimeFlags.h" />1615 1614 <ClInclude Include="..\runtime\SamplingCounter.h" /> 1616 1615 <ClInclude Include="..\runtime\SetConstructor.h" /> -
trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
r180547 r180551 2863 2863 <Filter>runtime</Filter> 2864 2864 </ClInclude> 2865 <ClInclude Include="..\runtime\RuntimeFlags.h">2866 <Filter>runtime</Filter>2867 </ClInclude>2868 2865 <ClInclude Include="..\runtime\SamplingCounter.h"> 2869 2866 <Filter>runtime</Filter> -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r180547 r180551 950 950 705B41B11A6E501E00716757 /* SymbolPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 705B41A91A6E501E00716757 /* SymbolPrototype.cpp */; }; 951 951 705B41B21A6E501E00716757 /* SymbolPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 705B41AA1A6E501E00716757 /* SymbolPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; }; 952 70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 70B0A9D01A9B66200001306A /* RuntimeFlags.h */; settings = {ATTRIBUTES = (Private, ); }; };953 952 7C008CD2186F8A9300955C24 /* JSPromiseFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */; }; 954 953 7C008CD3186F8A9300955C24 /* JSPromiseFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C008CD1186F8A9300955C24 /* JSPromiseFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 2630 2629 705B41A91A6E501E00716757 /* SymbolPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolPrototype.cpp; sourceTree = "<group>"; }; 2631 2630 705B41AA1A6E501E00716757 /* SymbolPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolPrototype.h; sourceTree = "<group>"; }; 2632 70B0A9D01A9B66200001306A /* RuntimeFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeFlags.h; sourceTree = "<group>"; };2633 2631 7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSPromiseFunctions.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 2634 2632 7C008CD1186F8A9300955C24 /* JSPromiseFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromiseFunctions.h; sourceTree = "<group>"; }; … … 4539 4537 0F6B1CB81861244C00845D97 /* RegisterPreservationMode.h */, 4540 4538 0FB7F39115ED8E3800F167B2 /* Reject.h */, 4541 70B0A9D01A9B66200001306A /* RuntimeFlags.h */,4542 4539 0F7700911402FF280078EB39 /* SamplingCounter.cpp */, 4543 4540 0F77008E1402FDD60078EB39 /* SamplingCounter.h */, … … 6279 6276 0FF42748158EBE91004CB9FF /* udis86_syn.h in Headers */, 6280 6277 0FF42749158EBE91004CB9FF /* udis86_types.h in Headers */, 6281 70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */,6282 6278 A7E5AB391799E4B200D2833D /* UDis86Disassembler.h in Headers */, 6283 6279 A7A8AF4117ADB5F3005AB174 /* Uint16Array.h in Headers */, -
trunk/Source/JavaScriptCore/bytecode/BytecodeList.json
r180550 r180551 54 54 { "name" : "op_is_string", "length" : 3 }, 55 55 { "name" : "op_is_object", "length" : 3 }, 56 { "name" : "op_is_object_or_null", "length" : 3 },57 56 { "name" : "op_is_function", "length" : 3 }, 58 57 { "name" : "op_in", "length" : 4 }, -
trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h
r180550 r180551 134 134 case op_is_string: 135 135 case op_is_object: 136 case op_is_object_or_null:137 136 case op_is_function: 138 137 case op_to_number: … … 334 333 case op_is_string: 335 334 case op_is_object: 336 case op_is_object_or_null:337 335 case op_is_function: 338 336 case op_in: -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r180550 r180551 1007 1007 case op_is_object: { 1008 1008 printUnaryOp(out, exec, location, it, "is_object"); 1009 break;1010 }1011 case op_is_object_or_null: {1012 printUnaryOp(out, exec, location, it, "is_object_or_null");1013 1009 break; 1014 1010 } -
trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp
r180550 r180551 361 361 // If the structure corresponds to something that isn't an object, then give up, since 362 362 // we don't want to be adding properties to strings. 363 if ( !structure->typeInfo().isObject())363 if (structure->typeInfo().type() == StringType) 364 364 return PutByIdStatus(TakesSlowPath); 365 365 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r180550 r180551 1097 1097 if (value == "object") { 1098 1098 rewindUnaryOp(); 1099 emitOpcode(op_is_object _or_null);1099 emitOpcode(op_is_object); 1100 1100 instructions().append(dst->index()); 1101 1101 instructions().append(srcIndex); … … 1942 1942 1943 1943 size_t begin = instructions().size(); 1944 emitOpcode(op_jtrue); 1945 instructions().append(isObjectRegister->index()); 1946 instructions().append(isObjectLabel->bind(begin, instructions().size())); 1947 1948 emitOpcode(op_is_function); 1949 instructions().append(isObjectRegister->index()); 1950 instructions().append(src->index()); 1951 1952 begin = instructions().size(); 1944 1953 emitOpcode(op_jtrue); 1945 1954 instructions().append(isObjectRegister->index()); -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r180550 r180551 801 801 case IsString: 802 802 case IsObject: 803 case IsObjectOrNull:804 803 case IsFunction: { 805 804 JSValue child = forNode(node->child1()).value(); … … 823 822 break; 824 823 case IsObject: 825 setConstant(node, jsBoolean(child.isObject()));826 break;827 case IsObjectOrNull:828 824 if (child.isNull() || !child.isObject()) { 829 825 setConstant(node, jsBoolean(child.isNull())); -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r180550 r180551 2886 2886 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(IsObject, value)); 2887 2887 NEXT_OPCODE(op_is_object); 2888 }2889 2890 case op_is_object_or_null: {2891 Node* value = get(VirtualRegister(currentInstruction[2].u.operand));2892 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(IsObjectOrNull, value));2893 NEXT_OPCODE(op_is_object_or_null);2894 2888 } 2895 2889 -
trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp
r180550 r180551 133 133 case op_is_string: 134 134 case op_is_object: 135 case op_is_object_or_null:136 135 case op_is_function: 137 136 case op_not: -
trunk/Source/JavaScriptCore/dfg/DFGClobberize.h
r180550 r180551 138 138 case IsNumber: 139 139 case IsString: 140 case IsObject:141 140 case LogicalNot: 142 141 case CheckInBounds: … … 342 341 return; 343 342 344 case IsObject OrNull:343 case IsObject: 345 344 read(MiscFields); 346 def(HeapLocation(IsObject OrNullLoc, MiscFields, node->child1()), node);345 def(HeapLocation(IsObjectLoc, MiscFields, node->child1()), node); 347 346 return; 348 347 -
trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp
r180550 r180551 136 136 case IsString: 137 137 case IsObject: 138 case IsObjectOrNull:139 138 case IsFunction: 140 139 case TypeOf: -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r180550 r180551 1090 1090 break; 1091 1091 1092 case IsObject:1093 if (node->child1()->shouldSpeculateObject()) {1094 m_insertionSet.insertNode(1095 m_indexInBlock, SpecNone, Phantom, node->origin,1096 Edge(node->child1().node(), ObjectUse));1097 m_graph.convertToConstant(node, jsBoolean(true));1098 observeUseKindOnNode<ObjectUse>(node);1099 }1100 break;1101 1102 1092 case GetEnumerableLength: { 1103 1093 fixEdge<CellUse>(node->child1()); … … 1241 1231 case IsBoolean: 1242 1232 case IsNumber: 1243 case IsObject OrNull:1233 case IsObject: 1244 1234 case IsFunction: 1245 1235 case CreateArguments: -
trunk/Source/JavaScriptCore/dfg/DFGHeapLocation.cpp
r180550 r180551 61 61 return; 62 62 63 case IsObject OrNullLoc:64 out.print("IsObject OrNullLoc");63 case IsObjectLoc: 64 out.print("IsObjectLoc"); 65 65 return; 66 66 67 67 case IsFunctionLoc: 68 68 out.print("IsFunctionLoc"); -
trunk/Source/JavaScriptCore/dfg/DFGHeapLocation.h
r180550 r180551 51 51 InvalidationPointLoc, 52 52 IsFunctionLoc, 53 IsObject OrNullLoc,53 IsObjectLoc, 54 54 MyArgumentByValLoc, 55 55 MyArgumentsLengthLoc, -
trunk/Source/JavaScriptCore/dfg/DFGNodeType.h
r180550 r180551 251 251 macro(IsString, NodeResultBoolean) \ 252 252 macro(IsObject, NodeResultBoolean) \ 253 macro(IsObjectOrNull, NodeResultBoolean) \254 253 macro(IsFunction, NodeResultBoolean) \ 255 254 macro(TypeOf, NodeResultJS) \ -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r180550 r180551 809 809 } 810 810 811 size_t JIT_OPERATION operationIsObject OrNull(ExecState* exec, EncodedJSValue value)812 { 813 return jsIsObjectType OrNull(exec, JSValue::decode(value));811 size_t JIT_OPERATION operationIsObject(ExecState* exec, EncodedJSValue value) 812 { 813 return jsIsObjectType(exec, JSValue::decode(value)); 814 814 } 815 815 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r180550 r180551 103 103 JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSScope*, JSCell*) WTF_INTERNAL; 104 104 double JIT_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL; 105 size_t JIT_OPERATION operationIsObject OrNull(ExecState*, EncodedJSValue) WTF_INTERNAL;105 size_t JIT_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL; 106 106 size_t JIT_OPERATION operationIsFunction(EncodedJSValue) WTF_INTERNAL; 107 107 JSCell* JIT_OPERATION operationTypeOf(ExecState*, JSCell*) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
r180550 r180551 359 359 case IsString: 360 360 case IsObject: 361 case IsObjectOrNull:362 361 case IsFunction: { 363 362 changed |= setPrediction(SpecBoolean); -
trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
r180550 r180551 211 211 case IsString: 212 212 case IsObject: 213 case IsObjectOrNull:214 213 case IsFunction: 215 214 case TypeOf: -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r180550 r180551 1158 1158 if (m_state.forNode(node->child1()).m_type & ~SpecObject) { 1159 1159 speculationCheck( 1160 BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), branchNotObject(op1GPR)); 1160 BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), 1161 m_jit.branchStructurePtr( 1162 MacroAssembler::Equal, 1163 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1164 m_jit.vm()->stringStructure.get())); 1161 1165 } 1162 1166 if (m_state.forNode(node->child2()).m_type & ~SpecObject) { 1163 1167 speculationCheck( 1164 BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), branchNotObject(op2GPR)); 1168 BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), 1169 m_jit.branchStructurePtr( 1170 MacroAssembler::Equal, 1171 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1172 m_jit.vm()->stringStructure.get())); 1165 1173 } 1166 1174 } else { 1175 GPRTemporary structure(this); 1176 GPRTemporary temp(this); 1177 GPRReg structureGPR = structure.gpr(); 1178 1179 m_jit.emitLoadStructure(op1GPR, structureGPR, temp.gpr()); 1167 1180 if (m_state.forNode(node->child1()).m_type & ~SpecObject) { 1168 1181 speculationCheck( 1169 1182 BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), 1170 branchNotObject(op1GPR)); 1183 m_jit.branchPtr( 1184 MacroAssembler::Equal, 1185 structureGPR, 1186 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1171 1187 } 1172 1188 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), … … 1176 1192 MacroAssembler::TrustedImm32(MasqueradesAsUndefined))); 1177 1193 1194 m_jit.emitLoadStructure(op2GPR, structureGPR, temp.gpr()); 1178 1195 if (m_state.forNode(node->child2()).m_type & ~SpecObject) { 1179 1196 speculationCheck( 1180 1197 BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), 1181 branchNotObject(op2GPR)); 1198 m_jit.branchPtr( 1199 MacroAssembler::Equal, 1200 structureGPR, 1201 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1182 1202 } 1183 1203 speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), … … 3944 3964 MacroAssembler::Equal, leftGPR, rightRegs.payloadGPR())); 3945 3965 3946 fastFalse.append(branchNotString(rightRegs.payloadGPR())); 3966 fastFalse.append(m_jit.branchStructurePtr( 3967 MacroAssembler::NotEqual, 3968 MacroAssembler::Address(rightRegs.payloadGPR(), JSCell::structureIDOffset()), 3969 m_jit.vm()->stringStructure.get())); 3947 3970 3948 3971 compileStringEquality( … … 3992 4015 JITCompiler::JumpList notString; 3993 4016 notString.append(branchNotCell(rightRegs)); 3994 notString.append(branchNotString(rightRegs.payloadGPR())); 4017 notString.append(m_jit.branchStructurePtr( 4018 MacroAssembler::NotEqual, 4019 MacroAssembler::Address(rightRegs.payloadGPR(), JSCell::structureIDOffset()), 4020 m_jit.vm()->stringStructure.get())); 3995 4021 3996 4022 speculateStringIdentAndLoadStorage(notStringVarEdge, rightRegs.payloadGPR(), rightTempGPR); … … 4435 4461 m_jit.load32(JITCompiler::Address(op1GPR, JSCell::structureIDOffset()), resultGPR); 4436 4462 JITCompiler::Jump isString = m_jit.branchStructurePtr( 4437 JITCompiler::Equal, 4463 JITCompiler::Equal, 4438 4464 resultGPR, 4439 4465 m_jit.vm()->stringStructure.get()); 4440 4466 4441 4467 speculateStringObjectForStructure(node->child1(), resultGPR); 4442 4468 … … 4464 4490 JITCompiler::Jump done; 4465 4491 if (node->child1()->prediction() & SpecString) { 4466 JITCompiler::Jump needCall = branchNotString(op1GPR); 4492 JITCompiler::Jump needCall = m_jit.branchStructurePtr( 4493 JITCompiler::NotEqual, 4494 JITCompiler::Address(op1GPR, JSCell::structureIDOffset()), 4495 m_jit.vm()->stringStructure.get()); 4467 4496 m_jit.move(op1GPR, resultGPR); 4468 4497 done = m_jit.jump(); … … 4688 4717 GPRReg gpr = operand.gpr(); 4689 4718 DFG_TYPE_CHECK( 4690 JSValueSource::unboxedCell(gpr), edge, SpecObject, branchNotObject(gpr)); 4719 JSValueSource::unboxedCell(gpr), edge, SpecObject, m_jit.branchStructurePtr( 4720 MacroAssembler::Equal, 4721 MacroAssembler::Address(gpr, JSCell::structureIDOffset()), 4722 m_jit.vm()->stringStructure.get())); 4691 4723 } 4692 4724 … … 4720 4752 GPRReg gpr = operand.jsValueRegs().payloadGPR(); 4721 4753 DFG_TYPE_CHECK( 4722 operand.jsValueRegs(), edge, (~SpecCell) | SpecObject, branchNotObject(gpr)); 4754 operand.jsValueRegs(), edge, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 4755 MacroAssembler::Equal, 4756 MacroAssembler::Address(gpr, JSCell::structureIDOffset()), 4757 m_jit.vm()->stringStructure.get())); 4723 4758 MacroAssembler::Jump done = m_jit.jump(); 4724 4759 notCell.link(&m_jit); … … 4734 4769 { 4735 4770 DFG_TYPE_CHECK( 4736 JSValueSource::unboxedCell(cell), edge, SpecString | ~SpecCell, branchNotString(cell)); 4771 JSValueSource::unboxedCell(cell), edge, SpecString | ~SpecCell, 4772 m_jit.branchStructurePtr( 4773 MacroAssembler::NotEqual, 4774 MacroAssembler::Address(cell, JSCell::structureIDOffset()), 4775 m_jit.vm()->stringStructure.get())); 4737 4776 } 4738 4777 … … 4839 4878 GPRReg cell = operand.jsValueRegs().payloadGPR(); 4840 4879 4841 JITCompiler::Jump notString = branchNotString(cell); 4880 JITCompiler::Jump notString = m_jit.branchStructurePtr( 4881 MacroAssembler::NotEqual, 4882 MacroAssembler::Address(cell, JSCell::structureIDOffset()), 4883 m_jit.vm()->stringStructure.get()); 4842 4884 4843 4885 speculateStringIdentAndLoadStorage(edge, cell, tempGPR); … … 5115 5157 addBranch(branchNotCell(op1Regs), data->fallThrough.block); 5116 5158 5117 addBranch(branchNotString(op1Regs.payloadGPR()), data->fallThrough.block); 5159 addBranch( 5160 m_jit.branchStructurePtr( 5161 MacroAssembler::NotEqual, 5162 MacroAssembler::Address(op1Regs.payloadGPR(), JSCell::structureIDOffset()), 5163 m_jit.vm()->stringStructure.get()), 5164 data->fallThrough.block); 5118 5165 5119 5166 emitSwitchCharStringJump(data, op1Regs.payloadGPR(), tempGPR); … … 5400 5447 addBranch(branchNotCell(op1Regs), data->fallThrough.block); 5401 5448 5402 addBranch(branchNotString(op1Regs.payloadGPR()), data->fallThrough.block); 5449 addBranch( 5450 m_jit.branchStructurePtr( 5451 MacroAssembler::NotEqual, 5452 MacroAssembler::Address(op1Regs.payloadGPR(), JSCell::structureIDOffset()), 5453 m_jit.vm()->stringStructure.get()), 5454 data->fallThrough.block); 5403 5455 5404 5456 emitSwitchStringOnString(data, op1Regs.payloadGPR()); … … 5448 5500 branch.jump.linkTo(m_jit.blockHeads()[branch.destination->index], &m_jit); 5449 5501 } 5450 }5451 5452 JITCompiler::Jump SpeculativeJIT::branchIsObject(GPRReg cellGPR)5453 {5454 return m_jit.branch8(5455 MacroAssembler::AboveOrEqual,5456 MacroAssembler::Address(cellGPR, JSCell::typeInfoTypeOffset()),5457 MacroAssembler::TrustedImm32(ObjectType));5458 }5459 5460 JITCompiler::Jump SpeculativeJIT::branchNotObject(GPRReg cellGPR)5461 {5462 return m_jit.branch8(5463 MacroAssembler::Below,5464 MacroAssembler::Address(cellGPR, JSCell::typeInfoTypeOffset()),5465 MacroAssembler::TrustedImm32(ObjectType));5466 }5467 5468 JITCompiler::Jump SpeculativeJIT::branchIsString(GPRReg cellGPR)5469 {5470 return m_jit.branchStructurePtr(5471 MacroAssembler::Equal,5472 MacroAssembler::Address(cellGPR, JSCell::structureIDOffset()),5473 m_jit.vm()->stringStructure.get());5474 }5475 5476 JITCompiler::Jump SpeculativeJIT::branchNotString(GPRReg cellGPR)5477 {5478 return m_jit.branchStructurePtr(5479 MacroAssembler::NotEqual,5480 MacroAssembler::Address(cellGPR, JSCell::structureIDOffset()),5481 m_jit.vm()->stringStructure.get());5482 5502 } 5483 5503 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r180550 r180551 2192 2192 JITCompiler::Jump branchIsOther(JSValueRegs, GPRReg tempGPR); 2193 2193 JITCompiler::Jump branchNotOther(JSValueRegs, GPRReg tempGPR); 2194 JITCompiler::Jump branchIsObject(GPRReg cellGPR);2195 JITCompiler::Jump branchNotObject(GPRReg cellGPR);2196 JITCompiler::Jump branchIsString(GPRReg cellGPR);2197 JITCompiler::Jump branchNotString(GPRReg cellGPR);2198 2194 2199 2195 void moveTrueTo(GPRReg); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r180550 r180551 1201 1201 if (masqueradesAsUndefinedWatchpointIsStillValid()) { 1202 1202 DFG_TYPE_CHECK( 1203 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR)); 1203 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchPtr( 1204 MacroAssembler::Equal, 1205 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1206 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1204 1207 DFG_TYPE_CHECK( 1205 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR)); 1208 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchPtr( 1209 MacroAssembler::Equal, 1210 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1211 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1206 1212 } else { 1207 1213 DFG_TYPE_CHECK( 1208 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR)); 1209 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), 1214 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchPtr( 1215 MacroAssembler::Equal, 1216 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1217 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1218 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), 1210 1219 m_jit.branchTest8( 1211 1220 MacroAssembler::NonZero, 1212 MacroAssembler::Address(op1GPR, JSCell::typeInfoFlagsOffset()), 1221 MacroAssembler::Address(op1GPR, JSCell::typeInfoFlagsOffset()), 1213 1222 MacroAssembler::TrustedImm32(MasqueradesAsUndefined))); 1214 1223 1215 1224 DFG_TYPE_CHECK( 1216 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR)); 1217 speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), 1225 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchPtr( 1226 MacroAssembler::Equal, 1227 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1228 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1229 speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), 1218 1230 m_jit.branchTest8( 1219 MacroAssembler::NonZero, 1220 MacroAssembler::Address(op2GPR, JSCell::typeInfoFlagsOffset()), 1231 MacroAssembler::NonZero, 1232 MacroAssembler::Address(op2GPR, JSCell::typeInfoFlagsOffset()), 1221 1233 MacroAssembler::TrustedImm32(MasqueradesAsUndefined))); 1222 1234 } … … 1251 1263 if (masqueradesAsUndefinedWatchpointValid) { 1252 1264 DFG_TYPE_CHECK( 1253 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1265 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr( 1266 MacroAssembler::Equal, 1267 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1268 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1254 1269 } else { 1255 1270 DFG_TYPE_CHECK( 1256 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1271 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr( 1272 MacroAssembler::Equal, 1273 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1274 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1257 1275 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild, 1258 1276 m_jit.branchTest8( … … 1270 1288 if (masqueradesAsUndefinedWatchpointValid) { 1271 1289 DFG_TYPE_CHECK( 1272 JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2PayloadGPR)); 1290 JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, 1291 m_jit.branchPtr( 1292 MacroAssembler::Equal, 1293 MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()), 1294 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1273 1295 } else { 1274 1296 DFG_TYPE_CHECK( 1275 JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2PayloadGPR)); 1297 JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, 1298 m_jit.branchPtr( 1299 MacroAssembler::Equal, 1300 MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()), 1301 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1276 1302 speculationCheck(BadType, JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, 1277 1303 m_jit.branchTest8( … … 1330 1356 if (masqueradesAsUndefinedWatchpointValid) { 1331 1357 DFG_TYPE_CHECK( 1332 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1358 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr( 1359 MacroAssembler::Equal, 1360 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1361 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1333 1362 } else { 1334 1363 DFG_TYPE_CHECK( 1335 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1364 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr( 1365 MacroAssembler::Equal, 1366 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1367 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1336 1368 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild, 1337 1369 m_jit.branchTest8( … … 1349 1381 DFG_TYPE_CHECK( 1350 1382 JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, 1351 branchNotObject(op2PayloadGPR)); 1383 m_jit.branchPtr( 1384 MacroAssembler::Equal, 1385 MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()), 1386 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1352 1387 } else { 1353 1388 DFG_TYPE_CHECK( 1354 1389 JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, 1355 branchNotObject(op2PayloadGPR)); 1390 m_jit.branchPtr( 1391 MacroAssembler::Equal, 1392 MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()), 1393 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1356 1394 speculationCheck(BadType, JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, 1357 1395 m_jit.branchTest8( … … 1437 1475 DFG_TYPE_CHECK( 1438 1476 JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject, 1439 branchNotObject(valuePayloadGPR)); 1477 m_jit.branchPtr( 1478 MacroAssembler::Equal, 1479 MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), 1480 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1440 1481 } else { 1482 m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), structureGPR); 1483 1441 1484 DFG_TYPE_CHECK( 1442 1485 JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject, 1443 branchNotObject(valuePayloadGPR)); 1486 m_jit.branchPtr( 1487 MacroAssembler::Equal, 1488 structureGPR, 1489 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1444 1490 1445 1491 MacroAssembler::Jump isNotMasqueradesAsUndefined = … … 1449 1495 MacroAssembler::TrustedImm32(MasqueradesAsUndefined)); 1450 1496 1451 m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), structureGPR);1452 1497 speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, 1453 1498 m_jit.branchPtr( … … 1559 1604 DFG_TYPE_CHECK( 1560 1605 JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject, 1561 branchNotObject(valuePayloadGPR)); 1606 m_jit.branchPtr( 1607 MacroAssembler::Equal, 1608 MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), 1609 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1562 1610 } else { 1611 m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), scratchGPR); 1612 1563 1613 DFG_TYPE_CHECK( 1564 1614 JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject, 1565 branchNotObject(valuePayloadGPR)); 1615 m_jit.branchPtr( 1616 MacroAssembler::Equal, 1617 scratchGPR, 1618 MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()))); 1566 1619 1567 1620 JITCompiler::Jump isNotMasqueradesAsUndefined = m_jit.branchTest8( … … 1570 1623 TrustedImm32(MasqueradesAsUndefined)); 1571 1624 1572 m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), scratchGPR);1573 1625 speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, 1574 1626 m_jit.branchPtr( … … 3114 3166 } else { 3115 3167 MacroAssembler::Jump alreadyPrimitive = branchNotCell(op1.jsValueRegs()); 3116 MacroAssembler::Jump notPrimitive = branchIsObject(op1PayloadGPR);3168 MacroAssembler::Jump notPrimitive = m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op1PayloadGPR, JSCell::structureIDOffset()), MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())); 3117 3169 3118 3170 alreadyPrimitive.link(&m_jit); … … 3144 3196 if (node->child1()->prediction() & SpecString) { 3145 3197 JITCompiler::Jump slowPath1 = branchNotCell(op1.jsValueRegs()); 3146 JITCompiler::Jump slowPath2 = branchNotString(op1PayloadGPR); 3198 JITCompiler::Jump slowPath2 = m_jit.branchPtr( 3199 JITCompiler::NotEqual, 3200 JITCompiler::Address(op1PayloadGPR, JSCell::structureIDOffset()), 3201 TrustedImmPtr(m_jit.vm()->stringStructure.get())); 3147 3202 m_jit.move(op1PayloadGPR, resultGPR); 3148 3203 done = m_jit.jump(); … … 4153 4208 case IsObject: { 4154 4209 JSValueOperand value(this, node->child1()); 4155 GPRTemporary result(this, Reuse, value, TagWord);4156 4157 JITCompiler::Jump isNotCell = branchNotCell(value.jsValueRegs());4158 4159 m_jit.compare8(JITCompiler::AboveOrEqual,4160 JITCompiler::Address(value.payloadGPR(), JSCell::typeInfoTypeOffset()),4161 TrustedImm32(ObjectType),4162 result.gpr());4163 JITCompiler::Jump done = m_jit.jump();4164 4165 isNotCell.link(&m_jit);4166 m_jit.move(TrustedImm32(0), result.gpr());4167 4168 done.link(&m_jit);4169 booleanResult(result.gpr(), node);4170 break;4171 }4172 4173 case IsObjectOrNull: {4174 JSValueOperand value(this, node->child1());4175 4210 GPRReg valueTagGPR = value.tagGPR(); 4176 4211 GPRReg valuePayloadGPR = value.payloadGPR(); … … 4178 4213 GPRReg resultGPR = result.gpr(); 4179 4214 flushRegisters(); 4180 callOperation(operationIsObject OrNull, resultGPR, valueTagGPR, valuePayloadGPR);4215 callOperation(operationIsObject, resultGPR, valueTagGPR, valuePayloadGPR); 4181 4216 booleanResult(result.gpr(), node); 4182 4217 break; … … 4213 4248 4214 4249 if (!node->child1()->shouldSpeculateObject() || node->child1().useKind() == StringUse) { 4215 JITCompiler::Jump notString = branchNotString(payloadGPR); 4250 JITCompiler::Jump notString = m_jit.branch8( 4251 JITCompiler::NotEqual, 4252 JITCompiler::Address(payloadGPR, JSCell::typeInfoTypeOffset()), 4253 TrustedImm32(StringType)); 4216 4254 if (node->child1().useKind() == StringUse) 4217 4255 DFG_TYPE_CHECK(JSValueRegs(tagGPR, payloadGPR), node->child1(), SpecString, notString); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r180550 r180551 1307 1307 if (masqueradesAsUndefinedWatchpointIsStillValid()) { 1308 1308 DFG_TYPE_CHECK( 1309 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR)); 1309 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchStructurePtr( 1310 MacroAssembler::Equal, 1311 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1312 m_jit.vm()->stringStructure.get())); 1310 1313 DFG_TYPE_CHECK( 1311 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR)); 1314 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchStructurePtr( 1315 MacroAssembler::Equal, 1316 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1317 m_jit.vm()->stringStructure.get())); 1312 1318 } else { 1313 1319 DFG_TYPE_CHECK( 1314 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR)); 1320 JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchStructurePtr( 1321 MacroAssembler::Equal, 1322 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1323 m_jit.vm()->stringStructure.get())); 1315 1324 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), 1316 1325 m_jit.branchTest8( … … 1320 1329 1321 1330 DFG_TYPE_CHECK( 1322 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR)); 1331 JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchStructurePtr( 1332 MacroAssembler::Equal, 1333 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1334 m_jit.vm()->stringStructure.get())); 1323 1335 speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), 1324 1336 m_jit.branchTest8( … … 1353 1365 if (masqueradesAsUndefinedWatchpointValid) { 1354 1366 DFG_TYPE_CHECK( 1355 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1367 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr( 1368 MacroAssembler::Equal, 1369 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1370 m_jit.vm()->stringStructure.get())); 1356 1371 } else { 1357 1372 DFG_TYPE_CHECK( 1358 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1373 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr( 1374 MacroAssembler::Equal, 1375 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1376 m_jit.vm()->stringStructure.get())); 1359 1377 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild, 1360 1378 m_jit.branchTest8( … … 1371 1389 if (masqueradesAsUndefinedWatchpointValid) { 1372 1390 DFG_TYPE_CHECK( 1373 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR)); 1391 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1392 MacroAssembler::Equal, 1393 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1394 m_jit.vm()->stringStructure.get())); 1374 1395 } else { 1375 1396 DFG_TYPE_CHECK( 1376 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR)); 1397 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1398 MacroAssembler::Equal, 1399 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1400 m_jit.vm()->stringStructure.get())); 1377 1401 speculationCheck(BadType, JSValueRegs(op2GPR), rightChild, 1378 1402 m_jit.branchTest8( … … 1431 1455 if (masqueradesAsUndefinedWatchpointValid) { 1432 1456 DFG_TYPE_CHECK( 1433 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1457 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr( 1458 MacroAssembler::Equal, 1459 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1460 m_jit.vm()->stringStructure.get())); 1434 1461 } else { 1435 1462 DFG_TYPE_CHECK( 1436 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR)); 1463 JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr( 1464 MacroAssembler::Equal, 1465 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 1466 m_jit.vm()->stringStructure.get())); 1437 1467 speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild, 1438 1468 m_jit.branchTest8( … … 1449 1479 if (masqueradesAsUndefinedWatchpointValid) { 1450 1480 DFG_TYPE_CHECK( 1451 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR)); 1481 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1482 MacroAssembler::Equal, 1483 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1484 m_jit.vm()->stringStructure.get())); 1452 1485 } else { 1453 1486 DFG_TYPE_CHECK( 1454 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR)); 1487 JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1488 MacroAssembler::Equal, 1489 MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()), 1490 m_jit.vm()->stringStructure.get())); 1455 1491 speculationCheck(BadType, JSValueRegs(op2GPR), rightChild, 1456 1492 m_jit.branchTest8( … … 1574 1610 if (masqueradesAsUndefinedWatchpointValid) { 1575 1611 DFG_TYPE_CHECK( 1576 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR)); 1612 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1613 MacroAssembler::Equal, 1614 MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()), 1615 m_jit.vm()->stringStructure.get())); 1577 1616 } else { 1578 1617 DFG_TYPE_CHECK( 1579 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR)); 1618 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1619 MacroAssembler::Equal, 1620 MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()), 1621 m_jit.vm()->stringStructure.get())); 1580 1622 1581 1623 MacroAssembler::Jump isNotMasqueradesAsUndefined = … … 1718 1760 if (masqueradesAsUndefinedWatchpointIsStillValid()) { 1719 1761 DFG_TYPE_CHECK( 1720 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR)); 1762 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1763 MacroAssembler::Equal, 1764 MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()), 1765 m_jit.vm()->stringStructure.get())); 1721 1766 } else { 1722 1767 DFG_TYPE_CHECK( 1723 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR)); 1768 JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr( 1769 MacroAssembler::Equal, 1770 MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()), 1771 m_jit.vm()->stringStructure.get())); 1724 1772 1725 1773 JITCompiler::Jump isNotMasqueradesAsUndefined = m_jit.branchTest8( … … 3232 3280 3233 3281 MacroAssembler::Jump alreadyPrimitive = branchNotCell(JSValueRegs(op1GPR)); 3234 MacroAssembler::Jump notPrimitive = branchIsObject(op1GPR); 3282 MacroAssembler::Jump notPrimitive = m_jit.branchStructurePtr( 3283 MacroAssembler::NotEqual, 3284 MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()), 3285 m_jit.vm()->stringStructure.get()); 3235 3286 3236 3287 alreadyPrimitive.link(&m_jit); … … 3257 3308 if (node->child1()->prediction() & SpecString) { 3258 3309 JITCompiler::Jump slowPath1 = branchNotCell(JSValueRegs(op1GPR)); 3259 JITCompiler::Jump slowPath2 = branchNotString(op1GPR); 3310 JITCompiler::Jump slowPath2 = m_jit.branchStructurePtr( 3311 JITCompiler::NotEqual, 3312 JITCompiler::Address(op1GPR, JSCell::structureIDOffset()), 3313 m_jit.vm()->stringStructure.get()); 3260 3314 m_jit.move(op1GPR, resultGPR); 3261 3315 done = m_jit.jump(); … … 4209 4263 break; 4210 4264 } 4211 4265 4212 4266 case IsObject: { 4213 JSValueOperand value(this, node->child1());4214 GPRTemporary result(this, Reuse, value);4215 4216 JITCompiler::Jump isNotCell = branchNotCell(value.jsValueRegs());4217 4218 m_jit.compare8(JITCompiler::AboveOrEqual,4219 JITCompiler::Address(value.gpr(), JSCell::typeInfoTypeOffset()),4220 TrustedImm32(ObjectType),4221 result.gpr());4222 m_jit.or32(TrustedImm32(ValueFalse), result.gpr());4223 JITCompiler::Jump done = m_jit.jump();4224 4225 isNotCell.link(&m_jit);4226 m_jit.move(TrustedImm32(ValueFalse), result.gpr());4227 4228 done.link(&m_jit);4229 jsValueResult(result.gpr(), node, DataFormatJSBoolean);4230 break;4231 }4232 4233 case IsObjectOrNull: {4234 4267 JSValueOperand value(this, node->child1()); 4235 4268 GPRReg valueGPR = value.gpr(); … … 4237 4270 GPRReg resultGPR = result.gpr(); 4238 4271 flushRegisters(); 4239 callOperation(operationIsObject OrNull, resultGPR, valueGPR);4272 callOperation(operationIsObject, resultGPR, valueGPR); 4240 4273 m_jit.or32(TrustedImm32(ValueFalse), resultGPR); 4241 4274 jsValueResult(result.gpr(), node, DataFormatJSBoolean); … … 4271 4304 4272 4305 if (!node->child1()->shouldSpeculateObject() || node->child1().useKind() == StringUse) { 4273 JITCompiler::Jump notString = branchNotString(valueGPR); 4306 JITCompiler::Jump notString = m_jit.branch8( 4307 JITCompiler::NotEqual, 4308 JITCompiler::Address(valueGPR, JSCell::typeInfoTypeOffset()), 4309 TrustedImm32(StringType)); 4274 4310 if (node->child1().useKind() == StringUse) 4275 4311 DFG_TYPE_CHECK(JSValueSource(valueGPR), node->child1(), SpecString, notString); … … 5043 5079 else if (cachedTypeLocation->m_lastSeenType == TypeString) { 5044 5080 MacroAssembler::Jump isNotCell = branchNotCell(JSValueRegs(valueGPR)); 5045 jumpToEnd.append( branchIsString(valueGPR));5081 jumpToEnd.append(m_jit.branch8(MacroAssembler::Equal, MacroAssembler::Address(valueGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType))); 5046 5082 isNotCell.link(&m_jit); 5047 5083 } -
trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
r180550 r180551 157 157 case IsString: 158 158 case IsObject: 159 case IsObjectOrNull:160 159 case IsFunction: 161 160 case CheckHasInstance: -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
r180550 r180551 761 761 case IsObject: 762 762 compileIsObject(); 763 break;764 case IsObjectOrNull:765 compileIsObjectOrNull();766 763 break; 767 764 case IsFunction: … … 3100 3097 LValue isStringPredicate; 3101 3098 if (m_node->child1()->prediction() & SpecString) { 3102 isStringPredicate = isString(value); 3099 isStringPredicate = m_out.equal( 3100 m_out.load32(value, m_heaps.JSCell_structureID), 3101 m_out.constInt32(vm().stringStructure->id())); 3103 3102 } else 3104 3103 isStringPredicate = m_out.booleanFalse; … … 4206 4205 setBoolean(m_out.phi(m_out.boolean, notCellResult, cellResult)); 4207 4206 } 4208 4207 4209 4208 void compileIsObject() 4210 4209 { 4211 LValue value = lowJSValue(m_node->child1());4212 4213 LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("IsObject cell case"));4214 LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsObject continuation"));4215 4216 ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);4217 m_out.branch(isCell(value), unsure(isCellCase), unsure(continuation));4218 4219 LBasicBlock lastNext = m_out.appendTo(isCellCase, continuation);4220 ValueFromBlock cellResult = m_out.anchor(isObject(value));4221 m_out.jump(continuation);4222 4223 m_out.appendTo(continuation, lastNext);4224 setBoolean(m_out.phi(m_out.boolean, notCellResult, cellResult));4225 }4226 4227 void compileIsObjectOrNull()4228 {4229 4210 LValue pointerResult = vmCall( 4230 m_out.operation(operationIsObject OrNull), m_callFrame, lowJSValue(m_node->child1()));4211 m_out.operation(operationIsObject), m_callFrame, lowJSValue(m_node->child1())); 4231 4212 setBoolean(m_out.notNull(pointerResult)); 4232 4213 } … … 5150 5131 } 5151 5132 5152 FTL_TYPE_CHECK(jsValueValue(cell), edge, filter, isNotObject(cell)); 5133 LValue structureID = m_out.load32(cell, m_heaps.JSCell_structureID); 5134 FTL_TYPE_CHECK( 5135 jsValueValue(cell), edge, filter, 5136 m_out.equal(structureID, m_out.constInt32(vm().stringStructure->id()))); 5153 5137 speculate( 5154 5138 BadType, jsValueValue(cell), edge.node(), … … 5460 5444 case CellCaseSpeculatesObject: 5461 5445 FTL_TYPE_CHECK( 5462 jsValueValue(value), edge, (~SpecCell) | SpecObject, isNotObject(value)); 5446 jsValueValue(value), edge, (~SpecCell) | SpecObject, 5447 m_out.equal( 5448 m_out.load32(value, m_heaps.JSCell_structureID), 5449 m_out.constInt32(vm().stringStructure->id()))); 5463 5450 break; 5464 5451 } … … 6286 6273 LValue isObject(LValue cell) 6287 6274 { 6288 return m_out.aboveOrEqual(6289 m_out.load8(cell, m_heaps.JSCell_typeInfoType),6290 m_out.constInt8(ObjectType));6291 }6292 6293 LValue isNotObject(LValue cell)6294 {6295 return m_out.below(6296 m_out.load8(cell, m_heaps.JSCell_typeInfoType),6297 m_out.constInt8(ObjectType));6298 }6299 6300 LValue isNotString(LValue cell)6301 {6302 6275 return m_out.notEqual( 6303 6276 m_out.load32(cell, m_heaps.JSCell_structureID), … … 6305 6278 } 6306 6279 6280 LValue isNotString(LValue cell) 6281 { 6282 return isObject(cell); 6283 } 6284 6307 6285 LValue isString(LValue cell) 6308 6286 { … … 6310 6288 m_out.load32(cell, m_heaps.JSCell_structureID), 6311 6289 m_out.constInt32(vm().stringStructure->id())); 6290 } 6291 6292 LValue isNotObject(LValue cell) 6293 { 6294 return isString(cell); 6312 6295 } 6313 6296 … … 6508 6491 void speculateNonNullObject(Edge edge, LValue cell) 6509 6492 { 6510 FTL_TYPE_CHECK(jsValueValue(cell), edge, SpecObject, isNotObject(cell)); 6493 FTL_TYPE_CHECK( 6494 jsValueValue(cell), edge, SpecObject, 6495 m_out.equal( 6496 m_out.load32(cell, m_heaps.JSCell_structureID), 6497 m_out.constInt32(vm().stringStructure->id()))); 6511 6498 if (masqueradesAsUndefinedWatchpointIsStillValid()) 6512 6499 return; -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r180550 r180551 186 186 DEFINE_SLOW_OP(greatereq) 187 187 DEFINE_SLOW_OP(is_function) 188 DEFINE_SLOW_OP(is_object _or_null)188 DEFINE_SLOW_OP(is_object) 189 189 DEFINE_SLOW_OP(typeof) 190 190 … … 226 226 DEFINE_OP(op_is_number) 227 227 DEFINE_OP(op_is_string) 228 DEFINE_OP(op_is_object)229 228 DEFINE_OP(op_jeq_null) 230 229 DEFINE_OP(op_jfalse) -
trunk/Source/JavaScriptCore/jit/JIT.h
r180550 r180551 308 308 void emitLoadDouble(int index, FPRegisterID value); 309 309 void emitLoadInt32ToDouble(int index, FPRegisterID value); 310 Jump emitJumpIfCellObject(RegisterID cellReg);311 310 Jump emitJumpIfCellNotObject(RegisterID cellReg); 312 311 … … 491 490 void emit_op_is_number(Instruction*); 492 491 void emit_op_is_string(Instruction*); 493 void emit_op_is_object(Instruction*);494 492 void emit_op_jeq_null(Instruction*); 495 493 void emit_op_jfalse(Instruction*); -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r180550 r180551 686 686 } 687 687 688 ALWAYS_INLINE JIT::Jump JIT::emitJumpIfCellObject(RegisterID cellReg)689 {690 return branch8(AboveOrEqual, Address(cellReg, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType));691 }692 693 688 ALWAYS_INLINE JIT::Jump JIT::emitJumpIfCellNotObject(RegisterID cellReg) 694 689 { -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r180550 r180551 227 227 } 228 228 229 void JIT::emit_op_is_object(Instruction* currentInstruction)230 {231 int dst = currentInstruction[1].u.operand;232 int value = currentInstruction[2].u.operand;233 234 emitGetVirtualRegister(value, regT0);235 Jump isNotCell = emitJumpIfNotJSCell(regT0);236 237 compare8(AboveOrEqual, Address(regT0, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType), regT0);238 emitTagAsBoolImmediate(regT0);239 Jump done = jump();240 241 isNotCell.link(this);242 move(TrustedImm32(ValueFalse), regT0);243 244 done.link(this);245 emitPutVirtualRegister(dst);246 }247 248 229 void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction) 249 230 { … … 280 261 281 262 Jump isImm = emitJumpIfNotJSCell(regT0); 282 addSlowCase(emitJumpIfCellObject(regT0)); 263 addSlowCase(branchStructure(NotEqual, 264 Address(regT0, JSCell::structureIDOffset()), 265 m_vm->stringStructure.get())); 283 266 isImm.link(this); 284 267 -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r180550 r180551 332 332 } 333 333 334 void JIT::emit_op_is_object(Instruction* currentInstruction)335 {336 int dst = currentInstruction[1].u.operand;337 int value = currentInstruction[2].u.operand;338 339 emitLoad(value, regT1, regT0);340 Jump isNotCell = branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag));341 342 compare8(AboveOrEqual, Address(regT0, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType), regT0);343 Jump done = jump();344 345 isNotCell.link(this);346 move(TrustedImm32(0), regT0);347 348 done.link(this);349 emitStoreBool(dst, regT0);350 }351 352 334 void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction) 353 335 { … … 370 352 371 353 Jump isImm = branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)); 372 addSlowCase( emitJumpIfCellObject(regT0));354 addSlowCase(branchPtr(NotEqual, Address(regT0, JSCell::structureIDOffset()), TrustedImmPtr(m_vm->stringStructure.get()))); 373 355 isImm.link(this); 374 356 … … 643 625 addSlowCase(branch32(Below, regT1, TrustedImm32(JSValue::LowestTag))); 644 626 645 // Jump to a slow case if both are strings or symbols (non object).627 // Jump to a slow case if both are strings. 646 628 Jump notCell = branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)); 647 Jump first IsObject = emitJumpIfCellObject(regT0);648 addSlowCase( emitJumpIfCellNotObject(regT2));629 Jump firstNotString = branchPtr(NotEqual, Address(regT0, JSCell::structureIDOffset()), TrustedImmPtr(m_vm->stringStructure.get())); 630 addSlowCase(branchPtr(Equal, Address(regT2, JSCell::structureIDOffset()), TrustedImmPtr(m_vm->stringStructure.get()))); 649 631 notCell.link(this); 650 first IsObject.link(this);632 firstNotString.link(this); 651 633 652 634 // Simply compare the payloads. -
trunk/Source/JavaScriptCore/jsc.cpp
r180547 r180551 576 576 } 577 577 578 static RuntimeFlags javaScriptRuntimeFlags(const JSGlobalObject*) { return RuntimeFlags::createAllEnabled(); }578 static bool javaScriptExperimentsEnabled(const JSGlobalObject*) { return true; } 579 579 580 580 protected: … … 664 664 665 665 const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, &globalObjectTable, CREATE_METHOD_TABLE(GlobalObject) }; 666 const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScript RuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout };666 const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, 0, &shouldInterruptScriptBeforeTimeout }; 667 667 668 668 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r180550 r180551 984 984 985 985 986 _llint_op_is_object _or_null:987 traceExecution() 988 callSlowPath(_slow_path_is_object _or_null)986 _llint_op_is_object: 987 traceExecution() 988 callSlowPath(_slow_path_is_object) 989 989 dispatch(3) 990 990 991 991 992 _llint_op_is_function: -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r180550 r180551 953 953 bineq t2, t3, .slow 954 954 bib t2, LowestTag, .slow 955 bineq t2, CellTag, .notString OrSymbol956 bb aeq JSCell::m_type[t0], ObjectType, .notStringOrSymbol957 bb b JSCell::m_type[t1], ObjectType, .slow958 .notString OrSymbol:955 bineq t2, CellTag, .notString 956 bbneq JSCell::m_type[t0], StringType, .notString 957 bbeq JSCell::m_type[t1], StringType, .slow 958 .notString: 959 959 loadi 4[PC], t2 960 960 equalityOperation(t0, t1, t0) … … 1330 1330 dispatch(3) 1331 1331 .opIsStringNotCell: 1332 storep 0, PayloadOffset[cfr, t2, 8]1333 dispatch(3)1334 1335 1336 _llint_op_is_object:1337 traceExecution()1338 loadi 8[PC], t11339 loadi 4[PC], t21340 loadConstantOrVariable(t1, t0, t3)1341 storei BooleanTag, TagOffset[cfr, t2, 8]1342 bineq t0, CellTag, .opIsObjectNotCell1343 cbaeq JSCell::m_type[t3], ObjectType, t11344 storei t1, PayloadOffset[cfr, t2, 8]1345 dispatch(3)1346 .opIsObjectNotCell:1347 1332 storep 0, PayloadOffset[cfr, t2, 8] 1348 1333 dispatch(3) … … 1992 1977 loadConstantOrVariable(t2, t1, t0) 1993 1978 bineq t1, CellTag, .opToPrimitiveIsImm 1994 bb aeq JSCell::m_type[t0], ObjectType, .opToPrimitiveSlowCase1979 bbneq JSCell::m_type[t0], StringType, .opToPrimitiveSlowCase 1995 1980 .opToPrimitiveIsImm: 1996 1981 storei t1, TagOffset[cfr, t3, 8] -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r180550 r180551 1207 1207 1208 1208 1209 _llint_op_is_object:1210 traceExecution()1211 loadisFromInstruction(2, t1)1212 loadisFromInstruction(1, t2)1213 loadConstantOrVariable(t1, t0)1214 btqnz t0, tagMask, .opIsObjectNotCell1215 cbaeq JSCell::m_type[t0], ObjectType, t11216 orq ValueFalse, t11217 storeq t1, [cfr, t2, 8]1218 dispatch(3)1219 .opIsObjectNotCell:1220 storeq ValueFalse, [cfr, t2, 8]1221 dispatch(3)1222 1223 1224 1209 macro loadPropertyAtVariableOffset(propertyOffsetAsInt, objectAndStorage, value) 1225 1210 bilt propertyOffsetAsInt, firstOutOfLineOffset, .isInline … … 1850 1835 loadConstantOrVariable(t2, t0) 1851 1836 btqnz t0, tagMask, .opToPrimitiveIsImm 1852 bb aeq JSCell::m_type[t0], ObjectType, .opToPrimitiveSlowCase1837 bbneq JSCell::m_type[t0], StringType, .opToPrimitiveSlowCase 1853 1838 .opToPrimitiveIsImm: 1854 1839 storeq t0, [cfr, t3, 8] -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r180550 r180551 456 456 } 457 457 458 SLOW_PATH_DECL(slow_path_is_object _or_null)459 { 460 BEGIN(); 461 RETURN(jsBoolean(jsIsObjectType OrNull(exec, OP_C(2).jsValue())));458 SLOW_PATH_DECL(slow_path_is_object) 459 { 460 BEGIN(); 461 RETURN(jsBoolean(jsIsObjectType(exec, OP_C(2).jsValue()))); 462 462 } 463 463 -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h
r180550 r180551 215 215 SLOW_PATH_HIDDEN_DECL(slow_path_typeof); 216 216 SLOW_PATH_HIDDEN_DECL(slow_path_is_object); 217 SLOW_PATH_HIDDEN_DECL(slow_path_is_object_or_null);218 217 SLOW_PATH_HIDDEN_DECL(slow_path_is_function); 219 218 SLOW_PATH_HIDDEN_DECL(slow_path_in); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r180547 r180551 146 146 const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &Base::s_info, &globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) }; 147 147 148 const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScript RuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout };148 const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, 0, &shouldInterruptScriptBeforeTimeout }; 149 149 150 150 /* Source for JSGlobalObject.lut.h … … 174 174 , m_weakRandom(Options::forceWeakRandomSeed() ? Options::forcedWeakRandomSeed() : static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0))) 175 175 , m_evalEnabled(true) 176 , m_ runtimeFlags()176 , m_experimentsEnabled(false) 177 177 , m_consoleClient(nullptr) 178 178 , m_globalObjectMethodTable(globalObjectMethodTable ? globalObjectMethodTable : &s_globalObjectMethodTable) … … 374 374 375 375 FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE) 376 377 if (m_runtimeFlags.isSymbolEnabled()) 378 putDirectWithoutTransition(vm, vm.propertyNames->Symbol, symbolConstructor, DontEnum); 379 376 380 377 #undef PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE 381 378 PrototypeMap& prototypeMap = vm.prototypeMap; … … 440 437 JSConsole* consoleObject = JSConsole::create(vm, m_consoleStructure.get()); 441 438 putDirectWithoutTransition(vm, Identifier(exec, "console"), consoleObject, DontEnum); 442 439 443 440 resetPrototype(vm, prototype()); 444 441 } -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r180547 r180551 32 32 #include "JSWeakObjectMapRefInternal.h" 33 33 #include "NumberPrototype.h" 34 #include "RuntimeFlags.h"35 34 #include "SpecialPointer.h" 36 35 #include "StringPrototype.h" … … 88 87 89 88 #define DEFINE_STANDARD_BUILTIN(macro, upperName, lowerName) macro(upperName, lowerName, lowerName, JS ## upperName, upperName) 90 91 #define FOR_EACH_EXPERIMENTAL_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \ 92 macro(Symbol, symbol, symbolObject, SymbolObject, Symbol) \ 93 89 94 90 #define FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \ 95 91 macro(Set, set, set, JSSet, Set) \ … … 97 93 macro(Date, date, date, DateInstance, Date) \ 98 94 macro(String, string, stringObject, StringObject, String) \ 95 macro(Symbol, symbol, symbolObject, SymbolObject, Symbol) \ 99 96 macro(Boolean, boolean, booleanObject, BooleanObject, Boolean) \ 100 97 macro(Number, number, numberObject, NumberObject, Number) \ … … 105 102 #define FOR_EACH_SIMPLE_BUILTIN_TYPE(macro) \ 106 103 FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \ 107 FOR_EACH_EXPERIMENTAL_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \108 104 DEFINE_STANDARD_BUILTIN(macro, ArrayIterator, arrayIterator) \ 109 105 DEFINE_STANDARD_BUILTIN(macro, ArgumentsIterator, argumentsIterator) \ … … 136 132 ShouldInterruptScriptFunctionPtr shouldInterruptScript; 137 133 138 typedef RuntimeFlags (*JavaScriptRuntimeFlagsFunctionPtr)(const JSGlobalObject*);139 JavaScript RuntimeFlagsFunctionPtr javaScriptRuntimeFlags;134 typedef bool (*JavaScriptExperimentsEnabledFunctionPtr)(const JSGlobalObject*); 135 JavaScriptExperimentsEnabledFunctionPtr javaScriptExperimentsEnabled; 140 136 141 137 typedef void (*QueueTaskToEventLoopFunctionPtr)(const JSGlobalObject*, PassRefPtr<Microtask>); … … 278 274 bool m_evalEnabled; 279 275 String m_evalDisabledErrorMessage; 280 RuntimeFlags m_runtimeFlags;276 bool m_experimentsEnabled; 281 277 ConsoleClient* m_consoleClient; 282 278 … … 314 310 Base::finishCreation(vm); 315 311 structure()->setGlobalObject(vm, this); 316 m_ runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);312 m_experimentsEnabled = m_globalObjectMethodTable->javaScriptExperimentsEnabled(this); 317 313 init(vm); 318 314 setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype(), PureForwardingProxyType), this)); … … 323 319 Base::finishCreation(vm); 324 320 structure()->setGlobalObject(vm, this); 325 m_ runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);321 m_experimentsEnabled = m_globalObjectMethodTable->javaScriptExperimentsEnabled(this); 326 322 init(vm); 327 323 setGlobalThis(vm, thisValue); … … 551 547 static bool shouldInterruptScript(const JSGlobalObject*) { return true; } 552 548 static bool shouldInterruptScriptBeforeTimeout(const JSGlobalObject*) { return false; } 553 static RuntimeFlags javaScriptRuntimeFlags(const JSGlobalObject*) { return RuntimeFlags(); }549 static bool javaScriptExperimentsEnabled(const JSGlobalObject*) { return false; } 554 550 555 551 void queueMicrotask(PassRefPtr<Microtask>); -
trunk/Source/JavaScriptCore/runtime/Operations.cpp
r180550 r180551 86 86 } 87 87 88 bool jsIsObjectType OrNull(CallFrame* callFrame, JSValue v)88 bool jsIsObjectType(CallFrame* callFrame, JSValue v) 89 89 { 90 90 if (!v.isCell()) -
trunk/Source/JavaScriptCore/runtime/Operations.h
r180550 r180551 32 32 JSValue jsTypeStringForValue(CallFrame*, JSValue); 33 33 JSValue jsTypeStringForValue(VM&, JSGlobalObject*, JSValue); 34 bool jsIsObjectType OrNull(CallFrame*, JSValue);34 bool jsIsObjectType(CallFrame*, JSValue); 35 35 bool jsIsFunctionType(JSValue); 36 36 -
trunk/Source/WebCore/ChangeLog
r180549 r180551 1 2015-02-23 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r180547 and r180550. 4 https://bugs.webkit.org/show_bug.cgi?id=141957 5 6 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit). 7 8 Reverted changesets: 9 10 "REGRESSION(r179429): Can't type comments in Facebook" 11 https://bugs.webkit.org/show_bug.cgi?id=141859 12 http://trac.webkit.org/changeset/180547 13 14 "Constructor returning null should construct an object instead 15 of null" 16 https://bugs.webkit.org/show_bug.cgi?id=141640 17 http://trac.webkit.org/changeset/180550 18 1 19 2015-02-23 Ryosuke Niwa <rniwa@webkit.org> 2 20 -
trunk/Source/WebCore/WebCore.order
r180547 r180551 3336 3336 __ZN7WebCore15JSDOMWindowBase14finishCreationERN3JSC2VMEPNS_16JSDOMWindowShellE 3337 3337 __ZN7WebCore17JSDOMGlobalObject14finishCreationERN3JSC2VMEPNS1_8JSObjectE 3338 __ZN7WebCore15JSDOMWindowBase28javaScriptExperimentsEnabledEPKN3JSC14JSGlobalObjectE 3338 3339 __ZN7WebCore12gcControllerEv 3339 3340 __ZN7WebCore12GCController18garbageCollectSoonEv -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r180547 r180551 19139 19139 <ClInclude Include="..\ForwardingHeaders\runtime\RegExp.h" /> 19140 19140 <ClInclude Include="..\ForwardingHeaders\runtime\RegExpObject.h" /> 19141 <ClInclude Include="..\ForwardingHeaders\runtime\RuntimeFlags.h" />19142 19141 <ClInclude Include="..\ForwardingHeaders\runtime\StorageBarrier.h" /> 19143 19142 <ClInclude Include="..\ForwardingHeaders\runtime\StringPrototype.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r180547 r180551 11632 11632 <Filter>ForwardingHeaders\runtime</Filter> 11633 11633 </ClInclude> 11634 <ClInclude Include="..\ForwardingHeaders\runtime\RuntimeFlags.h">11635 <Filter>ForwardingHeaders\runtime</Filter>11636 </ClInclude>11637 11634 <ClInclude Include="..\ForwardingHeaders\runtime\StringObject.h"> 11638 11635 <Filter>ForwardingHeaders\runtime</Filter> -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
r180547 r180551 57 57 const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) }; 58 58 59 const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScript RuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };59 const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout }; 60 60 61 61 JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell) … … 170 170 } 171 171 172 RuntimeFlags JSDOMWindowBase::javaScriptRuntimeFlags(const JSGlobalObject* object)172 bool JSDOMWindowBase::javaScriptExperimentsEnabled(const JSGlobalObject* object) 173 173 { 174 174 const JSDOMWindowBase* thisObject = static_cast<const JSDOMWindowBase*>(object); 175 175 Frame* frame = thisObject->impl().frame(); 176 176 if (!frame) 177 return RuntimeFlags();178 return frame->settings().javaScript RuntimeFlags();177 return false; 178 return frame->settings().javaScriptExperimentsEnabled(); 179 179 } 180 180 -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h
r180547 r180551 65 65 static bool shouldInterruptScript(const JSC::JSGlobalObject*); 66 66 static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*); 67 static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);67 static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*); 68 68 static void queueTaskToEventLoop(const JSC::JSGlobalObject*, PassRefPtr<JSC::Microtask>); 69 69 -
trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
r180547 r180551 44 44 const ClassInfo JSWorkerGlobalScopeBase::s_info = { "WorkerGlobalScope", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSWorkerGlobalScopeBase) }; 45 45 46 const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScript RuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };46 const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout }; 47 47 48 48 JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase(JSC::VM& vm, JSC::Structure* structure, PassRefPtr<WorkerGlobalScope> impl) … … 93 93 } 94 94 95 RuntimeFlags JSWorkerGlobalScopeBase::javaScriptRuntimeFlags(const JSGlobalObject* object)95 bool JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled(const JSGlobalObject* object) 96 96 { 97 return JSGlobalObject::javaScript RuntimeFlags(object);97 return JSGlobalObject::javaScriptExperimentsEnabled(object); 98 98 } 99 99 -
trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h
r180547 r180551 58 58 static bool shouldInterruptScript(const JSC::JSGlobalObject*); 59 59 static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*); 60 static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);60 static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*); 61 61 static void queueTaskToEventLoop(const JSC::JSGlobalObject*, PassRefPtr<JSC::Microtask>); 62 62 -
trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
r180547 r180551 121 121 { 122 122 m_frontendPage->settings().setAllowFileAccessFromFileURLs(true); 123 m_frontendPage->settings().setJavaScriptRuntimeFlags({124 JSC::RuntimeFlags::SymbolEnabled125 });126 123 m_dispatchTask = std::make_unique<InspectorBackendDispatchTask>(inspectorController); 127 124 } -
trunk/Source/WebCore/page/Settings.h
r180547 r180551 36 36 #include "Timer.h" 37 37 #include <chrono> 38 #include <runtime/RuntimeFlags.h>39 38 #include <unicode/uscript.h> 40 39 #include <wtf/HashMap.h> -
trunk/Source/WebCore/page/Settings.in
r180547 r180551 74 74 forceFTPDirectoryListings initial=false 75 75 developerExtrasEnabled initial=false 76 javaScriptExperimentsEnabled initial=false 76 77 scriptMarkupEnabled initial=true 77 78 needsSiteSpecificQuirks initial=false … … 87 88 acceleratedFiltersEnabled initial=false 88 89 useLegacyTextAlignPositionedElementBehavior initial=false 89 javaScriptRuntimeFlags type=JSC::RuntimeFlags90 90 91 91 # FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files -
trunk/Source/WebKit/mac/ChangeLog
r180549 r180551 1 2015-02-23 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r180547 and r180550. 4 https://bugs.webkit.org/show_bug.cgi?id=141957 5 6 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit). 7 8 Reverted changesets: 9 10 "REGRESSION(r179429): Can't type comments in Facebook" 11 https://bugs.webkit.org/show_bug.cgi?id=141859 12 http://trac.webkit.org/changeset/180547 13 14 "Constructor returning null should construct an object instead 15 of null" 16 https://bugs.webkit.org/show_bug.cgi?id=141640 17 http://trac.webkit.org/changeset/180550 18 1 19 2015-02-23 Ryosuke Niwa <rniwa@webkit.org> 2 20 -
trunk/Source/WebKit/mac/Misc/WebNSDictionaryExtras.h
r180547 r180551 45 45 - (void)_webkit_setLongLong:(long long)value forKey:(id)key; 46 46 - (void)_webkit_setUnsignedLongLong:(unsigned long long)value forKey:(id)key; 47 #if PLATFORM(IOS) 47 48 - (void)_webkit_setUnsignedInt:(unsigned)value forKey:(id)key; 49 #endif 48 50 @end -
trunk/Source/WebKit/mac/Misc/WebNSDictionaryExtras.m
r180547 r180551 119 119 } 120 120 121 #if PLATFORM(IOS) 121 122 - (void)_webkit_setUnsignedInt:(unsigned)value forKey:(id)key 122 123 { … … 125 126 [object release]; 126 127 } 128 #endif 127 129 128 130 @end -
trunk/Source/WebKit/mac/WebKit.order
r180547 r180551 288 288 -[WebPreferences(WebPrivate) showsToolTipOverTruncatedText] 289 289 -[WebPreferences(WebPrivate) developerExtrasEnabled] 290 -[WebPreferences(WebPrivate) javaScriptExperimentsEnabled] 290 291 -[WebPreferences(WebPrivate) authorAndUserStylesEnabled] 291 292 -[WebPreferences(WebPrivate) applicationChromeModeEnabled] … … 1246 1247 -[WebPreferences(WebPrivate) setJavaScriptCanAccessClipboard:] 1247 1248 -[WebPreferences(WebPrivate) setOfflineWebApplicationCacheEnabled:] 1249 -[WebPreferences(WebPrivate) setJavaScriptExperimentsEnabled:] 1248 1250 -[WebPreferences(WebPrivate) setLoadsSiteIconsIgnoringImageLoadingPreference:] 1249 1251 -[WebPreferences(WebPrivate) setFrameFlatteningEnabled:] -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r180547 r180551 85 85 #define WebKitForceFTPDirectoryListings @"WebKitForceFTPDirectoryListings" 86 86 #define WebKitDeveloperExtrasEnabledPreferenceKey @"WebKitDeveloperExtrasEnabledPreferenceKey" 87 #define WebKitJavaScript RuntimeFlagsPreferenceKey @"WebKitJavaScriptRuntimeFlagsPreferenceKey"87 #define WebKitJavaScriptExperimentsEnabledPreferenceKey @"WebKitJavaScriptExperimentsEnabledPreferenceKey" 88 88 #define WebKitAuthorAndUserStylesEnabledPreferenceKey @"WebKitAuthorAndUserStylesEnabledPreferenceKey" 89 89 #define WebKitDOMTimersThrottlingEnabledPreferenceKey @"WebKitDOMTimersThrottlingEnabledPreferenceKey" -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r180547 r180551 474 474 [NSNumber numberWithBool:YES], WebKitPageCacheSupportsPluginsPreferenceKey, 475 475 [NSNumber numberWithBool:NO], WebKitDeveloperExtrasEnabledPreferenceKey, 476 [NSNumber numberWith UnsignedInt:0], WebKitJavaScriptRuntimeFlagsPreferenceKey,476 [NSNumber numberWithBool:NO], WebKitJavaScriptExperimentsEnabledPreferenceKey, 477 477 [NSNumber numberWithBool:YES], WebKitAuthorAndUserStylesEnabledPreferenceKey, 478 478 [NSNumber numberWithBool:YES], WebKitDOMTimersThrottlingEnabledPreferenceKey, … … 668 668 } 669 669 670 #if PLATFORM(IOS) 670 671 - (unsigned int)_unsignedIntValueForKey:(NSString *)key 671 672 { … … 678 679 return; 679 680 NSString *_key = KEY(key); 680 #if PLATFORM(IOS)681 681 dispatch_barrier_sync(_private->readWriteQueue, ^{ 682 #endif683 682 [_private->values.get() _webkit_setUnsignedInt:value forKey:_key]; 684 #if PLATFORM(IOS)685 683 }); 686 #endif687 684 if (_private->autosaves) 688 685 [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithUnsignedInt:value] forKey:_key]; 689 686 [self _postPreferencesChangedNotification]; 690 687 } 688 #endif 691 689 692 690 - (float)_floatValueForKey:(NSString *)key … … 1187 1185 } 1188 1186 1189 - ( WebKitJavaScriptRuntimeFlags)javaScriptRuntimeFlags1190 { 1191 return static_cast<WebKitJavaScriptRuntimeFlags>([self _unsignedIntValueForKey:WebKitJavaScriptRuntimeFlagsPreferenceKey]);1192 } 1193 1194 - ( void)setJavaScriptRuntimeFlags:(WebKitJavaScriptRuntimeFlags)flags1195 { 1196 [self _setUnsignedIntValue:flags forKey:WebKitJavaScriptRuntimeFlagsPreferenceKey];1187 - (void)setJavaScriptExperimentsEnabled:(BOOL)flag 1188 { 1189 [self _setBoolValue:flag forKey:WebKitJavaScriptExperimentsEnabledPreferenceKey]; 1190 } 1191 1192 - (BOOL)javaScriptExperimentsEnabled 1193 { 1194 return [self _boolValueForKey:WebKitJavaScriptExperimentsEnabledPreferenceKey]; 1197 1195 } 1198 1196 -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r180547 r180551 53 53 } WebStorageBlockingPolicy; 54 54 55 typedef enum {56 WebKitJavaScriptRuntimeFlagsSymbolEnabled = 1u << 0,57 WebKitJavaScriptRuntimeFlagsAllEnabled = WebKitJavaScriptRuntimeFlagsSymbolEnabled58 } WebKitJavaScriptRuntimeFlags;59 60 55 extern NSString *WebPreferencesChangedNotification; 61 56 extern NSString *WebPreferencesRemovedNotification; … … 73 68 - (void)setDeveloperExtrasEnabled:(BOOL)flag; 74 69 75 - ( WebKitJavaScriptRuntimeFlags)javaScriptRuntimeFlags;76 - (void)setJavaScript RuntimeFlags:(WebKitJavaScriptRuntimeFlags)flags;70 - (BOOL)javaScriptExperimentsEnabled; 71 - (void)setJavaScriptExperimentsEnabled:(BOOL)flag; 77 72 78 73 - (BOOL)authorAndUserStylesEnabled; -
trunk/Source/WebKit/mac/WebView/WebView.mm
r180547 r180551 2235 2235 2236 2236 settings.setDeveloperExtrasEnabled([preferences developerExtrasEnabled]); 2237 settings.setJavaScript RuntimeFlags(JSC::RuntimeFlags([preferences javaScriptRuntimeFlags]));2237 settings.setJavaScriptExperimentsEnabled([preferences javaScriptExperimentsEnabled]); 2238 2238 settings.setAuthorAndUserStylesEnabled([preferences authorAndUserStylesEnabled]); 2239 2239 -
trunk/Source/WebKit2/ChangeLog
r180549 r180551 1 2015-02-23 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r180547 and r180550. 4 https://bugs.webkit.org/show_bug.cgi?id=141957 5 6 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit). 7 8 Reverted changesets: 9 10 "REGRESSION(r179429): Can't type comments in Facebook" 11 https://bugs.webkit.org/show_bug.cgi?id=141859 12 http://trac.webkit.org/changeset/180547 13 14 "Constructor returning null should construct an object instead 15 of null" 16 https://bugs.webkit.org/show_bug.cgi?id=141640 17 http://trac.webkit.org/changeset/180550 18 1 19 2015-02-23 Ryosuke Niwa <rniwa@webkit.org> 2 20 -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r180547 r180551 96 96 macro(XSSAuditorEnabled, xssAuditorEnabled, Bool, bool, true) \ 97 97 macro(FrameFlatteningEnabled, frameFlatteningEnabled, Bool, bool, DEFAULT_FRAME_FLATTENING_ENABLED) \ 98 macro(JavaScriptExperimentsEnabled, javaScriptExperimentsEnabled, Bool, bool, false) \ 98 99 macro(PrivateBrowsingEnabled, privateBrowsingEnabled, Bool, bool, false) \ 99 100 macro(TextAreasAreResizable, textAreasAreResizable, Bool, bool, DEFAULT_TEXT_AREAS_ARE_RESIZABLE) \ … … 217 218 macro(InspectorAttachmentSide, inspectorAttachmentSide, UInt32, uint32_t, 0) \ 218 219 macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage) \ 219 macro(JavaScriptRuntimeFlags, javaScriptRuntimeFlags, UInt32, uint32_t, 0) \220 220 \ 221 221 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r180547 r180551 350 350 } 351 351 352 void WKPreferencesSetJavaScript RuntimeFlags(WKPreferencesRef preferencesRef, WKJavaScriptRuntimeFlagSet javaScriptRuntimeFlagSet)353 { 354 toImpl(preferencesRef)->setJavaScript RuntimeFlags(javaScriptRuntimeFlagSet);355 } 356 357 WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef)358 { 359 return toImpl(preferencesRef)->javaScript RuntimeFlags();352 void WKPreferencesSetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef, bool enabled) 353 { 354 toImpl(preferencesRef)->setJavaScriptExperimentsEnabled(enabled); 355 } 356 357 bool WKPreferencesGetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef) 358 { 359 return toImpl(preferencesRef)->javaScriptExperimentsEnabled(); 360 360 } 361 361 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h
r180547 r180551 151 151 WK_EXPORT bool WKPreferencesGetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef); 152 152 153 // Defaults to false. 154 WK_EXPORT void WKPreferencesSetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef, bool enabled); 155 WK_EXPORT bool WKPreferencesGetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef); 156 153 157 // Defaults to true. 154 158 WK_EXPORT void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable); -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
r180547 r180551 50 50 typedef enum WKEditableLinkBehavior WKEditableLinkBehavior; 51 51 52 enum WKJavaScriptRuntimeFlags {53 kWKJavaScriptRuntimeFlagsSymbolEnabled = 1 << 0,54 kWKJavaScriptRuntimeFlagsAllEnabled = kWKJavaScriptRuntimeFlagsSymbolEnabled55 };56 typedef unsigned WKJavaScriptRuntimeFlagSet;57 58 52 // Creates a copy with no identifier. 59 53 WK_EXPORT WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef); … … 353 347 WK_EXPORT bool WKPreferencesGetScreenFontSubstitutionEnabled(WKPreferencesRef preferences); 354 348 355 // Defaults to 0.356 WK_EXPORT void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferences, WKJavaScriptRuntimeFlagSet javascriptRuntimeFlagSet);357 WK_EXPORT WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferences);358 359 349 #ifdef __cplusplus 360 350 } -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm
r180547 r180551 268 268 } 269 269 270 - (_WKJavaScriptRuntimeFlags)_javaScriptRuntimeFlags271 {272 return _preferences->javaScriptRuntimeFlags();273 }274 275 - (void)_setJavaScriptRuntimeFlags:(_WKJavaScriptRuntimeFlags)javaScriptRuntimeFlags276 {277 _preferences->setJavaScriptRuntimeFlags(javaScriptRuntimeFlags);278 }279 280 270 - (BOOL)_isStandalone 281 271 { -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h
r180547 r180551 43 43 } WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 44 44 45 typedef NS_OPTIONS(NSUInteger, _WKJavaScriptRuntimeFlags) {46 _WKJavaScriptRuntimeFlagsSymbolEnabled = 1 << 0,47 _WKJavaScriptRuntimeFlagsAllEnabled = _WKJavaScriptRuntimeFlagsSymbolEnabled48 } WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);49 50 45 @interface WKPreferences (WKPrivate) 51 46 … … 65 60 66 61 @property (nonatomic, setter=_setAllowFileAccessFromFileURLs:) BOOL _allowFileAccessFromFileURLs WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 67 @property (nonatomic, setter=_setJavaScriptRuntimeFlags:) _WKJavaScriptRuntimeFlags _javaScriptRuntimeFlags WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);68 62 69 63 @property (nonatomic, setter=_setStandalone:, getter=_isStandalone) BOOL _standalone WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); -
trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp
r180547 r180551 115 115 WKPreferencesRef wkPreferences = WKPageGroupGetPreferences(wkPageGroup); 116 116 WKPreferencesSetFileAccessFromFileURLsAllowed(wkPreferences, true); 117 WKPreferencesSetJavaScriptRuntimeFlags(wkPreferences, kWKJavaScriptRuntimeFlagsSymbolEnabled);118 117 119 118 return toImpl(WKViewGetPage(wkView)); -
trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp
r180547 r180551 70 70 #endif 71 71 preferences->setAllowFileAccessFromFileURLs(true); 72 preferences->setJavaScriptRuntimeFlags({73 JSC::RuntimeFlags::SymbolEnabled74 });75 72 RefPtr<WebPageGroup> pageGroup = WebPageGroup::create(inspectorPageGroupIdentifier(), false, false); 76 73 m_inspectorView = GTK_WIDGET(webkitWebViewBaseCreate(&inspectorProcessPool(), preferences.get(), pageGroup.get(), nullptr, nullptr)); -
trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
r180547 r180551 489 489 #endif 490 490 preferences._allowFileAccessFromFileURLs = YES; 491 preferences._javaScriptRuntimeFlags = _WKJavaScriptRuntimeFlagsSymbolEnabled;492 491 [configuration setProcessPool: ::WebKit::wrapper(inspectorProcessPool())]; 493 492 [configuration _setGroupIdentifier:inspectorPageGroupIdentifier()]; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r180547 r180551 2654 2654 setSessionID(SessionID::defaultSessionID()); 2655 2655 settings.setDeveloperExtrasEnabled(store.getBoolValueForKey(WebPreferencesKey::developerExtrasEnabledKey())); 2656 settings.setJavaScript RuntimeFlags(RuntimeFlags(store.getUInt32ValueForKey(WebPreferencesKey::javaScriptRuntimeFlagsKey())));2656 settings.setJavaScriptExperimentsEnabled(store.getBoolValueForKey(WebPreferencesKey::javaScriptExperimentsEnabledKey())); 2657 2657 settings.setTextAreasAreResizable(store.getBoolValueForKey(WebPreferencesKey::textAreasAreResizableKey())); 2658 2658 settings.setNeedsSiteSpecificQuirks(store.getBoolValueForKey(WebPreferencesKey::needsSiteSpecificQuirksKey())); -
trunk/Source/WebKit2/mac/WebKit2.order
r180547 r180551 177 177 __ZN6WebKit17WebPreferencesKey25frameFlatteningEnabledKeyEv 178 178 __ZN6WebKit17WebPreferencesKey25developerExtrasEnabledKeyEv 179 __ZN6WebKit17WebPreferencesKey31javaScriptExperimentsEnabledKeyEv 179 180 __ZN6WebKit17WebPreferencesKey25privateBrowsingEnabledKeyEv 180 181 __ZN6WebKit17WebPreferencesKey24textAreasAreResizableKeyEv … … 8129 8130 _WKPreferencesSetWebAudioEnabled 8130 8131 __ZN6WebKit14WebPreferences18setWebAudioEnabledERKb 8132 _WKPreferencesSetJavaScriptExperimentsEnabled 8133 __ZN6WebKit14WebPreferences31setJavaScriptExperimentsEnabledERKb 8131 8134 _WKPreferencesSetJavaScriptCanAccessClipboard 8132 8135 __ZN6WebKit14WebPreferences31setJavaScriptCanAccessClipboardERKb -
trunk/Tools/ChangeLog
r180547 r180551 1 2015-02-23 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r180547 and r180550. 4 https://bugs.webkit.org/show_bug.cgi?id=141957 5 6 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit). 7 8 Reverted changesets: 9 10 "REGRESSION(r179429): Can't type comments in Facebook" 11 https://bugs.webkit.org/show_bug.cgi?id=141859 12 http://trac.webkit.org/changeset/180547 13 14 "Constructor returning null should construct an object instead 15 of null" 16 https://bugs.webkit.org/show_bug.cgi?id=141640 17 http://trac.webkit.org/changeset/180550 18 1 19 2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com> 2 20 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r180547 r180551 840 840 [preferences setOfflineWebApplicationCacheEnabled:YES]; 841 841 [preferences setDeveloperExtrasEnabled:NO]; 842 [preferences setJavaScript RuntimeFlags:WebKitJavaScriptRuntimeFlagsAllEnabled];842 [preferences setJavaScriptExperimentsEnabled:YES]; 843 843 [preferences setLoadsImagesAutomatically:YES]; 844 844 [preferences setLoadsSiteIconsIgnoringImageLoadingPreference:NO]; -
trunk/Tools/WebKitTestRunner/TestController.cpp
r180547 r180551 550 550 WKPreferencesSetMediaStreamEnabled(preferences, true); 551 551 WKPreferencesSetDeveloperExtrasEnabled(preferences, true); 552 WKPreferencesSetJavaScript RuntimeFlags(preferences, kWKJavaScriptRuntimeFlagsAllEnabled);552 WKPreferencesSetJavaScriptExperimentsEnabled(preferences, true); 553 553 WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(preferences, true); 554 554 WKPreferencesSetJavaScriptCanAccessClipboard(preferences, true);
Note: See TracChangeset
for help on using the changeset viewer.