Issue #190 - Part 1: Remove XP_IOS conditional code

This commit is contained in:
Matt A. Tobin
2020-02-28 17:58:46 -05:00
parent 1d86d37828
commit 6a3d5769d0
10 changed files with 6 additions and 79 deletions
-7
View File
@@ -550,13 +550,6 @@ def target_is_darwin(target):
set_define('XP_DARWIN', target_is_darwin)
@depends(target)
def target_is_ios(target):
if target.kernel == 'Darwin' and target.os == 'iOS':
return True
set_define('XP_IOS', target_is_ios)
@depends(target)
def target_is_osx(target):
if target.kernel == 'Darwin' and target.os == 'OSX':
+1 -1
View File
@@ -10,7 +10,7 @@
// For some reason, Apple's GCC refuses to honor -fno-exceptions when
// compiling ObjC.
#if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
#if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__)
# error "STL code can only be used with -fno-exceptions"
#endif
-6
View File
@@ -17,12 +17,6 @@ typedef _CGLContextObject* CGLContextObj;
typedef struct CGContext* CGContextRef;
typedef struct CGImage* CGImageRef;
typedef uint32_t IOSurfaceID;
#ifdef XP_IOS
typedef kern_return_t IOReturn;
typedef int CGLError;
#endif
typedef CFTypeRef IOSurfacePtr;
typedef IOSurfacePtr (*IOSurfaceCreateFunc) (CFDictionaryRef properties);
typedef IOSurfacePtr (*IOSurfaceLookupFunc) (uint32_t io_surface_id);
-11
View File
@@ -9,18 +9,7 @@
#include <mach/vm_map.h>
#include <mach/mach_port.h>
#if defined(XP_IOS)
#include <mach/vm_map.h>
#define mach_vm_address_t vm_address_t
#define mach_vm_allocate vm_allocate
#define mach_vm_deallocate vm_deallocate
#define mach_vm_map vm_map
#define mach_vm_read vm_read
#define mach_vm_region_recurse vm_region_recurse_64
#define mach_vm_size_t vm_size_t
#else
#include <mach/mach_vm.h>
#endif
#include <pthread.h>
#include <unistd.h>
#include "SharedMemoryBasic.h"
@@ -132,14 +132,6 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext* cx, bool match_only)
pushedNonVolatileRegisters++;
}
#if defined(XP_IOS) && defined(JS_CODEGEN_ARM)
// The stack is 4-byte aligned on iOS, force 8-byte alignment.
masm.movePtr(StackPointer, temp0);
masm.andPtr(Imm32(~7), StackPointer);
masm.push(temp0);
masm.push(temp0);
#endif
#ifndef JS_CODEGEN_X86
// The InputOutputData* is stored as an argument, save it on the stack
// above the frame.
@@ -406,11 +398,6 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext* cx, bool match_only)
masm.freeStack(frameSize);
#endif
#if defined(XP_IOS) && defined(JS_CODEGEN_ARM)
masm.pop(temp0);
masm.movePtr(temp0, StackPointer);
#endif
// Restore non-volatile registers which were saved on entry.
for (GeneralRegisterBackwardIterator iter(savedNonVolatileRegisters); iter.more(); ++iter)
masm.Pop(*iter);
+1 -6
View File
@@ -69,7 +69,7 @@ extern "C" void sync_instruction_memory(caddr_t v, u_int len);
#include <sys/cachectl.h>
#endif
#if defined(JS_CODEGEN_ARM) && defined(XP_IOS)
#ifdef JS_CODEGEN_ARM
#include <libkern/OSCacheControl.h>
#endif
@@ -256,11 +256,6 @@ class ExecutableAllocator
{
__clear_cache(code, reinterpret_cast<char*>(code) + size);
}
#elif (defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)) && defined(XP_IOS)
static void cacheFlush(void* code, size_t size)
{
sys_icache_invalidate(code, size);
}
#elif defined(JS_CODEGEN_ARM) && (defined(__linux__) || defined(ANDROID)) && defined(__GNUC__)
static void cacheFlush(void* code, size_t size)
{
+2 -9
View File
@@ -17,7 +17,7 @@
// GCC versions 4.6 and above define __ARM_PCS_VFP to denote a hard-float
// ABI target. The iOS toolchain doesn't define anything specific here,
// but iOS always supports VFP.
#if defined(__ARM_PCS_VFP) || defined(XP_IOS)
#ifdef__ARM_PCS_VFP
#define JS_CODEGEN_ARM_HARDFP
#endif
@@ -114,12 +114,7 @@ class Registers
(1 << r0) |
(1 << r1) |
(1 << Registers::r2) |
(1 << Registers::r3)
#if defined(XP_IOS)
// per https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv6FunctionCallingConventions.html#//apple_ref/doc/uid/TP40009021-SW4
| (1 << Registers::r9)
#endif
;
(1 << Registers::r3);
static const SetType NonVolatileMask =
(1 << Registers::r4) |
@@ -127,9 +122,7 @@ class Registers
(1 << Registers::r6) |
(1 << Registers::r7) |
(1 << Registers::r8) |
#if !defined(XP_IOS)
(1 << Registers::r9) |
#endif
(1 << Registers::r10) |
(1 << Registers::r11) |
(1 << Registers::r12) |
-13
View File
@@ -1,13 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef TOOLKIT_XRE_UIKITDIRPROVIDER_H_
#define TOOLKIT_XRE_UIKITDIRPROVIDER_H_
#include "nsString.h"
bool GetUIKitDirectory(bool aLocal, nsACString& aUserDir);
#endif // TOOLKIT_XRE_UIKITDIRPROVIDER_H_
-11
View File
@@ -58,9 +58,6 @@
#ifdef XP_UNIX
#include <ctype.h>
#endif
#ifdef XP_IOS
#include "UIKitDirProvider.h"
#endif
#if defined(XP_MACOSX)
#define APP_REGISTRY_NAME "Application Registry"
@@ -1310,14 +1307,6 @@ nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal)
NS_ENSURE_SUCCESS(rv, rv);
localDir = do_QueryInterface(dirFileMac, &rv);
#elif defined(XP_IOS)
nsAutoCString userDir;
if (GetUIKitDirectory(aLocal, userDir)) {
rv = NS_NewNativeLocalFile(userDir, true, getter_AddRefs(localDir));
} else {
rv = NS_ERROR_FAILURE;
}
NS_ENSURE_SUCCESS(rv, rv);
#elif defined(XP_WIN)
nsString path;
if (aLocal) {
@@ -9,8 +9,8 @@
#include "mozilla/Compiler.h"
#if !defined(__arm__) && !(defined(LINUX) || defined(XP_IOS))
#error "This code is for Linux/iOS ARM only. Check that it works on your system, too.\nBeware that this code is highly compiler dependent."
#if !defined(__arm__) && !defined(LINUX)
#error "This code is for Linux ARM only. Check that it works on your system, too.\nBeware that this code is highly compiler dependent."
#endif
#if MOZ_IS_GCC