+2015-02-23 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r180547 and r180550.
+ https://bugs.webkit.org/show_bug.cgi?id=141957
+
+ Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
+
+ Reverted changesets:
+
+ "REGRESSION(r179429): Can't type comments in Facebook"
+ https://bugs.webkit.org/show_bug.cgi?id=141859
+ http://trac.webkit.org/changeset/180547
+
+ "Constructor returning null should construct an object instead
+ of null"
+ https://bugs.webkit.org/show_bug.cgi?id=141640
+ http://trac.webkit.org/changeset/180550
+
2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com>
Constructor returning null should construct an object instead of null
+++ /dev/null
-Tests that op_to_primitive pass Symbol.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-str concat generates op_to_primitive.
-PASS doToPrimitive() threw exception TypeError: Type error.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../resources/js-test-pre.js"></script>
-</head>
-<body>
-<script src="script-tests/dfg-to-primitive-pass-symbol.js"></script>
-<script src="../resources/js-test-post.js"></script>
-</body>
-</html>
+++ /dev/null
-This tests the constructor returning masquerades as undefined return masquerades.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS result is document.all
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<script src="script-tests/constructor-with-return-masquerades.js"></script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
+++ /dev/null
-description("This tests the constructor returning masquerades as undefined return masquerades.");
-
-function Constructor() {
- return document.all;
-}
-var result = new Constructor();
-shouldBe("result", "document.all");
+++ /dev/null
-JSRegress/constructor-with-return
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS no exception thrown
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<script src="../../resources/regress-pre.js"></script>
-<script src="script-tests/constructor-with-return.js"></script>
-<script src="../../resources/regress-post.js"></script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
+++ /dev/null
-function Test(value, returnIt) {
- this.value = value;
- this.returnIt = returnIt;
-}
-
-var tests = [
- new Test("string", false),
- new Test(5, false),
- new Test(6.5, false),
- new Test(void(0), false),
- new Test(null, false),
- new Test(true, false),
- new Test(false, false),
- new Test(Symbol.iterator, false),
- new Test({f:42}, true),
- new Test([1, 2, 3], true),
- new Test(new String("string"), true),
- new Test(new Number(42), true),
- new Test(new Boolean(false), true),
- new Test(new Boolean(false), true),
- new Test(Object(Symbol.iterator), true),
-];
-
-tests.forEach(function (test) {
- function Constructor() {
- return test.value;
- }
-
- var result = new Constructor();
- if (test.returnIt) {
- if (test.value !== result) {
- throw "Bad result: " + result;
- }
- } else {
- if (!(result instanceof Constructor)) {
- throw "Bad result: " + result;
- }
- }
-});
+++ /dev/null
-description(
-"Tests that op_to_primitive pass Symbol."
-);
-
-var flag = false;
-debug("str concat generates op_to_primitive.");
-function toPrimitiveTarget() {
- if (flag) {
- return Symbol('Cocoa');
- }
- return 'Cappuccino';
-}
-noInline(toPrimitiveTarget);
-
-function doToPrimitive() {
- var value = toPrimitiveTarget();
- return value + "Cappuccino" + value;
-}
-
-while (!dfgCompiled({f:doToPrimitive})) {
- doToPrimitive();
-}
-flag = true;
-shouldThrow("doToPrimitive()", "'TypeError: Type error'");
+2015-02-23 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r180547 and r180550.
+ https://bugs.webkit.org/show_bug.cgi?id=141957
+
+ Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
+
+ Reverted changesets:
+
+ "REGRESSION(r179429): Can't type comments in Facebook"
+ https://bugs.webkit.org/show_bug.cgi?id=141859
+ http://trac.webkit.org/changeset/180547
+
+ "Constructor returning null should construct an object instead
+ of null"
+ https://bugs.webkit.org/show_bug.cgi?id=141640
+ http://trac.webkit.org/changeset/180550
+
2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com>
Constructor returning null should construct an object instead of null
__ZN3JSC12GlobalJSLockD1Ev
_JSGlobalContextCreateInGroup
__ZN3JSC14JSGlobalObjectC1ERNS_2VMEPNS_9StructureEPKNS_23GlobalObjectMethodTableE
+__ZN3JSC14JSGlobalObject28javaScriptExperimentsEnabledEPKS0_
_JSGlobalContextRetain
_JSStringCreateWithCFString
_JSEvaluateScript
__ZN3JSC11PostfixNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE
__ZN3JSC11PostfixNode11emitResolveERNS_17BytecodeGeneratorEPNS_10RegisterIDE
__ZN3JSC17BytecodeGenerator7emitIncEPNS_10RegisterIDE
+__ZN3JSC14jsIsObjectTypeEPNS_9ExecStateENS_7JSValueE
__ZN3JSC6JSCell11getCallDataEPS0_RNS_8CallDataE
__ZN3JSC8JSObject16getPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC8JSObject19getOwnPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSCL8getByValEPNS_9ExecStateENS_7JSValueES2_NS_16ReturnAddressPtrE
_cti_op_stricteq
_cti_op_jtrue
-_cti_op_is_object_or_null
+_cti_op_is_object
__ZN3JSC8JSString12toThisObjectEPNS_6JSCellEPNS_9ExecStateE
__ZN3JSC12StringObjectC1ERNS_2VMEPNS_9StructureE
__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
__ZN3WTF6VectorIPN3JSC8JSObjectELm4ENS_15CrashOnOverflowEE15reserveCapacityEm
__ZN3WTF15BinarySemaphore4waitEd
__ZN3WTF15BinarySemaphore6signalEv
+_JSValueIsObject
__ZN3JSCL19arrayProtoFuncShiftEPNS_9ExecStateE
__ZN3JSC5shiftILNS_7JSArray14ShiftCountModeE0EEEvPNS_9ExecStateEPNS_8JSObjectEjjjj
__ZN3JSC7JSArray26shiftCountWithArrayStorageEjjPNS_12ArrayStorageE
__ZN3JSC8JSObject20ensureContiguousSlowERNS_2VME
__ZN3JSC8JSObject20ensureContiguousSlowERNS_2VMENS0_22DoubleToContiguousModeE
_operationMakeRope3
+_operationIsObject
__ZN3JSC3DFG12slowPathCallINS_22AbstractMacroAssemblerINS_12X86AssemblerEE4JumpEPFxPNS_9ExecStateExPNS_7JSArrayEENS0_11NoResultTagENS_12X86Registers10RegisterIDESE_SE_EEN3WTF10PassOwnPtrINS0_17SlowPathGeneratorEEET_PNS0_14SpeculativeJITET0_T1_T2_T3_T4_NS0_18SpillRegistersModeE
__ZN3JSC3DFG14SpeculativeJIT13callOperationEPFxPNS_9ExecStateExPNS_7JSArrayEENS_12X86Registers10RegisterIDES9_S9_
_operationArrayPush
_llint_slow_path_check_has_instance
_llint_slow_path_instanceof
_llint_slow_path_typeof
-_llint_slow_path_is_object_or_null
+_llint_slow_path_is_object
_llint_slow_path_is_function
_llint_slow_path_in
_llint_slow_path_resolve
_llint_op_greatereq
_llint_op_mod
_llint_op_typeof
-_llint_op_is_object_or_null
+_llint_op_is_object
_llint_op_is_function
_llint_op_in
_llint_op_put_to_base_variable
<ClInclude Include="..\runtime\RegExpObject.h" />
<ClInclude Include="..\runtime\RegExpPrototype.h" />
<ClInclude Include="..\runtime\Reject.h" />
- <ClInclude Include="..\runtime\RuntimeFlags.h" />
<ClInclude Include="..\runtime\SamplingCounter.h" />
<ClInclude Include="..\runtime\SetConstructor.h" />
<ClInclude Include="..\runtime\SetIteratorConstructor.h" />
<ClInclude Include="..\runtime\Reject.h">
<Filter>runtime</Filter>
</ClInclude>
- <ClInclude Include="..\runtime\RuntimeFlags.h">
- <Filter>runtime</Filter>
- </ClInclude>
<ClInclude Include="..\runtime\SamplingCounter.h">
<Filter>runtime</Filter>
</ClInclude>
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, ); }; };
- 70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 70B0A9D01A9B66200001306A /* RuntimeFlags.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 */; };
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>"; };
- 70B0A9D01A9B66200001306A /* RuntimeFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeFlags.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>"; };
BCD202C00E1706A7002C7E82 /* RegExpPrototype.h */,
0F6B1CB81861244C00845D97 /* RegisterPreservationMode.h */,
0FB7F39115ED8E3800F167B2 /* Reject.h */,
- 70B0A9D01A9B66200001306A /* RuntimeFlags.h */,
0F7700911402FF280078EB39 /* SamplingCounter.cpp */,
0F77008E1402FDD60078EB39 /* SamplingCounter.h */,
A7299DA317D12858005F5FF9 /* SetConstructor.cpp */,
0FF42744158EBE91004CB9FF /* udis86_input.h in Headers */,
0FF42748158EBE91004CB9FF /* udis86_syn.h in Headers */,
0FF42749158EBE91004CB9FF /* udis86_types.h in Headers */,
- 70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */,
A7E5AB391799E4B200D2833D /* UDis86Disassembler.h in Headers */,
A7A8AF4117ADB5F3005AB174 /* Uint16Array.h in Headers */,
0FE834181A6EF97B00D04847 /* PolymorphicCallStubRoutine.h in Headers */,
{ "name" : "op_is_number", "length" : 3 },
{ "name" : "op_is_string", "length" : 3 },
{ "name" : "op_is_object", "length" : 3 },
- { "name" : "op_is_object_or_null", "length" : 3 },
{ "name" : "op_is_function", "length" : 3 },
{ "name" : "op_in", "length" : 4 },
{ "name" : "op_init_global_const_nop", "length" : 5 },
case op_is_number:
case op_is_string:
case op_is_object:
- case op_is_object_or_null:
case op_is_function:
case op_to_number:
case op_negate:
case op_is_number:
case op_is_string:
case op_is_object:
- case op_is_object_or_null:
case op_is_function:
case op_in:
case op_to_number:
printUnaryOp(out, exec, location, it, "is_object");
break;
}
- case op_is_object_or_null: {
- printUnaryOp(out, exec, location, it, "is_object_or_null");
- break;
- }
case op_is_function: {
printUnaryOp(out, exec, location, it, "is_function");
break;
// If the structure corresponds to something that isn't an object, then give up, since
// we don't want to be adding properties to strings.
- if (!structure->typeInfo().isObject())
+ if (structure->typeInfo().type() == StringType)
return PutByIdStatus(TakesSlowPath);
RefPtr<IntendedStructureChain> chain;
}
if (value == "object") {
rewindUnaryOp();
- emitOpcode(op_is_object_or_null);
+ emitOpcode(op_is_object);
instructions().append(dst->index());
instructions().append(srcIndex);
return dst;
instructions().append(isObjectRegister->index());
instructions().append(isObjectLabel->bind(begin, instructions().size()));
+ emitOpcode(op_is_function);
+ instructions().append(isObjectRegister->index());
+ instructions().append(src->index());
+
+ begin = instructions().size();
+ emitOpcode(op_jtrue);
+ instructions().append(isObjectRegister->index());
+ instructions().append(isObjectLabel->bind(begin, instructions().size()));
+
emitUnaryNoDstOp(op_ret, &m_thisRegister);
emitLabel(isObjectLabel.get());
case IsNumber:
case IsString:
case IsObject:
- case IsObjectOrNull:
case IsFunction: {
JSValue child = forNode(node->child1()).value();
if (child) {
setConstant(node, jsBoolean(isJSString(child)));
break;
case IsObject:
- setConstant(node, jsBoolean(child.isObject()));
- break;
- case IsObjectOrNull:
if (child.isNull() || !child.isObject()) {
setConstant(node, jsBoolean(child.isNull()));
break;
NEXT_OPCODE(op_is_object);
}
- case op_is_object_or_null: {
- Node* value = get(VirtualRegister(currentInstruction[2].u.operand));
- set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(IsObjectOrNull, value));
- NEXT_OPCODE(op_is_object_or_null);
- }
-
case op_is_function: {
Node* value = get(VirtualRegister(currentInstruction[2].u.operand));
set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(IsFunction, value));
case op_is_number:
case op_is_string:
case op_is_object:
- case op_is_object_or_null:
case op_is_function:
case op_not:
case op_less:
case IsBoolean:
case IsNumber:
case IsString:
- case IsObject:
case LogicalNot:
case CheckInBounds:
case DoubleRep:
def(HeapLocation(AllocationProfileWatchpointLoc, MiscFields), node);
return;
- case IsObjectOrNull:
+ case IsObject:
read(MiscFields);
- def(HeapLocation(IsObjectOrNullLoc, MiscFields, node->child1()), node);
+ def(HeapLocation(IsObjectLoc, MiscFields, node->child1()), node);
return;
case IsFunction:
case IsNumber:
case IsString:
case IsObject:
- case IsObjectOrNull:
case IsFunction:
case TypeOf:
case LogicalNot:
}
break;
- case IsObject:
- if (node->child1()->shouldSpeculateObject()) {
- m_insertionSet.insertNode(
- m_indexInBlock, SpecNone, Phantom, node->origin,
- Edge(node->child1().node(), ObjectUse));
- m_graph.convertToConstant(node, jsBoolean(true));
- observeUseKindOnNode<ObjectUse>(node);
- }
- break;
-
case GetEnumerableLength: {
fixEdge<CellUse>(node->child1());
break;
case IsUndefined:
case IsBoolean:
case IsNumber:
- case IsObjectOrNull:
+ case IsObject:
case IsFunction:
case CreateArguments:
case PhantomArguments:
out.print("InvalidationPointLoc");
return;
- case IsObjectOrNullLoc:
- out.print("IsObjectOrNullLoc");
+ case IsObjectLoc:
+ out.print("IsObjectLoc");
return;
-
+
case IsFunctionLoc:
out.print("IsFunctionLoc");
return;
InstanceOfLoc,
InvalidationPointLoc,
IsFunctionLoc,
- IsObjectOrNullLoc,
+ IsObjectLoc,
MyArgumentByValLoc,
MyArgumentsLengthLoc,
NamedPropertyLoc,
macro(IsNumber, NodeResultBoolean) \
macro(IsString, NodeResultBoolean) \
macro(IsObject, NodeResultBoolean) \
- macro(IsObjectOrNull, NodeResultBoolean) \
macro(IsFunction, NodeResultBoolean) \
macro(TypeOf, NodeResultJS) \
macro(LogicalNot, NodeResultBoolean) \
return JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), scope);
}
-size_t JIT_OPERATION operationIsObjectOrNull(ExecState* exec, EncodedJSValue value)
+size_t JIT_OPERATION operationIsObject(ExecState* exec, EncodedJSValue value)
{
- return jsIsObjectTypeOrNull(exec, JSValue::decode(value));
+ return jsIsObjectType(exec, JSValue::decode(value));
}
size_t JIT_OPERATION operationIsFunction(EncodedJSValue value)
EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL;
JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSScope*, JSCell*) WTF_INTERNAL;
double JIT_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL;
-size_t JIT_OPERATION operationIsObjectOrNull(ExecState*, EncodedJSValue) WTF_INTERNAL;
+size_t JIT_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL;
size_t JIT_OPERATION operationIsFunction(EncodedJSValue) WTF_INTERNAL;
JSCell* JIT_OPERATION operationTypeOf(ExecState*, JSCell*) WTF_INTERNAL;
char* JIT_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState*) WTF_INTERNAL;
case IsNumber:
case IsString:
case IsObject:
- case IsObjectOrNull:
case IsFunction: {
changed |= setPrediction(SpecBoolean);
break;
case IsNumber:
case IsString:
case IsObject:
- case IsObjectOrNull:
case IsFunction:
case TypeOf:
case LogicalNot:
if (masqueradesAsUndefinedWatchpointIsStillValid()) {
if (m_state.forNode(node->child1()).m_type & ~SpecObject) {
speculationCheck(
- BadType, JSValueSource::unboxedCell(op1GPR), node->child1(), branchNotObject(op1GPR));
+ BadType, JSValueSource::unboxedCell(op1GPR), node->child1(),
+ m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
}
if (m_state.forNode(node->child2()).m_type & ~SpecObject) {
speculationCheck(
- BadType, JSValueSource::unboxedCell(op2GPR), node->child2(), branchNotObject(op2GPR));
+ BadType, JSValueSource::unboxedCell(op2GPR), node->child2(),
+ m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
}
} else {
+ GPRTemporary structure(this);
+ GPRTemporary temp(this);
+ GPRReg structureGPR = structure.gpr();
+
+ m_jit.emitLoadStructure(op1GPR, structureGPR, temp.gpr());
if (m_state.forNode(node->child1()).m_type & ~SpecObject) {
speculationCheck(
BadType, JSValueSource::unboxedCell(op1GPR), node->child1(),
- branchNotObject(op1GPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ structureGPR,
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
}
speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(),
m_jit.branchTest8(
MacroAssembler::Address(op1GPR, JSCell::typeInfoFlagsOffset()),
MacroAssembler::TrustedImm32(MasqueradesAsUndefined)));
+ m_jit.emitLoadStructure(op2GPR, structureGPR, temp.gpr());
if (m_state.forNode(node->child2()).m_type & ~SpecObject) {
speculationCheck(
BadType, JSValueSource::unboxedCell(op2GPR), node->child2(),
- branchNotObject(op2GPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ structureGPR,
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
}
speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(),
m_jit.branchTest8(
fastTrue.append(m_jit.branchPtr(
MacroAssembler::Equal, leftGPR, rightRegs.payloadGPR()));
- fastFalse.append(branchNotString(rightRegs.payloadGPR()));
+ fastFalse.append(m_jit.branchStructurePtr(
+ MacroAssembler::NotEqual,
+ MacroAssembler::Address(rightRegs.payloadGPR(), JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
compileStringEquality(
node, leftGPR, rightRegs.payloadGPR(), lengthGPR, leftTempGPR, rightTempGPR, leftTemp2GPR,
moveFalseTo(rightTempGPR);
JITCompiler::JumpList notString;
notString.append(branchNotCell(rightRegs));
- notString.append(branchNotString(rightRegs.payloadGPR()));
+ notString.append(m_jit.branchStructurePtr(
+ MacroAssembler::NotEqual,
+ MacroAssembler::Address(rightRegs.payloadGPR(), JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
speculateStringIdentAndLoadStorage(notStringVarEdge, rightRegs.payloadGPR(), rightTempGPR);
m_jit.load32(JITCompiler::Address(op1GPR, JSCell::structureIDOffset()), resultGPR);
JITCompiler::Jump isString = m_jit.branchStructurePtr(
- JITCompiler::Equal,
+ JITCompiler::Equal,
resultGPR,
m_jit.vm()->stringStructure.get());
-
+
speculateStringObjectForStructure(node->child1(), resultGPR);
m_jit.loadPtr(JITCompiler::Address(op1GPR, JSWrapperObject::internalValueCellOffset()), resultGPR);
flushRegisters();
JITCompiler::Jump done;
if (node->child1()->prediction() & SpecString) {
- JITCompiler::Jump needCall = branchNotString(op1GPR);
+ JITCompiler::Jump needCall = m_jit.branchStructurePtr(
+ JITCompiler::NotEqual,
+ JITCompiler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get());
m_jit.move(op1GPR, resultGPR);
done = m_jit.jump();
needCall.link(&m_jit);
SpeculateCellOperand operand(this, edge);
GPRReg gpr = operand.gpr();
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(gpr), edge, SpecObject, branchNotObject(gpr));
+ JSValueSource::unboxedCell(gpr), edge, SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(gpr, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
}
void SpeculativeJIT::speculateFunction(Edge edge)
MacroAssembler::Jump notCell = branchNotCell(operand.jsValueRegs());
GPRReg gpr = operand.jsValueRegs().payloadGPR();
DFG_TYPE_CHECK(
- operand.jsValueRegs(), edge, (~SpecCell) | SpecObject, branchNotObject(gpr));
+ operand.jsValueRegs(), edge, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(gpr, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
MacroAssembler::Jump done = m_jit.jump();
notCell.link(&m_jit);
if (needsTypeCheck(edge, SpecCell | SpecOther)) {
void SpeculativeJIT::speculateString(Edge edge, GPRReg cell)
{
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(cell), edge, SpecString | ~SpecCell, branchNotString(cell));
+ JSValueSource::unboxedCell(cell), edge, SpecString | ~SpecCell,
+ m_jit.branchStructurePtr(
+ MacroAssembler::NotEqual,
+ MacroAssembler::Address(cell, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
}
void SpeculativeJIT::speculateStringIdentAndLoadStorage(Edge edge, GPRReg string, GPRReg storage)
JITCompiler::Jump notCell = branchNotCell(operand.jsValueRegs());
GPRReg cell = operand.jsValueRegs().payloadGPR();
- JITCompiler::Jump notString = branchNotString(cell);
+ JITCompiler::Jump notString = m_jit.branchStructurePtr(
+ MacroAssembler::NotEqual,
+ MacroAssembler::Address(cell, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get());
speculateStringIdentAndLoadStorage(edge, cell, tempGPR);
addBranch(branchNotCell(op1Regs), data->fallThrough.block);
- addBranch(branchNotString(op1Regs.payloadGPR()), data->fallThrough.block);
+ addBranch(
+ m_jit.branchStructurePtr(
+ MacroAssembler::NotEqual,
+ MacroAssembler::Address(op1Regs.payloadGPR(), JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()),
+ data->fallThrough.block);
emitSwitchCharStringJump(data, op1Regs.payloadGPR(), tempGPR);
noResult(node, UseChildrenCalledExplicitly);
addBranch(branchNotCell(op1Regs), data->fallThrough.block);
- addBranch(branchNotString(op1Regs.payloadGPR()), data->fallThrough.block);
+ addBranch(
+ m_jit.branchStructurePtr(
+ MacroAssembler::NotEqual,
+ MacroAssembler::Address(op1Regs.payloadGPR(), JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()),
+ data->fallThrough.block);
emitSwitchStringOnString(data, op1Regs.payloadGPR());
noResult(node, UseChildrenCalledExplicitly);
}
}
-JITCompiler::Jump SpeculativeJIT::branchIsObject(GPRReg cellGPR)
-{
- return m_jit.branch8(
- MacroAssembler::AboveOrEqual,
- MacroAssembler::Address(cellGPR, JSCell::typeInfoTypeOffset()),
- MacroAssembler::TrustedImm32(ObjectType));
-}
-
-JITCompiler::Jump SpeculativeJIT::branchNotObject(GPRReg cellGPR)
-{
- return m_jit.branch8(
- MacroAssembler::Below,
- MacroAssembler::Address(cellGPR, JSCell::typeInfoTypeOffset()),
- MacroAssembler::TrustedImm32(ObjectType));
-}
-
-JITCompiler::Jump SpeculativeJIT::branchIsString(GPRReg cellGPR)
-{
- return m_jit.branchStructurePtr(
- MacroAssembler::Equal,
- MacroAssembler::Address(cellGPR, JSCell::structureIDOffset()),
- m_jit.vm()->stringStructure.get());
-}
-
-JITCompiler::Jump SpeculativeJIT::branchNotString(GPRReg cellGPR)
-{
- return m_jit.branchStructurePtr(
- MacroAssembler::NotEqual,
- MacroAssembler::Address(cellGPR, JSCell::structureIDOffset()),
- m_jit.vm()->stringStructure.get());
-}
-
#if ENABLE(GGC)
void SpeculativeJIT::compileStoreBarrier(Node* node)
{
JITCompiler::Jump branchNotCell(JSValueRegs);
JITCompiler::Jump branchIsOther(JSValueRegs, GPRReg tempGPR);
JITCompiler::Jump branchNotOther(JSValueRegs, GPRReg tempGPR);
- JITCompiler::Jump branchIsObject(GPRReg cellGPR);
- JITCompiler::Jump branchNotObject(GPRReg cellGPR);
- JITCompiler::Jump branchIsString(GPRReg cellGPR);
- JITCompiler::Jump branchNotString(GPRReg cellGPR);
void moveTrueTo(GPRReg);
void moveFalseTo(GPRReg);
if (masqueradesAsUndefinedWatchpointIsStillValid()) {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR));
+ JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
} else {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR));
- speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(),
+ JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
+ speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(),
m_jit.branchTest8(
MacroAssembler::NonZero,
- MacroAssembler::Address(op1GPR, JSCell::typeInfoFlagsOffset()),
+ MacroAssembler::Address(op1GPR, JSCell::typeInfoFlagsOffset()),
MacroAssembler::TrustedImm32(MasqueradesAsUndefined)));
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR));
- speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(),
+ JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
+ speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(),
m_jit.branchTest8(
- MacroAssembler::NonZero,
- MacroAssembler::Address(op2GPR, JSCell::typeInfoFlagsOffset()),
+ MacroAssembler::NonZero,
+ MacroAssembler::Address(op2GPR, JSCell::typeInfoFlagsOffset()),
MacroAssembler::TrustedImm32(MasqueradesAsUndefined)));
}
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
} else {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
// We know that within this branch, rightChild must be a cell.
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2PayloadGPR));
+ JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject,
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
} else {
DFG_TYPE_CHECK(
- JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2PayloadGPR));
+ JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject,
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
speculationCheck(BadType, JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
} else {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject,
- branchNotObject(op2PayloadGPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
} else {
DFG_TYPE_CHECK(
JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild, (~SpecCell) | SpecObject,
- branchNotObject(op2PayloadGPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2PayloadGPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
speculationCheck(BadType, JSValueRegs(op2TagGPR, op2PayloadGPR), rightChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject,
- branchNotObject(valuePayloadGPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
} else {
+ m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), structureGPR);
+
DFG_TYPE_CHECK(
JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject,
- branchNotObject(valuePayloadGPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ structureGPR,
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
MacroAssembler::Jump isNotMasqueradesAsUndefined =
m_jit.branchTest8(
MacroAssembler::Address(valuePayloadGPR, JSCell::typeInfoFlagsOffset()),
MacroAssembler::TrustedImm32(MasqueradesAsUndefined));
- m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), structureGPR);
speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse,
m_jit.branchPtr(
MacroAssembler::Equal,
if (masqueradesAsUndefinedWatchpointIsStillValid()) {
DFG_TYPE_CHECK(
JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject,
- branchNotObject(valuePayloadGPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()),
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
} else {
+ m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), scratchGPR);
+
DFG_TYPE_CHECK(
JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse, (~SpecCell) | SpecObject,
- branchNotObject(valuePayloadGPR));
+ m_jit.branchPtr(
+ MacroAssembler::Equal,
+ scratchGPR,
+ MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get())));
JITCompiler::Jump isNotMasqueradesAsUndefined = m_jit.branchTest8(
JITCompiler::Zero,
MacroAssembler::Address(valuePayloadGPR, JSCell::typeInfoFlagsOffset()),
TrustedImm32(MasqueradesAsUndefined));
- m_jit.loadPtr(MacroAssembler::Address(valuePayloadGPR, JSCell::structureIDOffset()), scratchGPR);
speculationCheck(BadType, JSValueRegs(valueTagGPR, valuePayloadGPR), nodeUse,
m_jit.branchPtr(
MacroAssembler::Equal,
m_jit.move(op1PayloadGPR, resultPayloadGPR);
} else {
MacroAssembler::Jump alreadyPrimitive = branchNotCell(op1.jsValueRegs());
- MacroAssembler::Jump notPrimitive = branchIsObject(op1PayloadGPR);
+ MacroAssembler::Jump notPrimitive = m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(op1PayloadGPR, JSCell::structureIDOffset()), MacroAssembler::TrustedImmPtr(m_jit.vm()->stringStructure.get()));
alreadyPrimitive.link(&m_jit);
m_jit.move(op1TagGPR, resultTagGPR);
JITCompiler::Jump done;
if (node->child1()->prediction() & SpecString) {
JITCompiler::Jump slowPath1 = branchNotCell(op1.jsValueRegs());
- JITCompiler::Jump slowPath2 = branchNotString(op1PayloadGPR);
+ JITCompiler::Jump slowPath2 = m_jit.branchPtr(
+ JITCompiler::NotEqual,
+ JITCompiler::Address(op1PayloadGPR, JSCell::structureIDOffset()),
+ TrustedImmPtr(m_jit.vm()->stringStructure.get()));
m_jit.move(op1PayloadGPR, resultGPR);
done = m_jit.jump();
slowPath1.link(&m_jit);
case IsObject: {
JSValueOperand value(this, node->child1());
- GPRTemporary result(this, Reuse, value, TagWord);
-
- JITCompiler::Jump isNotCell = branchNotCell(value.jsValueRegs());
-
- m_jit.compare8(JITCompiler::AboveOrEqual,
- JITCompiler::Address(value.payloadGPR(), JSCell::typeInfoTypeOffset()),
- TrustedImm32(ObjectType),
- result.gpr());
- JITCompiler::Jump done = m_jit.jump();
-
- isNotCell.link(&m_jit);
- m_jit.move(TrustedImm32(0), result.gpr());
-
- done.link(&m_jit);
- booleanResult(result.gpr(), node);
- break;
- }
-
- case IsObjectOrNull: {
- JSValueOperand value(this, node->child1());
GPRReg valueTagGPR = value.tagGPR();
GPRReg valuePayloadGPR = value.payloadGPR();
GPRFlushedCallResult result(this);
GPRReg resultGPR = result.gpr();
flushRegisters();
- callOperation(operationIsObjectOrNull, resultGPR, valueTagGPR, valuePayloadGPR);
+ callOperation(operationIsObject, resultGPR, valueTagGPR, valuePayloadGPR);
booleanResult(result.gpr(), node);
break;
}
DFG_TYPE_CHECK(JSValueRegs(tagGPR, payloadGPR), node->child1(), SpecCell, isNotCell);
if (!node->child1()->shouldSpeculateObject() || node->child1().useKind() == StringUse) {
- JITCompiler::Jump notString = branchNotString(payloadGPR);
+ JITCompiler::Jump notString = m_jit.branch8(
+ JITCompiler::NotEqual,
+ JITCompiler::Address(payloadGPR, JSCell::typeInfoTypeOffset()),
+ TrustedImm32(StringType));
if (node->child1().useKind() == StringUse)
DFG_TYPE_CHECK(JSValueRegs(tagGPR, payloadGPR), node->child1(), SpecString, notString);
m_jit.move(TrustedImmPtr(m_jit.vm()->smallStrings.stringString()), resultGPR);
if (masqueradesAsUndefinedWatchpointIsStillValid()) {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR));
+ JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
} else {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), node->child1(), SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), node->child1(),
m_jit.branchTest8(
MacroAssembler::NonZero,
MacroAssembler::TrustedImm32(MasqueradesAsUndefined)));
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, branchNotObject(op2GPR));
+ JSValueSource::unboxedCell(op2GPR), node->child2(), SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
speculationCheck(BadType, JSValueSource::unboxedCell(op2GPR), node->child2(),
m_jit.branchTest8(
MacroAssembler::NonZero,
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
} else {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
// We know that within this branch, rightChild must be a cell.
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR));
+ JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
} else {
DFG_TYPE_CHECK(
- JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR));
+ JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
speculationCheck(BadType, JSValueRegs(op2GPR), rightChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
} else {
DFG_TYPE_CHECK(
- JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, branchNotObject(op1GPR));
+ JSValueSource::unboxedCell(op1GPR), leftChild, SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
speculationCheck(BadType, JSValueSource::unboxedCell(op1GPR), leftChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
// We know that within this branch, rightChild must be a cell.
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR));
+ JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
} else {
DFG_TYPE_CHECK(
- JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, branchNotObject(op2GPR));
+ JSValueRegs(op2GPR), rightChild, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(op2GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
speculationCheck(BadType, JSValueRegs(op2GPR), rightChild,
m_jit.branchTest8(
MacroAssembler::NonZero,
MacroAssembler::Jump notCell = branchNotCell(JSValueRegs(valueGPR));
if (masqueradesAsUndefinedWatchpointValid) {
DFG_TYPE_CHECK(
- JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR));
+ JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
} else {
DFG_TYPE_CHECK(
- JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR));
+ JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
MacroAssembler::Jump isNotMasqueradesAsUndefined =
m_jit.branchTest8(
MacroAssembler::Jump notCell = branchNotCell(JSValueRegs(valueGPR));
if (masqueradesAsUndefinedWatchpointIsStillValid()) {
DFG_TYPE_CHECK(
- JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR));
+ JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
} else {
DFG_TYPE_CHECK(
- JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, branchNotObject(valueGPR));
+ JSValueRegs(valueGPR), nodeUse, (~SpecCell) | SpecObject, m_jit.branchStructurePtr(
+ MacroAssembler::Equal,
+ MacroAssembler::Address(valueGPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get()));
JITCompiler::Jump isNotMasqueradesAsUndefined = m_jit.branchTest8(
JITCompiler::Zero,
op1.use();
MacroAssembler::Jump alreadyPrimitive = branchNotCell(JSValueRegs(op1GPR));
- MacroAssembler::Jump notPrimitive = branchIsObject(op1GPR);
+ MacroAssembler::Jump notPrimitive = m_jit.branchStructurePtr(
+ MacroAssembler::NotEqual,
+ MacroAssembler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get());
alreadyPrimitive.link(&m_jit);
m_jit.move(op1GPR, resultGPR);
JITCompiler::Jump done;
if (node->child1()->prediction() & SpecString) {
JITCompiler::Jump slowPath1 = branchNotCell(JSValueRegs(op1GPR));
- JITCompiler::Jump slowPath2 = branchNotString(op1GPR);
+ JITCompiler::Jump slowPath2 = m_jit.branchStructurePtr(
+ JITCompiler::NotEqual,
+ JITCompiler::Address(op1GPR, JSCell::structureIDOffset()),
+ m_jit.vm()->stringStructure.get());
m_jit.move(op1GPR, resultGPR);
done = m_jit.jump();
slowPath1.link(&m_jit);
jsValueResult(result.gpr(), node, DataFormatJSBoolean);
break;
}
-
+
case IsObject: {
JSValueOperand value(this, node->child1());
- GPRTemporary result(this, Reuse, value);
-
- JITCompiler::Jump isNotCell = branchNotCell(value.jsValueRegs());
-
- m_jit.compare8(JITCompiler::AboveOrEqual,
- JITCompiler::Address(value.gpr(), JSCell::typeInfoTypeOffset()),
- TrustedImm32(ObjectType),
- result.gpr());
- m_jit.or32(TrustedImm32(ValueFalse), result.gpr());
- JITCompiler::Jump done = m_jit.jump();
-
- isNotCell.link(&m_jit);
- m_jit.move(TrustedImm32(ValueFalse), result.gpr());
-
- done.link(&m_jit);
- jsValueResult(result.gpr(), node, DataFormatJSBoolean);
- break;
- }
-
- case IsObjectOrNull: {
- JSValueOperand value(this, node->child1());
GPRReg valueGPR = value.gpr();
GPRFlushedCallResult result(this);
GPRReg resultGPR = result.gpr();
flushRegisters();
- callOperation(operationIsObjectOrNull, resultGPR, valueGPR);
+ callOperation(operationIsObject, resultGPR, valueGPR);
m_jit.or32(TrustedImm32(ValueFalse), resultGPR);
jsValueResult(result.gpr(), node, DataFormatJSBoolean);
break;
DFG_TYPE_CHECK(JSValueSource(valueGPR), node->child1(), SpecCell, isNotCell);
if (!node->child1()->shouldSpeculateObject() || node->child1().useKind() == StringUse) {
- JITCompiler::Jump notString = branchNotString(valueGPR);
+ JITCompiler::Jump notString = m_jit.branch8(
+ JITCompiler::NotEqual,
+ JITCompiler::Address(valueGPR, JSCell::typeInfoTypeOffset()),
+ TrustedImm32(StringType));
if (node->child1().useKind() == StringUse)
DFG_TYPE_CHECK(JSValueSource(valueGPR), node->child1(), SpecString, notString);
m_jit.move(TrustedImmPtr(m_jit.vm()->smallStrings.stringString()), resultGPR);
jumpToEnd.append(m_jit.branchTest64(MacroAssembler::NonZero, valueGPR, GPRInfo::tagTypeNumberRegister));
else if (cachedTypeLocation->m_lastSeenType == TypeString) {
MacroAssembler::Jump isNotCell = branchNotCell(JSValueRegs(valueGPR));
- jumpToEnd.append(branchIsString(valueGPR));
+ jumpToEnd.append(m_jit.branch8(MacroAssembler::Equal, MacroAssembler::Address(valueGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
isNotCell.link(&m_jit);
}
case IsNumber:
case IsString:
case IsObject:
- case IsObjectOrNull:
case IsFunction:
case CheckHasInstance:
case InstanceOf:
case IsObject:
compileIsObject();
break;
- case IsObjectOrNull:
- compileIsObjectOrNull();
- break;
case IsFunction:
compileIsFunction();
break;
ValueFromBlock simpleResult = m_out.anchor(value);
LValue isStringPredicate;
if (m_node->child1()->prediction() & SpecString) {
- isStringPredicate = isString(value);
+ isStringPredicate = m_out.equal(
+ m_out.load32(value, m_heaps.JSCell_structureID),
+ m_out.constInt32(vm().stringStructure->id()));
} else
isStringPredicate = m_out.booleanFalse;
m_out.branch(isStringPredicate, unsure(continuation), unsure(notString));
m_out.appendTo(continuation, lastNext);
setBoolean(m_out.phi(m_out.boolean, notCellResult, cellResult));
}
-
+
void compileIsObject()
{
- LValue value = lowJSValue(m_node->child1());
-
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("IsObject cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsObject continuation"));
-
- ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
- m_out.branch(isCell(value), unsure(isCellCase), unsure(continuation));
-
- LBasicBlock lastNext = m_out.appendTo(isCellCase, continuation);
- ValueFromBlock cellResult = m_out.anchor(isObject(value));
- m_out.jump(continuation);
-
- m_out.appendTo(continuation, lastNext);
- setBoolean(m_out.phi(m_out.boolean, notCellResult, cellResult));
- }
-
- void compileIsObjectOrNull()
- {
LValue pointerResult = vmCall(
- m_out.operation(operationIsObjectOrNull), m_callFrame, lowJSValue(m_node->child1()));
+ m_out.operation(operationIsObject), m_callFrame, lowJSValue(m_node->child1()));
setBoolean(m_out.notNull(pointerResult));
}
return;
}
- FTL_TYPE_CHECK(jsValueValue(cell), edge, filter, isNotObject(cell));
+ LValue structureID = m_out.load32(cell, m_heaps.JSCell_structureID);
+ FTL_TYPE_CHECK(
+ jsValueValue(cell), edge, filter,
+ m_out.equal(structureID, m_out.constInt32(vm().stringStructure->id())));
speculate(
BadType, jsValueValue(cell), edge.node(),
m_out.testNonZero8(
break;
case CellCaseSpeculatesObject:
FTL_TYPE_CHECK(
- jsValueValue(value), edge, (~SpecCell) | SpecObject, isNotObject(value));
+ jsValueValue(value), edge, (~SpecCell) | SpecObject,
+ m_out.equal(
+ m_out.load32(value, m_heaps.JSCell_structureID),
+ m_out.constInt32(vm().stringStructure->id())));
break;
}
LValue isObject(LValue cell)
{
- return m_out.aboveOrEqual(
- m_out.load8(cell, m_heaps.JSCell_typeInfoType),
- m_out.constInt8(ObjectType));
- }
-
- LValue isNotObject(LValue cell)
- {
- return m_out.below(
- m_out.load8(cell, m_heaps.JSCell_typeInfoType),
- m_out.constInt8(ObjectType));
- }
-
- LValue isNotString(LValue cell)
- {
return m_out.notEqual(
m_out.load32(cell, m_heaps.JSCell_structureID),
m_out.constInt32(vm().stringStructure->id()));
}
+ LValue isNotString(LValue cell)
+ {
+ return isObject(cell);
+ }
+
LValue isString(LValue cell)
{
return m_out.equal(
m_out.constInt32(vm().stringStructure->id()));
}
+ LValue isNotObject(LValue cell)
+ {
+ return isString(cell);
+ }
+
LValue isArrayType(LValue cell, ArrayMode arrayMode)
{
switch (arrayMode.type()) {
void speculateNonNullObject(Edge edge, LValue cell)
{
- FTL_TYPE_CHECK(jsValueValue(cell), edge, SpecObject, isNotObject(cell));
+ FTL_TYPE_CHECK(
+ jsValueValue(cell), edge, SpecObject,
+ m_out.equal(
+ m_out.load32(cell, m_heaps.JSCell_structureID),
+ m_out.constInt32(vm().stringStructure->id())));
if (masqueradesAsUndefinedWatchpointIsStillValid())
return;
DEFINE_SLOW_OP(greater)
DEFINE_SLOW_OP(greatereq)
DEFINE_SLOW_OP(is_function)
- DEFINE_SLOW_OP(is_object_or_null)
+ DEFINE_SLOW_OP(is_object)
DEFINE_SLOW_OP(typeof)
DEFINE_OP(op_touch_entry)
DEFINE_OP(op_is_boolean)
DEFINE_OP(op_is_number)
DEFINE_OP(op_is_string)
- DEFINE_OP(op_is_object)
DEFINE_OP(op_jeq_null)
DEFINE_OP(op_jfalse)
DEFINE_OP(op_jmp)
void emitLoadDouble(int index, FPRegisterID value);
void emitLoadInt32ToDouble(int index, FPRegisterID value);
- Jump emitJumpIfCellObject(RegisterID cellReg);
Jump emitJumpIfCellNotObject(RegisterID cellReg);
enum WriteBarrierMode { UnconditionalWriteBarrier, ShouldFilterBase, ShouldFilterValue, ShouldFilterBaseAndValue };
void emit_op_is_boolean(Instruction*);
void emit_op_is_number(Instruction*);
void emit_op_is_string(Instruction*);
- void emit_op_is_object(Instruction*);
void emit_op_jeq_null(Instruction*);
void emit_op_jfalse(Instruction*);
void emit_op_jmp(Instruction*);
jump.linkTo(m_labels[m_bytecodeOffset + relativeOffset], this);
}
-ALWAYS_INLINE JIT::Jump JIT::emitJumpIfCellObject(RegisterID cellReg)
-{
- return branch8(AboveOrEqual, Address(cellReg, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType));
-}
-
ALWAYS_INLINE JIT::Jump JIT::emitJumpIfCellNotObject(RegisterID cellReg)
{
return branch8(Below, Address(cellReg, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType));
emitPutVirtualRegister(dst);
}
-void JIT::emit_op_is_object(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int value = currentInstruction[2].u.operand;
-
- emitGetVirtualRegister(value, regT0);
- Jump isNotCell = emitJumpIfNotJSCell(regT0);
-
- compare8(AboveOrEqual, Address(regT0, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType), regT0);
- emitTagAsBoolImmediate(regT0);
- Jump done = jump();
-
- isNotCell.link(this);
- move(TrustedImm32(ValueFalse), regT0);
-
- done.link(this);
- emitPutVirtualRegister(dst);
-}
-
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
int arguments = currentInstruction[1].u.operand;
emitGetVirtualRegister(src, regT0);
Jump isImm = emitJumpIfNotJSCell(regT0);
- addSlowCase(emitJumpIfCellObject(regT0));
+ addSlowCase(branchStructure(NotEqual,
+ Address(regT0, JSCell::structureIDOffset()),
+ m_vm->stringStructure.get()));
isImm.link(this);
if (dst != src)
emitStoreBool(dst, regT0);
}
-void JIT::emit_op_is_object(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int value = currentInstruction[2].u.operand;
-
- emitLoad(value, regT1, regT0);
- Jump isNotCell = branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag));
-
- compare8(AboveOrEqual, Address(regT0, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType), regT0);
- Jump done = jump();
-
- isNotCell.link(this);
- move(TrustedImm32(0), regT0);
-
- done.link(this);
- emitStoreBool(dst, regT0);
-}
-
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
VirtualRegister arguments = VirtualRegister(currentInstruction[1].u.operand);
emitLoad(src, regT1, regT0);
Jump isImm = branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag));
- addSlowCase(emitJumpIfCellObject(regT0));
+ addSlowCase(branchPtr(NotEqual, Address(regT0, JSCell::structureIDOffset()), TrustedImmPtr(m_vm->stringStructure.get())));
isImm.link(this);
if (dst != src)
addSlowCase(branch32(NotEqual, regT1, regT3));
addSlowCase(branch32(Below, regT1, TrustedImm32(JSValue::LowestTag)));
- // Jump to a slow case if both are strings or symbols (non object).
+ // Jump to a slow case if both are strings.
Jump notCell = branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag));
- Jump firstIsObject = emitJumpIfCellObject(regT0);
- addSlowCase(emitJumpIfCellNotObject(regT2));
+ Jump firstNotString = branchPtr(NotEqual, Address(regT0, JSCell::structureIDOffset()), TrustedImmPtr(m_vm->stringStructure.get()));
+ addSlowCase(branchPtr(Equal, Address(regT2, JSCell::structureIDOffset()), TrustedImmPtr(m_vm->stringStructure.get())));
notCell.link(this);
- firstIsObject.link(this);
+ firstNotString.link(this);
// Simply compare the payloads.
if (type == OpStrictEq)
return Structure::create(vm, 0, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
}
- static RuntimeFlags javaScriptRuntimeFlags(const JSGlobalObject*) { return RuntimeFlags::createAllEnabled(); }
+ static bool javaScriptExperimentsEnabled(const JSGlobalObject*) { return true; }
protected:
void finishCreation(VM& vm, const Vector<String>& arguments)
};
const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, &globalObjectTable, CREATE_METHOD_TABLE(GlobalObject) };
-const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, 0, &shouldInterruptScriptBeforeTimeout };
GlobalObject::GlobalObject(VM& vm, Structure* structure)
dispatch(3)
-_llint_op_is_object_or_null:
+_llint_op_is_object:
traceExecution()
- callSlowPath(_slow_path_is_object_or_null)
+ callSlowPath(_slow_path_is_object)
dispatch(3)
+
_llint_op_is_function:
traceExecution()
callSlowPath(_slow_path_is_function)
loadConstantOrVariable2Reg(t0, t2, t0)
bineq t2, t3, .slow
bib t2, LowestTag, .slow
- bineq t2, CellTag, .notStringOrSymbol
- bbaeq JSCell::m_type[t0], ObjectType, .notStringOrSymbol
- bbb JSCell::m_type[t1], ObjectType, .slow
-.notStringOrSymbol:
+ bineq t2, CellTag, .notString
+ bbneq JSCell::m_type[t0], StringType, .notString
+ bbeq JSCell::m_type[t1], StringType, .slow
+.notString:
loadi 4[PC], t2
equalityOperation(t0, t1, t0)
storei BooleanTag, TagOffset[cfr, t2, 8]
dispatch(3)
-_llint_op_is_object:
- traceExecution()
- loadi 8[PC], t1
- loadi 4[PC], t2
- loadConstantOrVariable(t1, t0, t3)
- storei BooleanTag, TagOffset[cfr, t2, 8]
- bineq t0, CellTag, .opIsObjectNotCell
- cbaeq JSCell::m_type[t3], ObjectType, t1
- storei t1, PayloadOffset[cfr, t2, 8]
- dispatch(3)
-.opIsObjectNotCell:
- storep 0, PayloadOffset[cfr, t2, 8]
- dispatch(3)
-
-
macro loadPropertyAtVariableOffsetKnownNotInline(propertyOffset, objectAndStorage, tag, payload)
assert(macro (ok) bigteq propertyOffset, firstOutOfLineOffset, ok end)
negi propertyOffset
loadi 4[PC], t3
loadConstantOrVariable(t2, t1, t0)
bineq t1, CellTag, .opToPrimitiveIsImm
- bbaeq JSCell::m_type[t0], ObjectType, .opToPrimitiveSlowCase
+ bbneq JSCell::m_type[t0], StringType, .opToPrimitiveSlowCase
.opToPrimitiveIsImm:
storei t1, TagOffset[cfr, t3, 8]
storei t0, PayloadOffset[cfr, t3, 8]
dispatch(3)
-_llint_op_is_object:
- traceExecution()
- loadisFromInstruction(2, t1)
- loadisFromInstruction(1, t2)
- loadConstantOrVariable(t1, t0)
- btqnz t0, tagMask, .opIsObjectNotCell
- cbaeq JSCell::m_type[t0], ObjectType, t1
- orq ValueFalse, t1
- storeq t1, [cfr, t2, 8]
- dispatch(3)
-.opIsObjectNotCell:
- storeq ValueFalse, [cfr, t2, 8]
- dispatch(3)
-
-
macro loadPropertyAtVariableOffset(propertyOffsetAsInt, objectAndStorage, value)
bilt propertyOffsetAsInt, firstOutOfLineOffset, .isInline
loadp JSObject::m_butterfly[objectAndStorage], objectAndStorage
loadisFromInstruction(1, t3)
loadConstantOrVariable(t2, t0)
btqnz t0, tagMask, .opToPrimitiveIsImm
- bbaeq JSCell::m_type[t0], ObjectType, .opToPrimitiveSlowCase
+ bbneq JSCell::m_type[t0], StringType, .opToPrimitiveSlowCase
.opToPrimitiveIsImm:
storeq t0, [cfr, t3, 8]
dispatch(3)
RETURN(jsTypeStringForValue(exec, OP_C(2).jsValue()));
}
-SLOW_PATH_DECL(slow_path_is_object_or_null)
+SLOW_PATH_DECL(slow_path_is_object)
{
BEGIN();
- RETURN(jsBoolean(jsIsObjectTypeOrNull(exec, OP_C(2).jsValue())));
+ RETURN(jsBoolean(jsIsObjectType(exec, OP_C(2).jsValue())));
}
SLOW_PATH_DECL(slow_path_is_function)
SLOW_PATH_HIDDEN_DECL(slow_path_bitxor);
SLOW_PATH_HIDDEN_DECL(slow_path_typeof);
SLOW_PATH_HIDDEN_DECL(slow_path_is_object);
-SLOW_PATH_HIDDEN_DECL(slow_path_is_object_or_null);
SLOW_PATH_HIDDEN_DECL(slow_path_is_function);
SLOW_PATH_HIDDEN_DECL(slow_path_in);
SLOW_PATH_HIDDEN_DECL(slow_path_del_by_val);
const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &Base::s_info, &globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) };
-const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, 0, &shouldInterruptScriptBeforeTimeout };
/* Source for JSGlobalObject.lut.h
@begin globalObjectTable
, m_varInjectionWatchpoint(adoptRef(new WatchpointSet(IsWatched)))
, m_weakRandom(Options::forceWeakRandomSeed() ? Options::forcedWeakRandomSeed() : static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)))
, m_evalEnabled(true)
- , m_runtimeFlags()
+ , m_experimentsEnabled(false)
, m_consoleClient(nullptr)
, m_globalObjectMethodTable(globalObjectMethodTable ? globalObjectMethodTable : &s_globalObjectMethodTable)
{
putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Constructor, DontEnum); \
FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE)
-
- if (m_runtimeFlags.isSymbolEnabled())
- putDirectWithoutTransition(vm, vm.propertyNames->Symbol, symbolConstructor, DontEnum);
-
+
#undef PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE
PrototypeMap& prototypeMap = vm.prototypeMap;
Structure* iteratorResultStructure = prototypeMap.emptyObjectStructureForPrototype(m_objectPrototype.get(), JSFinalObject::defaultInlineCapacity());
m_consoleStructure.set(vm, this, JSConsole::createStructure(vm, this, consolePrototype));
JSConsole* consoleObject = JSConsole::create(vm, m_consoleStructure.get());
putDirectWithoutTransition(vm, Identifier(exec, "console"), consoleObject, DontEnum);
-
+
resetPrototype(vm, prototype());
}
#include "JSSegmentedVariableObject.h"
#include "JSWeakObjectMapRefInternal.h"
#include "NumberPrototype.h"
-#include "RuntimeFlags.h"
#include "SpecialPointer.h"
#include "StringPrototype.h"
#include "StructureChain.h"
struct HashTable;
#define DEFINE_STANDARD_BUILTIN(macro, upperName, lowerName) macro(upperName, lowerName, lowerName, JS ## upperName, upperName)
-
-#define FOR_EACH_EXPERIMENTAL_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
- macro(Symbol, symbol, symbolObject, SymbolObject, Symbol) \
-
+
#define FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
macro(Set, set, set, JSSet, Set) \
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) \
#define FOR_EACH_SIMPLE_BUILTIN_TYPE(macro) \
FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
- FOR_EACH_EXPERIMENTAL_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
DEFINE_STANDARD_BUILTIN(macro, ArrayIterator, arrayIterator) \
DEFINE_STANDARD_BUILTIN(macro, ArgumentsIterator, argumentsIterator) \
DEFINE_STANDARD_BUILTIN(macro, MapIterator, mapIterator) \
typedef bool (*ShouldInterruptScriptFunctionPtr)(const JSGlobalObject*);
ShouldInterruptScriptFunctionPtr shouldInterruptScript;
- typedef RuntimeFlags (*JavaScriptRuntimeFlagsFunctionPtr)(const JSGlobalObject*);
- JavaScriptRuntimeFlagsFunctionPtr javaScriptRuntimeFlags;
+ typedef bool (*JavaScriptExperimentsEnabledFunctionPtr)(const JSGlobalObject*);
+ JavaScriptExperimentsEnabledFunctionPtr javaScriptExperimentsEnabled;
typedef void (*QueueTaskToEventLoopFunctionPtr)(const JSGlobalObject*, PassRefPtr<Microtask>);
QueueTaskToEventLoopFunctionPtr queueTaskToEventLoop;
bool m_evalEnabled;
String m_evalDisabledErrorMessage;
- RuntimeFlags m_runtimeFlags;
+ bool m_experimentsEnabled;
ConsoleClient* m_consoleClient;
static JS_EXPORTDATA const GlobalObjectMethodTable s_globalObjectMethodTable;
{
Base::finishCreation(vm);
structure()->setGlobalObject(vm, this);
- m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);
+ m_experimentsEnabled = m_globalObjectMethodTable->javaScriptExperimentsEnabled(this);
init(vm);
setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype(), PureForwardingProxyType), this));
}
{
Base::finishCreation(vm);
structure()->setGlobalObject(vm, this);
- m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);
+ m_experimentsEnabled = m_globalObjectMethodTable->javaScriptExperimentsEnabled(this);
init(vm);
setGlobalThis(vm, thisValue);
}
static bool shouldInterruptScript(const JSGlobalObject*) { return true; }
static bool shouldInterruptScriptBeforeTimeout(const JSGlobalObject*) { return false; }
- static RuntimeFlags javaScriptRuntimeFlags(const JSGlobalObject*) { return RuntimeFlags(); }
+ static bool javaScriptExperimentsEnabled(const JSGlobalObject*) { return false; }
void queueMicrotask(PassRefPtr<Microtask>);
return jsTypeStringForValue(callFrame->vm(), callFrame->lexicalGlobalObject(), v);
}
-bool jsIsObjectTypeOrNull(CallFrame* callFrame, JSValue v)
+bool jsIsObjectType(CallFrame* callFrame, JSValue v)
{
if (!v.isCell())
return v.isNull();
NEVER_INLINE JSValue jsAddSlowCase(CallFrame*, JSValue, JSValue);
JSValue jsTypeStringForValue(CallFrame*, JSValue);
JSValue jsTypeStringForValue(VM&, JSGlobalObject*, JSValue);
-bool jsIsObjectTypeOrNull(CallFrame*, JSValue);
+bool jsIsObjectType(CallFrame*, JSValue);
bool jsIsFunctionType(JSValue);
ALWAYS_INLINE JSValue jsString(ExecState* exec, JSString* s1, JSString* s2)
+++ /dev/null
-/*
- * 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 RuntimeFlags_h
-#define RuntimeFlags_h
-
-#include <initializer_list>
-
-namespace JSC {
-
-#define JSC_RUNTIME_FLAG(macro) \
- macro(SymbolEnabled)
-
-
-class RuntimeFlags {
-private:
- enum RuntimeFlagShiftValue : unsigned {
-#define JSC_DECLARE_RUNTIME_FLAG_SHIFT_VALUE(name) shiftValueFor##name,
- JSC_RUNTIME_FLAG(JSC_DECLARE_RUNTIME_FLAG_SHIFT_VALUE)
-#undef JSC_DECLARE_RUNTIME_FLAG_SHIFT_VALUE
- };
-
-public:
- enum RuntimeFlag : unsigned {
-#define JSC_DECLARE_RUNTIME_FLAG(name) name = 1u << (shiftValueFor##name),
- JSC_RUNTIME_FLAG(JSC_DECLARE_RUNTIME_FLAG)
-#undef JSC_DECLARE_RUNTIME_FLAG
- };
-
-#define JSC_DECLARE_RUNTIME_FLAG_ACCESSOR(name) \
- void set##name(bool value)\
- {\
- if (value)\
- m_flags |= name;\
- else\
- m_flags &= (~name);\
- }\
- bool is##name() const\
- {\
- return m_flags & name;\
- }
- JSC_RUNTIME_FLAG(JSC_DECLARE_RUNTIME_FLAG_ACCESSOR)
-#undef JSC_DECLARE_RUNTIME_FLAG_ACCESSOR
-
- RuntimeFlags()
- : RuntimeFlags(0u)
- {
- }
-
- RuntimeFlags(std::initializer_list<RuntimeFlag> initializerList)
- : RuntimeFlags()
- {
- for (RuntimeFlag flag : initializerList)
- m_flags |= flag;
- }
-
- explicit RuntimeFlags(unsigned flags)
- : m_flags(flags)
- {
- }
-
- static RuntimeFlags createAllEnabled()
- {
- return {
-#define JSC_USE_RUNTIME_FLAG(name) name,
- JSC_RUNTIME_FLAG(JSC_USE_RUNTIME_FLAG)
-#undef JSC_USE_RUNTIME_FLAG
- };
- }
-
-private:
- unsigned m_flags;
-};
-
-} // namespace JSC
-
-#endif // RuntimeFlags_h
+2015-02-23 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r180547 and r180550.
+ https://bugs.webkit.org/show_bug.cgi?id=141957
+
+ Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
+
+ Reverted changesets:
+
+ "REGRESSION(r179429): Can't type comments in Facebook"
+ https://bugs.webkit.org/show_bug.cgi?id=141859
+ http://trac.webkit.org/changeset/180547
+
+ "Constructor returning null should construct an object instead
+ of null"
+ https://bugs.webkit.org/show_bug.cgi?id=141640
+ http://trac.webkit.org/changeset/180550
+
2015-02-23 Ryosuke Niwa <rniwa@webkit.org>
Disable font loading events until our implementation gets updated to match the latest spec
+++ /dev/null
-#ifndef WebCore_FWD_RuntimeFlags_h
-#define WebCore_FWD_RuntimeFlags_h
-#include <JavaScriptCore/RuntimeFlags.h>
-#endif
__ZN7WebCore17JSDOMGlobalObjectC2ERN3JSC2VMEPNS1_9StructureEN3WTF10PassRefPtrINS_15DOMWrapperWorldEEEPKNS1_23GlobalObjectMethodTableE
__ZN7WebCore15JSDOMWindowBase14finishCreationERN3JSC2VMEPNS_16JSDOMWindowShellE
__ZN7WebCore17JSDOMGlobalObject14finishCreationERN3JSC2VMEPNS1_8JSObjectE
+__ZN7WebCore15JSDOMWindowBase28javaScriptExperimentsEnabledEPKN3JSC14JSGlobalObjectE
__ZN7WebCore12gcControllerEv
__ZN7WebCore12GCController18garbageCollectSoonEv
__ZN3JSC6StrongIN7WebCore16JSDOMWindowShellEEC2ERNS_2VMEPS2_
<ClInclude Include="..\ForwardingHeaders\runtime\PrototypeFunction.h" />
<ClInclude Include="..\ForwardingHeaders\runtime\RegExp.h" />
<ClInclude Include="..\ForwardingHeaders\runtime\RegExpObject.h" />
- <ClInclude Include="..\ForwardingHeaders\runtime\RuntimeFlags.h" />
<ClInclude Include="..\ForwardingHeaders\runtime\StorageBarrier.h" />
<ClInclude Include="..\ForwardingHeaders\runtime\StringPrototype.h" />
<ClInclude Include="..\ForwardingHeaders\runtime\Structure.h" />
<ClInclude Include="..\ForwardingHeaders\runtime\Protect.h">
<Filter>ForwardingHeaders\runtime</Filter>
</ClInclude>
- <ClInclude Include="..\ForwardingHeaders\runtime\RuntimeFlags.h">
- <Filter>ForwardingHeaders\runtime</Filter>
- </ClInclude>
<ClInclude Include="..\ForwardingHeaders\runtime\StringObject.h">
<Filter>ForwardingHeaders\runtime</Filter>
</ClInclude>
const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) };
-const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
: JSDOMGlobalObject(vm, structure, &shell->world(), &s_globalObjectMethodTable)
return JSGlobalObject::shouldInterruptScriptBeforeTimeout(object);
}
-RuntimeFlags JSDOMWindowBase::javaScriptRuntimeFlags(const JSGlobalObject* object)
+bool JSDOMWindowBase::javaScriptExperimentsEnabled(const JSGlobalObject* object)
{
const JSDOMWindowBase* thisObject = static_cast<const JSDOMWindowBase*>(object);
Frame* frame = thisObject->impl().frame();
if (!frame)
- return RuntimeFlags();
- return frame->settings().javaScriptRuntimeFlags();
+ return false;
+ return frame->settings().javaScriptExperimentsEnabled();
}
void JSDOMWindowBase::queueTaskToEventLoop(const JSGlobalObject* object, PassRefPtr<Microtask> task)
static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
static bool shouldInterruptScript(const JSC::JSGlobalObject*);
static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
- static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
+ static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*);
static void queueTaskToEventLoop(const JSC::JSGlobalObject*, PassRefPtr<JSC::Microtask>);
void printErrorMessage(const String&) const;
const ClassInfo JSWorkerGlobalScopeBase::s_info = { "WorkerGlobalScope", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSWorkerGlobalScopeBase) };
-const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase(JSC::VM& vm, JSC::Structure* structure, PassRefPtr<WorkerGlobalScope> impl)
: JSDOMGlobalObject(vm, structure, &normalWorld(vm), &s_globalObjectMethodTable)
return JSGlobalObject::shouldInterruptScriptBeforeTimeout(object);
}
-RuntimeFlags JSWorkerGlobalScopeBase::javaScriptRuntimeFlags(const JSGlobalObject* object)
+bool JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled(const JSGlobalObject* object)
{
- return JSGlobalObject::javaScriptRuntimeFlags(object);
+ return JSGlobalObject::javaScriptExperimentsEnabled(object);
}
void JSWorkerGlobalScopeBase::queueTaskToEventLoop(const JSGlobalObject* object, PassRefPtr<Microtask> task)
static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
static bool shouldInterruptScript(const JSC::JSGlobalObject*);
static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
- static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
+ static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*);
static void queueTaskToEventLoop(const JSC::JSGlobalObject*, PassRefPtr<JSC::Microtask>);
protected:
, m_dockSide(DockSide::Undocked)
{
m_frontendPage->settings().setAllowFileAccessFromFileURLs(true);
- m_frontendPage->settings().setJavaScriptRuntimeFlags({
- JSC::RuntimeFlags::SymbolEnabled
- });
m_dispatchTask = std::make_unique<InspectorBackendDispatchTask>(inspectorController);
}
#include "SettingsMacros.h"
#include "Timer.h"
#include <chrono>
-#include <runtime/RuntimeFlags.h>
#include <unicode/uscript.h>
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
showsToolTipOverTruncatedText initial=false
forceFTPDirectoryListings initial=false
developerExtrasEnabled initial=false
+javaScriptExperimentsEnabled initial=false
scriptMarkupEnabled initial=true
needsSiteSpecificQuirks initial=false
domTimersThrottlingEnabled initial=true
acceleratedDrawingEnabled initial=false
acceleratedFiltersEnabled initial=false
useLegacyTextAlignPositionedElementBehavior initial=false
-javaScriptRuntimeFlags type=JSC::RuntimeFlags
# FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
# they can't use by. Leaving enabled for now to not change existing behavior.
+2015-02-23 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r180547 and r180550.
+ https://bugs.webkit.org/show_bug.cgi?id=141957
+
+ Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
+
+ Reverted changesets:
+
+ "REGRESSION(r179429): Can't type comments in Facebook"
+ https://bugs.webkit.org/show_bug.cgi?id=141859
+ http://trac.webkit.org/changeset/180547
+
+ "Constructor returning null should construct an object instead
+ of null"
+ https://bugs.webkit.org/show_bug.cgi?id=141640
+ http://trac.webkit.org/changeset/180550
+
2015-02-23 Ryosuke Niwa <rniwa@webkit.org>
Disable font loading events until our implementation gets updated to match the latest spec
- (void)_webkit_setBool:(BOOL)value forKey:(id)key;
- (void)_webkit_setLongLong:(long long)value forKey:(id)key;
- (void)_webkit_setUnsignedLongLong:(unsigned long long)value forKey:(id)key;
+#if PLATFORM(IOS)
- (void)_webkit_setUnsignedInt:(unsigned)value forKey:(id)key;
+#endif
@end
[object release];
}
+#if PLATFORM(IOS)
- (void)_webkit_setUnsignedInt:(unsigned)value forKey:(id)key
{
NSNumber *object = [[NSNumber alloc] initWithUnsignedInt:value];
[self setObject:object forKey:key];
[object release];
}
+#endif
@end
-[WebPreferences(WebPrivate) showsURLsInToolTips]
-[WebPreferences(WebPrivate) showsToolTipOverTruncatedText]
-[WebPreferences(WebPrivate) developerExtrasEnabled]
+-[WebPreferences(WebPrivate) javaScriptExperimentsEnabled]
-[WebPreferences(WebPrivate) authorAndUserStylesEnabled]
-[WebPreferences(WebPrivate) applicationChromeModeEnabled]
-[WebPreferences userStyleSheetEnabled]
-[WebPreferences(WebPrivate) setTextAreasAreResizable:]
-[WebPreferences(WebPrivate) setJavaScriptCanAccessClipboard:]
-[WebPreferences(WebPrivate) setOfflineWebApplicationCacheEnabled:]
+-[WebPreferences(WebPrivate) setJavaScriptExperimentsEnabled:]
-[WebPreferences(WebPrivate) setLoadsSiteIconsIgnoringImageLoadingPreference:]
-[WebPreferences(WebPrivate) setFrameFlatteningEnabled:]
-[WebPreferences(WebPrivate) setSpatialNavigationEnabled:]
#define WebKitFTPDirectoryTemplatePath @"WebKitFTPDirectoryTemplatePath"
#define WebKitForceFTPDirectoryListings @"WebKitForceFTPDirectoryListings"
#define WebKitDeveloperExtrasEnabledPreferenceKey @"WebKitDeveloperExtrasEnabledPreferenceKey"
-#define WebKitJavaScriptRuntimeFlagsPreferenceKey @"WebKitJavaScriptRuntimeFlagsPreferenceKey"
+#define WebKitJavaScriptExperimentsEnabledPreferenceKey @"WebKitJavaScriptExperimentsEnabledPreferenceKey"
#define WebKitAuthorAndUserStylesEnabledPreferenceKey @"WebKitAuthorAndUserStylesEnabledPreferenceKey"
#define WebKitDOMTimersThrottlingEnabledPreferenceKey @"WebKitDOMTimersThrottlingEnabledPreferenceKey"
#define WebKitWebArchiveDebugModeEnabledPreferenceKey @"WebKitWebArchiveDebugModeEnabledPreferenceKey"
[NSNumber numberWithInt:cacheModelForMainBundle()], WebKitCacheModelPreferenceKey,
[NSNumber numberWithBool:YES], WebKitPageCacheSupportsPluginsPreferenceKey,
[NSNumber numberWithBool:NO], WebKitDeveloperExtrasEnabledPreferenceKey,
- [NSNumber numberWithUnsignedInt:0], WebKitJavaScriptRuntimeFlagsPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitJavaScriptExperimentsEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAuthorAndUserStylesEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDOMTimersThrottlingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebArchiveDebugModeEnabledPreferenceKey,
[self _postPreferencesChangedNotification];
}
+#if PLATFORM(IOS)
- (unsigned int)_unsignedIntValueForKey:(NSString *)key
{
id o = [self _valueForKey:key];
{ if ([self _unsignedIntValueForKey:key] == value)
return;
NSString *_key = KEY(key);
-#if PLATFORM(IOS)
dispatch_barrier_sync(_private->readWriteQueue, ^{
-#endif
[_private->values.get() _webkit_setUnsignedInt:value forKey:_key];
-#if PLATFORM(IOS)
});
-#endif
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithUnsignedInt:value] forKey:_key];
[self _postPreferencesChangedNotification];
}
+#endif
- (float)_floatValueForKey:(NSString *)key
{
#endif
}
-- (WebKitJavaScriptRuntimeFlags)javaScriptRuntimeFlags
+- (void)setJavaScriptExperimentsEnabled:(BOOL)flag
{
- return static_cast<WebKitJavaScriptRuntimeFlags>([self _unsignedIntValueForKey:WebKitJavaScriptRuntimeFlagsPreferenceKey]);
+ [self _setBoolValue:flag forKey:WebKitJavaScriptExperimentsEnabledPreferenceKey];
}
-- (void)setJavaScriptRuntimeFlags:(WebKitJavaScriptRuntimeFlags)flags
+- (BOOL)javaScriptExperimentsEnabled
{
- [self _setUnsignedIntValue:flags forKey:WebKitJavaScriptRuntimeFlagsPreferenceKey];
+ return [self _boolValueForKey:WebKitJavaScriptExperimentsEnabledPreferenceKey];
}
- (void)setDeveloperExtrasEnabled:(BOOL)flag
WebBlockAllStorage
} WebStorageBlockingPolicy;
-typedef enum {
- WebKitJavaScriptRuntimeFlagsSymbolEnabled = 1u << 0,
- WebKitJavaScriptRuntimeFlagsAllEnabled = WebKitJavaScriptRuntimeFlagsSymbolEnabled
-} WebKitJavaScriptRuntimeFlags;
-
extern NSString *WebPreferencesChangedNotification;
extern NSString *WebPreferencesRemovedNotification;
extern NSString *WebPreferencesChangedInternalNotification;
- (BOOL)developerExtrasEnabled;
- (void)setDeveloperExtrasEnabled:(BOOL)flag;
-- (WebKitJavaScriptRuntimeFlags)javaScriptRuntimeFlags;
-- (void)setJavaScriptRuntimeFlags:(WebKitJavaScriptRuntimeFlags)flags;
+- (BOOL)javaScriptExperimentsEnabled;
+- (void)setJavaScriptExperimentsEnabled:(BOOL)flag;
- (BOOL)authorAndUserStylesEnabled;
- (void)setAuthorAndUserStylesEnabled:(BOOL)flag;
settings.setBackForwardCacheExpirationInterval([preferences _backForwardCacheExpirationInterval]);
settings.setDeveloperExtrasEnabled([preferences developerExtrasEnabled]);
- settings.setJavaScriptRuntimeFlags(JSC::RuntimeFlags([preferences javaScriptRuntimeFlags]));
+ settings.setJavaScriptExperimentsEnabled([preferences javaScriptExperimentsEnabled]);
settings.setAuthorAndUserStylesEnabled([preferences authorAndUserStylesEnabled]);
settings.setNeedsSiteSpecificQuirks(_private->useSiteSpecificSpoofing);
+2015-02-23 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r180547 and r180550.
+ https://bugs.webkit.org/show_bug.cgi?id=141957
+
+ Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
+
+ Reverted changesets:
+
+ "REGRESSION(r179429): Can't type comments in Facebook"
+ https://bugs.webkit.org/show_bug.cgi?id=141859
+ http://trac.webkit.org/changeset/180547
+
+ "Constructor returning null should construct an object instead
+ of null"
+ https://bugs.webkit.org/show_bug.cgi?id=141640
+ http://trac.webkit.org/changeset/180550
+
2015-02-23 Ryosuke Niwa <rniwa@webkit.org>
Disable font loading events until our implementation gets updated to match the latest spec
macro(DatabasesEnabled, databasesEnabled, Bool, bool, true) \
macro(XSSAuditorEnabled, xssAuditorEnabled, Bool, bool, true) \
macro(FrameFlatteningEnabled, frameFlatteningEnabled, Bool, bool, DEFAULT_FRAME_FLATTENING_ENABLED) \
+ macro(JavaScriptExperimentsEnabled, javaScriptExperimentsEnabled, Bool, bool, false) \
macro(PrivateBrowsingEnabled, privateBrowsingEnabled, Bool, bool, false) \
macro(TextAreasAreResizable, textAreasAreResizable, Bool, bool, DEFAULT_TEXT_AREAS_ARE_RESIZABLE) \
macro(JavaScriptCanOpenWindowsAutomatically, javaScriptCanOpenWindowsAutomatically, Bool, bool, DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY) \
macro(InspectorAttachedWidth, inspectorAttachedWidth, UInt32, uint32_t, 750) \
macro(InspectorAttachmentSide, inspectorAttachmentSide, UInt32, uint32_t, 0) \
macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage) \
- macro(JavaScriptRuntimeFlags, javaScriptRuntimeFlags, UInt32, uint32_t, 0) \
\
#define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
return toImpl(preferencesRef)->developerExtrasEnabled();
}
-void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef, WKJavaScriptRuntimeFlagSet javaScriptRuntimeFlagSet)
+void WKPreferencesSetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef, bool enabled)
{
- toImpl(preferencesRef)->setJavaScriptRuntimeFlags(javaScriptRuntimeFlagSet);
+ toImpl(preferencesRef)->setJavaScriptExperimentsEnabled(enabled);
}
-WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef)
+bool WKPreferencesGetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef)
{
- return toImpl(preferencesRef)->javaScriptRuntimeFlags();
+ return toImpl(preferencesRef)->javaScriptExperimentsEnabled();
}
void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable)
WK_EXPORT void WKPreferencesSetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef);
+
// Defaults to true.
WK_EXPORT void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable);
WK_EXPORT bool WKPreferencesGetTextAreasAreResizable(WKPreferencesRef preferencesRef);
};
typedef enum WKEditableLinkBehavior WKEditableLinkBehavior;
-enum WKJavaScriptRuntimeFlags {
- kWKJavaScriptRuntimeFlagsSymbolEnabled = 1 << 0,
- kWKJavaScriptRuntimeFlagsAllEnabled = kWKJavaScriptRuntimeFlagsSymbolEnabled
-};
-typedef unsigned WKJavaScriptRuntimeFlagSet;
-
// Creates a copy with no identifier.
WK_EXPORT WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef);
WK_EXPORT void WKPreferencesSetScreenFontSubstitutionEnabled(WKPreferencesRef preferences, bool enabled);
WK_EXPORT bool WKPreferencesGetScreenFontSubstitutionEnabled(WKPreferencesRef preferences);
-// Defaults to 0.
-WK_EXPORT void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferences, WKJavaScriptRuntimeFlagSet javascriptRuntimeFlagSet);
-WK_EXPORT WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferences);
-
#ifdef __cplusplus
}
#endif
_preferences->setAllowFileAccessFromFileURLs(allowFileAccessFromFileURLs);
}
-- (_WKJavaScriptRuntimeFlags)_javaScriptRuntimeFlags
-{
- return _preferences->javaScriptRuntimeFlags();
-}
-
-- (void)_setJavaScriptRuntimeFlags:(_WKJavaScriptRuntimeFlags)javaScriptRuntimeFlags
-{
- _preferences->setJavaScriptRuntimeFlags(javaScriptRuntimeFlags);
-}
-
- (BOOL)_isStandalone
{
return _preferences->standalone();
_WKWheelEventHandlerRegion = 1 << 1
} WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
-typedef NS_OPTIONS(NSUInteger, _WKJavaScriptRuntimeFlags) {
- _WKJavaScriptRuntimeFlagsSymbolEnabled = 1 << 0,
- _WKJavaScriptRuntimeFlagsAllEnabled = _WKJavaScriptRuntimeFlagsSymbolEnabled
-} WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
-
@interface WKPreferences (WKPrivate)
// FIXME: This property should not have the verb "is" in it.
@property (nonatomic, setter=_setLogsPageMessagesToSystemConsoleEnabled:) BOOL _logsPageMessagesToSystemConsoleEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
@property (nonatomic, setter=_setAllowFileAccessFromFileURLs:) BOOL _allowFileAccessFromFileURLs WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
-@property (nonatomic, setter=_setJavaScriptRuntimeFlags:) _WKJavaScriptRuntimeFlags _javaScriptRuntimeFlags WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
@property (nonatomic, setter=_setStandalone:, getter=_isStandalone) BOOL _standalone WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
WKPreferencesRef wkPreferences = WKPageGroupGetPreferences(wkPageGroup);
WKPreferencesSetFileAccessFromFileURLsAllowed(wkPreferences, true);
- WKPreferencesSetJavaScriptRuntimeFlags(wkPreferences, kWKJavaScriptRuntimeFlagsSymbolEnabled);
return toImpl(WKViewGetPage(wkView));
}
preferences->setLogsPageMessagesToSystemConsoleEnabled(true);
#endif
preferences->setAllowFileAccessFromFileURLs(true);
- preferences->setJavaScriptRuntimeFlags({
- JSC::RuntimeFlags::SymbolEnabled
- });
RefPtr<WebPageGroup> pageGroup = WebPageGroup::create(inspectorPageGroupIdentifier(), false, false);
m_inspectorView = GTK_WIDGET(webkitWebViewBaseCreate(&inspectorProcessPool(), preferences.get(), pageGroup.get(), nullptr, nullptr));
g_object_add_weak_pointer(G_OBJECT(m_inspectorView), reinterpret_cast<void**>(&m_inspectorView));
preferences._logsPageMessagesToSystemConsoleEnabled = YES;
#endif
preferences._allowFileAccessFromFileURLs = YES;
- preferences._javaScriptRuntimeFlags = _WKJavaScriptRuntimeFlagsSymbolEnabled;
[configuration setProcessPool: ::WebKit::wrapper(inspectorProcessPool())];
[configuration _setGroupIdentifier:inspectorPageGroupIdentifier()];
else if (!store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && sessionID() == SessionID::legacyPrivateSessionID())
setSessionID(SessionID::defaultSessionID());
settings.setDeveloperExtrasEnabled(store.getBoolValueForKey(WebPreferencesKey::developerExtrasEnabledKey()));
- settings.setJavaScriptRuntimeFlags(RuntimeFlags(store.getUInt32ValueForKey(WebPreferencesKey::javaScriptRuntimeFlagsKey())));
+ settings.setJavaScriptExperimentsEnabled(store.getBoolValueForKey(WebPreferencesKey::javaScriptExperimentsEnabledKey()));
settings.setTextAreasAreResizable(store.getBoolValueForKey(WebPreferencesKey::textAreasAreResizableKey()));
settings.setNeedsSiteSpecificQuirks(store.getBoolValueForKey(WebPreferencesKey::needsSiteSpecificQuirksKey()));
settings.setJavaScriptCanOpenWindowsAutomatically(store.getBoolValueForKey(WebPreferencesKey::javaScriptCanOpenWindowsAutomaticallyKey()));
__ZN6WebKit17WebPreferencesKey20xssAuditorEnabledKeyEv
__ZN6WebKit17WebPreferencesKey25frameFlatteningEnabledKeyEv
__ZN6WebKit17WebPreferencesKey25developerExtrasEnabledKeyEv
+__ZN6WebKit17WebPreferencesKey31javaScriptExperimentsEnabledKeyEv
__ZN6WebKit17WebPreferencesKey25privateBrowsingEnabledKeyEv
__ZN6WebKit17WebPreferencesKey24textAreasAreResizableKeyEv
__ZN6WebKit17WebPreferencesKey40javaScriptCanOpenWindowsAutomaticallyKeyEv
__ZN6WebKit14WebPreferences20setXSSAuditorEnabledERKb
_WKPreferencesSetWebAudioEnabled
__ZN6WebKit14WebPreferences18setWebAudioEnabledERKb
+_WKPreferencesSetJavaScriptExperimentsEnabled
+__ZN6WebKit14WebPreferences31setJavaScriptExperimentsEnabledERKb
_WKPreferencesSetJavaScriptCanAccessClipboard
__ZN6WebKit14WebPreferences31setJavaScriptCanAccessClipboardERKb
_WKPreferencesSetDOMPasteAllowed
+2015-02-23 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r180547 and r180550.
+ https://bugs.webkit.org/show_bug.cgi?id=141957
+
+ Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
+
+ Reverted changesets:
+
+ "REGRESSION(r179429): Can't type comments in Facebook"
+ https://bugs.webkit.org/show_bug.cgi?id=141859
+ http://trac.webkit.org/changeset/180547
+
+ "Constructor returning null should construct an object instead
+ of null"
+ https://bugs.webkit.org/show_bug.cgi?id=141640
+ http://trac.webkit.org/changeset/180550
+
2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com>
REGRESSION(r179429): Can't type comments in Facebook
[preferences setJavaScriptCanAccessClipboard:YES];
[preferences setOfflineWebApplicationCacheEnabled:YES];
[preferences setDeveloperExtrasEnabled:NO];
- [preferences setJavaScriptRuntimeFlags:WebKitJavaScriptRuntimeFlagsAllEnabled];
+ [preferences setJavaScriptExperimentsEnabled:YES];
[preferences setLoadsImagesAutomatically:YES];
[preferences setLoadsSiteIconsIgnoringImageLoadingPreference:NO];
[preferences setFrameFlatteningEnabled:NO];
WKPreferencesSetWebAudioEnabled(preferences, true);
WKPreferencesSetMediaStreamEnabled(preferences, true);
WKPreferencesSetDeveloperExtrasEnabled(preferences, true);
- WKPreferencesSetJavaScriptRuntimeFlags(preferences, kWKJavaScriptRuntimeFlagsAllEnabled);
+ WKPreferencesSetJavaScriptExperimentsEnabled(preferences, true);
WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(preferences, true);
WKPreferencesSetJavaScriptCanAccessClipboard(preferences, true);
WKPreferencesSetDOMPasteAllowed(preferences, true);