/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* 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
#include "WeakGCMap.h"
#include <wtf/HashFunctions.h>
#include <wtf/OwnPtr.h>
-#include <wtf/RefPtr.h>
#include <wtf/text/StringImpl.h>
namespace JSC {
ASSERT(!hasIndexedProperties(oldType) || hasUndecided(oldType) || hasInt32(oldType) || hasDouble(oldType) || hasContiguous(oldType) || hasContiguous(oldType));
return (oldType & ~IndexingShapeMask) | SlowPutArrayStorageShape;
case SwitchToSlowPutArrayStorage:
- ASSERT(hasFastArrayStorage(oldType));
+ ASSERT(hasArrayStorage(oldType));
return (oldType & ~IndexingShapeMask) | SlowPutArrayStorageShape;
case AddIndexedAccessors:
return oldType | MayHaveIndexedAccessors;
class StructureTransitionTable {
static const intptr_t UsingSingleSlotFlag = 1;
+
struct Hash {
- typedef std::pair<RefPtr<StringImpl>, unsigned> Key;
+ typedef std::pair<StringImpl*, unsigned> Key;
+
static unsigned hash(const Key& p)
{
- unsigned result = p.second;
- if (p.first)
- result += p.first->existingHash();
- return result;
+ return PtrHash<StringImpl*>::hash(p.first) + p.second;
}
static bool equal(const Key& a, const Key& b)