Ignore:
Timestamp:
Sep 6, 2016, 2:35:24 PM (9 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r205504.
https://bugs.webkit.org/show_bug.cgi?id=161645

Broke the iOS device build (Requested by ryanhaddad on
#webkit).

Reverted changeset:

"Make JSMap and JSSet faster"
https://bugs.webkit.org/show_bug.cgi?id=160989
http://trac.webkit.org/changeset/205504

Patch by Commit Queue <[email protected]> on 2016-09-06

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSSet.cpp

    r205504 r205507  
    11/*
    2  * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#include "JSSet.h"
    2828
    29 #include "JSCInlines.h"
     29#include "CopiedBlockInlines.h"
     30#include "JSCJSValueInlines.h"
     31#include "JSSetIterator.h"
     32#include "MapDataInlines.h"
     33#include "SlotVisitorInlines.h"
     34#include "StructureInlines.h"
    3035
    3136namespace JSC {
    3237
    3338const ClassInfo JSSet::s_info = { "Set", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSet) };
     39
     40void JSSet::destroy(JSCell* cell)
     41{
     42    JSSet* thisObject = jsCast<JSSet*>(cell);
     43    thisObject->JSSet::~JSSet();
     44}
    3445
    3546String JSSet::toStringName(const JSObject*, ExecState*)
     
    3849}
    3950
     51size_t JSSet::estimatedSize(JSCell* cell)
     52{
     53    JSSet* thisObject = jsCast<JSSet*>(cell);
     54    size_t setDataSize = thisObject->m_setData.capacityInBytes();
     55    return Base::estimatedSize(cell) + setDataSize;
    4056}
     57
     58void JSSet::visitChildren(JSCell* cell, SlotVisitor& visitor)
     59{
     60    Base::visitChildren(cell, visitor);
     61    jsCast<JSSet*>(cell)->m_setData.visitChildren(cell, visitor);
     62}
     63
     64void JSSet::copyBackingStore(JSCell* cell, CopyVisitor& visitor, CopyToken token)
     65{
     66    Base::copyBackingStore(cell, visitor, token);
     67    jsCast<JSSet*>(cell)->m_setData.copyBackingStore(visitor, token);
     68}
     69
     70bool JSSet::has(ExecState* exec, JSValue value)
     71{
     72    return m_setData.contains(exec, value);
     73}
     74
     75size_t JSSet::size(ExecState* exec)
     76{
     77    return m_setData.size(exec);
     78}
     79
     80void JSSet::add(ExecState* exec, JSValue value)
     81{
     82    m_setData.set(exec, this, value, value);
     83}
     84
     85void JSSet::clear(ExecState*)
     86{
     87    m_setData.clear();
     88}
     89
     90bool JSSet::remove(ExecState* exec, JSValue value)
     91{
     92    return m_setData.remove(exec, value);
     93}
     94
     95}
Note: See TracChangeset for help on using the changeset viewer.