Skip to content

Commit

Permalink
Use JIT on iOS (not actually working yet, but it will start working i…
Browse files Browse the repository at this point in the history
…n later commits)
  • Loading branch information
hrydgard committed Aug 28, 2016
1 parent 13e73f8 commit daf10ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions ios/ViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ -(id) init {

ram_temp_file = [[NSTemporaryDirectory() stringByAppendingPathComponent:@"ram_tmp.file"] fileSystemRepresentation];

iosCanUseJit = false;
iosCanUseJit = true;
targetIsJailbroken = false;
NSArray *jailPath = [NSArray arrayWithObjects:
@"/Applications/Cydia.app",
Expand All @@ -112,11 +112,6 @@ -(id) init {
if ([[NSFileManager defaultManager] fileExistsAtPath:string]) {
// checking device jailbreak status in order to determine which message to show in GameSettingsScreen
targetIsJailbroken = true;
// if we're running on iOS arm64, only iOS <9 is supported with JIT.
// if we're running on anything that isn't arm64, then JIT is supported on all iOS versions.
if (![self isArm64] || ([self isArm64] && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_IOS_9_0)) {
iosCanUseJit = true;
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions ios/main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ void Vibrate(int length_ms) {

int main(int argc, char *argv[])
{
// Simulates a debugger. Makes it possible to use JIT (though only W^X)
syscall(SYS_ptrace, 0 /*PTRACE_TRACEME*/, 0, 0, 0);
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
Expand Down

0 comments on commit daf10ec

Please sign in to comment.