-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add PlatformClassLoader Nowadays, Java is aware of three different Class Loaders: System, Platform and Thread. * Add tid (thread id) to Thread as required in Java 11 * Add additional Constructor to secure class laoder matching Java 11 singatures This ClassLoader is used in the service provider loading and helps to port the DateFormat test cases. * Add defineUnnamedModule to the System class This method is ocassinaly used by Java internals requried to make the DateFormat conversion work. * Extend the JavaLangAccess signature * Add missing methods to Unsafe After resoling an error in loading modules from the classes folder, the Unsafe missed some methods. * Fix some internals of concurrent This fixes CountDownLatchTest, ExecutorServiceTest, SemaphoreTest * Load unloaded error classes JPF requries nowadays a repeatedInvocation for LoadOnJPFRequired errors.
- Loading branch information
Showing
15 changed files
with
394 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/classes/modules/java.base/java/lang/invoke/JPFFieldVarHandle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (C) 2014, United States Government, as represented by the | ||
* Administrator of the National Aeronautics and Space Administration. | ||
* All rights reserved. | ||
* | ||
* The Java Pathfinder core (jpf-core) platform is licensed under the | ||
* Apache License, Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package java.lang.invoke; | ||
|
||
|
||
// We use this a model class in JPF to model the new VarHandle behavior for field replacing longterm the Unsafe implementation. | ||
// See: http://cr.openjdk.java.net/~psandoz/varhandles/VarHandle-0.1.md for more information on VarHandle. | ||
public class JPFFieldVarHandle extends VarHandle { | ||
|
||
int fieldRef; | ||
int classRef; | ||
|
||
JPFFieldVarHandle() { | ||
super(null); | ||
} | ||
|
||
JPFFieldVarHandle(int fieldRef) { | ||
super(null); | ||
this.fieldRef = fieldRef; | ||
} | ||
|
||
MethodType accessModeTypeUncached(AccessMode accessMode) { | ||
return null; | ||
} | ||
|
||
public boolean compareAndSet(Object aqs, int expect, int update) { | ||
//This is implemented in the corresponding peer | ||
return false; | ||
} | ||
|
||
public boolean compareAndSet(Object aqs, Object expect, Object update) { | ||
//This is implemented in the corresponding peer | ||
return false; | ||
} | ||
|
||
public void set(Object called, int value) { | ||
//This is implemented in the corresponding peer | ||
} | ||
|
||
public void set(Object called, Object value) { | ||
//This is implemented in the corresponding peer | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.