本文整理汇总了Java中som.vmobjects.SObject.updateLayoutToMatchClass方法的典型用法代码示例。如果您正苦于以下问题:Java SObject.updateLayoutToMatchClass方法的具体用法?Java SObject.updateLayoutToMatchClass怎么用?Java SObject.updateLayoutToMatchClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类som.vmobjects.SObject
的用法示例。
在下文中一共展示了SObject.updateLayoutToMatchClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transitionObject
import som.vmobjects.SObject; //导入方法依赖的package包/类
/**
* Transition the given object to the latest layout.
*
* <p>
* This method is racy, i.e., it can be called by multiple threads for the
* same safepoint. It can be for multiple objects or the same.
*
* @param obj to be transitioned.
*/
public void transitionObject(final SObject obj) {
waitForSafepointStart();
// Safepoint phase, used to update the object
// object is required to handle updates from multiple threads correctly
obj.updateLayoutToMatchClass();
replaceAssumptionAndWaitForSafepointEnd();
}
示例2: specialize
import som.vmobjects.SObject; //导入方法依赖的package包/类
protected final AbstractReadFieldNode specialize(final SObject obj,
final String reason, final AbstractReadFieldNode next) {
TruffleCompiler.transferToInterpreterAndInvalidate(reason);
obj.updateLayoutToMatchClass();
final ObjectLayout layout = obj.getObjectLayout();
final StorageLocation location = layout.getStorageLocation(fieldIndex);
AbstractReadFieldNode newNode = location.getReadNode(fieldIndex, layout, next);
return replace(newNode, reason);
}