summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/wtf/brew
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/wtf/brew')
-rw-r--r--JavaScriptCore/wtf/brew/MainThreadBrew.cpp45
-rw-r--r--JavaScriptCore/wtf/brew/OwnPtrBrew.cpp81
-rw-r--r--JavaScriptCore/wtf/brew/RefPtrBrew.h53
-rw-r--r--JavaScriptCore/wtf/brew/ShellBrew.h70
-rw-r--r--JavaScriptCore/wtf/brew/StringBrew.cpp43
-rw-r--r--JavaScriptCore/wtf/brew/SystemMallocBrew.h65
6 files changed, 0 insertions, 357 deletions
diff --git a/JavaScriptCore/wtf/brew/MainThreadBrew.cpp b/JavaScriptCore/wtf/brew/MainThreadBrew.cpp
deleted file mode 100644
index 2690ea5..0000000
--- a/JavaScriptCore/wtf/brew/MainThreadBrew.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2009 Company 100, Inc.
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
- */
-
-#include "config.h"
-#include "MainThread.h"
-
-namespace WTF {
-
-void initializeMainThreadPlatform()
-{
- // not implemented
-}
-
-void scheduleDispatchFunctionsOnMainThread()
-{
- // not implemented
-}
-
-} // namespace WTF
-
diff --git a/JavaScriptCore/wtf/brew/OwnPtrBrew.cpp b/JavaScriptCore/wtf/brew/OwnPtrBrew.cpp
deleted file mode 100644
index ce10fc3..0000000
--- a/JavaScriptCore/wtf/brew/OwnPtrBrew.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2010 Company 100 Inc. All rights reserved.
- *
- * 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 COMPUTER, 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
- * 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.
- */
-
-#include "config.h"
-#include "OwnPtr.h"
-
-#include <AEEBitmap.h>
-#include <AEEFile.h>
-#include <AEEIMemGroup.h>
-#include <AEEIMemSpace.h>
-#include <AEENet.h>
-#include <AEESSL.h>
-#include <AEEStdLib.h>
-
-namespace WTF {
-
-void deleteOwnedPtr(IFileMgr* ptr)
-{
- if (ptr)
- IFILEMGR_Release(ptr);
-}
-
-void deleteOwnedPtr(IFile* ptr)
-{
- if (ptr)
- IFILE_Release(ptr);
-}
-
-void deleteOwnedPtr(IBitmap* ptr)
-{
- if (ptr)
- IBitmap_Release(ptr);
-}
-
-void deleteOwnedPtr(ISSL* ptr)
-{
- if (ptr)
- ISSL_Release(ptr);
-}
-
-void deleteOwnedPtr(IMemGroup* ptr)
-{
- if (ptr)
- IMemGroup_Release(ptr);
-}
-
-void deleteOwnedPtr(IMemSpace* ptr)
-{
- if (ptr)
- IMemSpace_Release(ptr);
-}
-
-void deleteOwnedPtr(ISocket* ptr)
-{
- if (ptr)
- ISOCKET_Release(ptr);
-}
-
-}
diff --git a/JavaScriptCore/wtf/brew/RefPtrBrew.h b/JavaScriptCore/wtf/brew/RefPtrBrew.h
deleted file mode 100644
index 7fb0b7c..0000000
--- a/JavaScriptCore/wtf/brew/RefPtrBrew.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Collabora Ltd.
- * Copyright (C) 2009 Martin Robinson
- * Copyright (C) 2010 Company 100, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef RefPtrBrew_h
-#define RefPtrBrew_h
-
-#include "AlwaysInline.h"
-#include "PlatformRefPtr.h"
-#include <AEEIBase.h>
-#include <algorithm>
-
-namespace WTF {
-
-// All Brew MP classes are derived from either IBase or IQI.
-// Technically, IBase and IQI are different types. However, it is
-// okay to cast both types to IBase because they have AddRef and Release
-// in the same method vtable slots.
-template <typename T> inline T* refPlatformPtr(T* ptr)
-{
- if (ptr)
- IBase_AddRef(reinterpret_cast<IBase*>(ptr));
- return ptr;
-}
-
-template <typename T> inline void derefPlatformPtr(T* ptr)
-{
- if (ptr)
- IBase_Release(reinterpret_cast<IBase*>(ptr));
-}
-
-} // namespace WTF
-
-#endif // RefPtrBrew_h
diff --git a/JavaScriptCore/wtf/brew/ShellBrew.h b/JavaScriptCore/wtf/brew/ShellBrew.h
deleted file mode 100644
index faccc75..0000000
--- a/JavaScriptCore/wtf/brew/ShellBrew.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2010 Company 100 Inc. All rights reserved.
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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 ShellBrew_h
-#define ShellBrew_h
-
-#include <AEEAppGen.h>
-#include <AEEStdLib.h>
-
-#include <wtf/Assertions.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/PlatformRefPtr.h>
-
-namespace WTF {
-
-template <typename T>
-static inline PassOwnPtr<T> createInstance(AEECLSID cls)
-{
- T* instance = 0;
-
- IShell* shell = reinterpret_cast<AEEApplet*>(GETAPPINSTANCE())->m_pIShell;
- ISHELL_CreateInstance(shell, cls, reinterpret_cast<void**>(&instance));
- ASSERT(instance);
-
- return instance;
-}
-
-template <typename T>
-static inline PlatformRefPtr<T> createRefPtrInstance(AEECLSID cls)
-{
- T* instance = 0;
-
- IShell* shell = reinterpret_cast<AEEApplet*>(GETAPPINSTANCE())->m_pIShell;
- ISHELL_CreateInstance(shell, cls, reinterpret_cast<void**>(&instance));
- ASSERT(instance);
-
- return adoptPlatformRef(instance);
-}
-
-} // namespace WTF
-
-using WTF::createInstance;
-using WTF::createRefPtrInstance;
-
-#endif // ShellBrew_h
diff --git a/JavaScriptCore/wtf/brew/StringBrew.cpp b/JavaScriptCore/wtf/brew/StringBrew.cpp
deleted file mode 100644
index d8f2e59..0000000
--- a/JavaScriptCore/wtf/brew/StringBrew.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Company 100, Inc. All rights reserved.
- *
- * 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 COMPUTER, 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
- * 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.
- */
-
-#include "config.h"
-#include "PlatformString.h"
-
-#include <AEEstd.h>
-
-namespace WTF {
-
-// String conversions
-String::String(const AECHAR* string)
-{
- // It is safe to cast AECHAR to UChar as both of them use 16 bits representation.
- const UChar* str = reinterpret_cast<const UChar*>(string);
- const size_t len = std_wstrlen(string);
-
- m_impl = StringImpl::create(str, len);
-}
-
-} // namespace WTF
diff --git a/JavaScriptCore/wtf/brew/SystemMallocBrew.h b/JavaScriptCore/wtf/brew/SystemMallocBrew.h
deleted file mode 100644
index c973b30..0000000
--- a/JavaScriptCore/wtf/brew/SystemMallocBrew.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2010 Company 100, Inc.
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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 SystemMallocBrew_h
-#define SystemMallocBrew_h
-
-#include <AEEStdLib.h>
-
-static inline void* mallocBrew(size_t n)
-{
- // By default, memory allocated using MALLOC() is initialized
- // to zero. This behavior can be disabled by performing a bitwise
- // OR of the flag ALLOC_NO_ZMEM with the dwSize parameter.
- return MALLOC(n | ALLOC_NO_ZMEM);
-}
-
-static inline void* callocBrew(size_t numElements, size_t elementSize)
-{
- return MALLOC(numElements * elementSize);
-}
-
-static inline void freeBrew(void* p)
-{
- return FREE(p);
-}
-
-static inline void* reallocBrew(void* p, size_t n)
-{
- return REALLOC(p, n | ALLOC_NO_ZMEM);
-}
-
-// Use MALLOC macro instead of the standard malloc function.
-// Although RVCT provides malloc, we can't use it in BREW
-// because the loader does not initialize the base address properly.
-#define malloc(n) mallocBrew(n)
-#define calloc(n, s) callocBrew(n, s)
-#define realloc(p, n) reallocBrew(p, n)
-#define free(p) freeBrew(p)
-
-#endif // SystemMallocBrew_h