/*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
switch (node->op()) {
case JSConstant:
- case WeakJSConstant:
- case GetMyArgumentsLength:
case GetLocal:
case SetLocal:
+ case PutStack:
+ case KillStack:
+ case GetStack:
case MovHint:
case ZombieHint:
case Phantom:
- case HardPhantom:
case Flush:
case PhantomLocal:
case SetArgument:
case BitLShift:
case BitURShift:
case CheckStructure:
- case StructureTransitionWatchpoint:
+ case DoubleAsInt32:
case ArrayifyToStructure:
case PutStructure:
- case PhantomPutStructure:
case GetButterfly:
case NewObject:
case NewArray:
case NewArrayBuffer:
case GetByOffset:
+ case GetGetterSetterByOffset:
+ case GetGetter:
+ case GetSetter:
case PutByOffset:
case GetGlobalVar:
case PutGlobalVar:
case ValueAdd:
case ArithAdd:
+ case ArithClz32:
case ArithSub:
case ArithMul:
case ArithDiv:
case ArithAbs:
case ArithSin:
case ArithCos:
+ case ArithPow:
+ case ArithRound:
case ArithSqrt:
+ case ArithLog:
case ArithFRound:
case ArithNegate:
case UInt32ToNumber:
case Upsilon:
case ExtractOSREntryLocal:
case LoopHint:
- case GetMyScope:
case SkipScope:
- case GetClosureRegisters:
+ case CreateActivation:
+ case NewFunction:
case GetClosureVar:
case PutClosureVar:
+ case CreateDirectArguments:
+ case CreateScopedArguments:
+ case CreateClonedArguments:
+ case GetFromArguments:
+ case PutToArguments:
case InvalidationPoint:
case StringCharAt:
- case CheckFunction:
+ case CheckCell:
+ case CheckBadCell:
+ case CheckNotEmpty:
case StringCharCodeAt:
case AllocatePropertyStorage:
case ReallocatePropertyStorage:
- case FunctionReentryWatchpoint:
- case TypedArrayWatchpoint:
case GetTypedArrayByteOffset:
- case VariableWatchpoint:
case NotifyWrite:
case StoreBarrier:
- case StoreBarrierWithNullCheck:
case Call:
case Construct:
+ case CallVarargs:
+ case CallForwardVarargs:
+ case ConstructVarargs:
+ case ConstructForwardVarargs:
+ case LoadVarargs:
+ case NativeCall:
+ case NativeConstruct:
case ValueToInt32:
case Branch:
case LogicalNot:
case ConstantStoragePointer:
case Check:
case CountExecution:
- case CheckExecutable:
+ case GetExecutable:
case GetScope:
- case AllocationProfileWatchpoint:
- case CheckArgumentsNotCreated:
case GetCallee:
+ case GetArgumentCount:
case ToString:
+ case CallStringConstructor:
case MakeRope:
case NewArrayWithSize:
case GetById:
case MultiGetByOffset:
case MultiPutByOffset:
case ToPrimitive:
- case PhantomArguments:
case Throw:
case ThrowReferenceError:
case Unreachable:
- case GetMyArgumentByVal:
case IsUndefined:
case IsBoolean:
case IsNumber:
case IsString:
case IsObject:
+ case IsObjectOrNull:
case IsFunction:
case CheckHasInstance:
case InstanceOf:
case DoubleConstant:
case Int52Constant:
case BooleanToNumber:
+ case HasGenericProperty:
+ case HasStructureProperty:
+ case GetDirectPname:
+ case GetEnumerableLength:
+ case GetPropertyEnumerator:
+ case GetEnumeratorStructurePname:
+ case GetEnumeratorGenericPname:
+ case ToIndexString:
+ case BottomValue:
+ case PhantomNewObject:
+ case PhantomNewFunction:
+ case PhantomCreateActivation:
+ case PutHint:
+ case CheckStructureImmediate:
+ case MaterializeNewObject:
+ case MaterializeCreateActivation:
+ case PhantomDirectArguments:
+ case PhantomClonedArguments:
+ case GetMyArgumentByVal:
+ case ForwardVarargs:
+ case Switch:
+ case TypeOf:
// These are OK.
break;
case Identity:
// case because it would prevent us from catching bugs where the FTL backend
// pipeline failed to optimize out an Identity.
break;
+ case In:
+ if (node->child2().useKind() == CellUse)
+ break;
+ return CannotCompile;
case PutByIdDirect:
case PutById:
if (node->child1().useKind() == CellUse)
case Array::Int32:
case Array::Double:
case Array::Contiguous:
+ case Array::DirectArguments:
+ case Array::ScopedArguments:
break;
default:
if (isTypedView(node->arrayMode().typedArrayType()))
case Array::Double:
case Array::Contiguous:
case Array::String:
+ case Array::DirectArguments:
+ case Array::ScopedArguments:
break;
default:
if (isTypedView(node->arrayMode().typedArrayType()))
return CannotCompile;
}
break;
+ case HasIndexedProperty:
+ switch (node->arrayMode().type()) {
+ case Array::ForceExit:
+ case Array::Int32:
+ case Array::Double:
+ case Array::Contiguous:
+ break;
+ default:
+ return CannotCompile;
+ }
+ break;
case GetByVal:
switch (node->arrayMode().type()) {
case Array::ForceExit:
case Array::Int32:
case Array::Double:
case Array::Contiguous:
+ case Array::DirectArguments:
+ case Array::ScopedArguments:
break;
default:
if (isTypedView(node->arrayMode().typedArrayType()))
break;
if (node->isBinaryUseKind(StringIdentUse))
break;
+ if (node->isBinaryUseKind(ObjectUse, UntypedUse))
+ break;
+ if (node->isBinaryUseKind(UntypedUse, ObjectUse))
+ break;
if (node->isBinaryUseKind(ObjectUse))
break;
if (node->isBinaryUseKind(BooleanUse))
if (node->isBinaryUseKind(UntypedUse))
break;
return CannotCompile;
- case Switch:
- switch (node->switchData()->kind) {
- case SwitchImm:
- case SwitchChar:
- break;
- default:
- return CannotCompile;
- }
- break;
default:
// Don't know how to handle anything else.
return CannotCompile;
return CannotCompile;
}
- if (graph.m_codeBlock->needsActivation()) {
- // Need this because although we also don't support
- // CreateActivation/TearOffActivation, we might not see those nodes in case of
- // OSR entry.
- // FIXME: Support activations.
- // https://bugs.webkit.org/show_bug.cgi?id=129576
- if (verboseCapabilities())
- dataLog("FTL rejecting ", *graph.m_codeBlock, " because it uses activations.\n");
- return CannotCompile;
- }
-
CapabilityLevel result = CanCompileAndOSREnter;
for (BlockIndex blockIndex = graph.numBlocks(); blockIndex--;) {
case KnownInt32Use:
case Int52RepUse:
case NumberUse:
+ case RealNumberUse:
case DoubleRepUse:
case DoubleRepRealUse:
case BooleanUse:
case CellUse:
case KnownCellUse:
case ObjectUse:
+ case FunctionUse:
case ObjectOrOtherUse:
case StringUse:
case KnownStringUse: