bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
private void addURLImpl(URL newUrl) { synchronized (this) { if (newUrl == null) return; // Silently ignore... // Reset the toString() value. thisString = null; // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); String protocol = newUrl.getProtocol(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(protocol)) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urlinfos.add(loader); Vector extraUrls = loader.getClassPath(); if (extraUrls != null) { Iterator it = extraUrls.iterator(); while (it.hasNext()) { URL url = (URL)it.next(); URLLoader extraLoader = (URLLoader) urlloaders.get(url); if (! urlinfos.contains (extraLoader)) addURLImpl(url); } } } }
|
private void addURLImpl(URL newUrl) { synchronized (this) { if (newUrl == null) return; // Silently ignore... // Reset the toString() value. thisString = null; // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); String protocol = newUrl.getProtocol(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(protocol)) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urlinfos.add(loader); Vector extraUrls = loader.getClassPath(); if (extraUrls != null) { Iterator it = extraUrls.iterator(); while (it.hasNext()) { URL url = (URL)it.next(); URLLoader extraLoader = (URLLoader) urlloaders.get(url); if (! urlinfos.contains (extraLoader)) addURLImpl(url); } } } }
| 1,921
|
private void addURLImpl(URL newUrl) { synchronized (this) { if (newUrl == null) return; // Silently ignore... // Reset the toString() value. thisString = null; // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); String protocol = newUrl.getProtocol(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(protocol)) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urlinfos.add(loader); Vector extraUrls = loader.getClassPath(); if (extraUrls != null) { Iterator it = extraUrls.iterator(); while (it.hasNext()) { URL url = (URL)it.next(); URLLoader extraLoader = (URLLoader) urlloaders.get(url); if (! urlinfos.contains (extraLoader)) addURLImpl(url); } } } }
|
private void addURLImpl(URL newUrl) { synchronized (this) { if (newUrl == null) return; // Silently ignore... // Reset the toString() value. thisString = null; // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); String protocol = newUrl.getProtocol(); // Check that it is not a directory if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); else if ("file".equals(protocol)) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); // Cache it. urlloaders.put(newUrl, loader); } urlinfos.add(loader); Vector extraUrls = loader.getClassPath(); if (extraUrls != null) { Iterator it = extraUrls.iterator(); while (it.hasNext()) { URL url = (URL)it.next(); URLLoader extraLoader = (URLLoader) urlloaders.get(url); if (! urlinfos.contains (extraLoader)) addURLImpl(url); } } } }
| 1,922
|
public Attributes getMainAttributes() { return mainAttr; }
|
public Attributes getMainAttributes() { return mainAttr; }
| 1,923
|
public Attributes getAttributes(String entryName) { return (Attributes) getEntries().get(entryName); }
|
public Attributes getAttributes(String entryName) { return (Attributes) getEntries().get(entryName); }
| 1,924
|
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is not a data block but a filesystem * metadata block, as the beginning of each block group is filesystem * metadata: * superblock copy (if present) * block bitmap * inode bitmap * inode table * Free blocks begin after the inode table. */ long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if(blockNr<firstNonMetadataBlock) return new BlockReservation(false, -1, -1); byte[] bitmap = getBlock(groupDescriptors[group].getBlockBitmap()); //at any time, only one copy of the Block exists in the cache, so it is //safe to synchronize to the bitmapBlock object (it's part of Block) synchronized( bitmap ) { BlockReservation result = BlockBitmap.testAndSetBlock( bitmap, index ); //update the block bitmap if(result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, -1-result.getPreallocCount()); result.setBlock( result.getBlock()+superblock.getFirstDataBlock() ); } return result; } }
|
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is not a data block but a filesystem * metadata block, as the beginning of each block group is filesystem * metadata: * superblock copy (if present) * block bitmap * inode bitmap * inode table * Free blocks begin after the inode table. */ long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if(blockNr<firstNonMetadataBlock) return new BlockReservation(false, -1, -1); byte[] bitmap = getBlock(groupDescriptors[group].getBlockBitmap()); //at any time, only one copy of the Block exists in the cache, so it is //safe to synchronize to the bitmapBlock object (it's part of Block) synchronized( bitmap ) { BlockReservation result = BlockBitmap.testAndSetBlock( bitmap, index ); //update the block bitmap if(result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, -1-result.getPreallocCount()); result.setBlock( result.getBlock()+superblock.getFirstDataBlock() ); } return result; } }
| 1,925
|
public FileSystemException(String message, Throwable cause) { super(message, cause); }
|
public FileSystemException(String message, Throwable cause) { super(message, cause); }
| 1,928
|
public BlockReservation(boolean successful, long block, int preallocCount, long freeBlocksCount) { this.successful = successful; this.block = block; this.preallocCount = preallocCount; this.freeBlocksCount = freeBlocksCount; }
|
public BlockReservation(boolean successful, long block, int preallocCount, long freeBlocksCount) { this.successful = successful; this.block = block; this.preallocCount = preallocCount; this.freeBlocksCount = freeBlocksCount; }
| 1,929
|
public BlockReservation(boolean successful, long block, int preallocCount, long freeBlocksCount) { this.successful = successful; this.block = block; this.preallocCount = preallocCount; this.freeBlocksCount = freeBlocksCount; }
|
public BlockReservation(boolean successful, long block, int preallocCount, long freeBlocksCount) { this.successful = successful; this.block = block; this.preallocCount = preallocCount; this.freeBlocksCount = freeBlocksCount; }
| 1,930
|
public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { super(source); this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } // TreeModelEvent()
|
public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { super(source); this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } // TreeModelEvent()
| 1,931
|
public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { super(source); this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } // TreeModelEvent()
|
public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { super(source); this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } // TreeModelEvent()
| 1,932
|
public int[] getChildIndices() { return childIndices; } // getChildIndices()
|
public int[] getChildIndices() { return childIndices; } // getChildIndices()
| 1,933
|
public int[] getChildIndices() { return childIndices; } // getChildIndices()
|
public int[] getChildIndices() { return childIndices; } // getChildIndices()
| 1,934
|
public Object[] getChildren() { return children; } // getChildren()
|
public Object[] getChildren() { return children; } // getChildren()
| 1,935
|
public Object[] getChildren() { return children; } // getChildren()
|
public Object[] getChildren() { return children; } // getChildren()
| 1,936
|
public Object[] getPath() { return path.getPath(); } // getPath()
|
public Object[] getPath() { return path.getPath(); } // getPath()
| 1,937
|
public Object[] getPath() { return path.getPath(); } // getPath()
|
public Object[] getPath() { return path.getPath(); } // getPath()
| 1,938
|
public String toString() { return getClass() + " [Source: " + getSource() + ", TreePath: " + getTreePath() + ", Child Indicies: " + getChildIndices() + ", Children: " + getChildren() + ", Path: " + getPath() +"]"; } // toString()
|
public String toString() { return getClass() + " [Source: " + getSource() + ", TreePath: " + getTreePath() + ", Child Indicies: " + getChildIndices() + ", Children: " + getChildren() + ", Path: " + getPath() +"]"; } // toString()
| 1,939
|
protected void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); for(int i = 0; i < listeners.length; ++i) listeners[i].stateChanged(changeEvent); }
|
protected void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); for (int i = 0; i < listeners.length; ++i) listeners[i].stateChanged(changeEvent); }
| 1,941
|
public File createFileObject(File directory, String filename) { return null; // TODO } // createFileObject()
|
public File createFileObject(File directory, String filename) { return null; // TODO } // createFileObject()
| 1,942
|
public abstract File createNewFolder(File file) throws IOException;
|
public abstract File createNewFolder(File file) throws IOException;
| 1,943
|
public static FileSystemView getFileSystemView() { return null; // TODO } // getFileSystemView()
|
public static FileSystemView getFileSystemView() { return null; // TODO } // getFileSystemView()
| 1,944
|
public File[] getFiles(File directory, boolean fileHiding) { return null; // TODO } // getFiles()
|
public File[] getFiles(File directory, boolean fileHiding) { return null; // TODO } // getFiles()
| 1,945
|
public File getHomeDirectory() { return null; // TODO } // getHomeDirectory()
|
public File getHomeDirectory() { return null; // TODO } // getHomeDirectory()
| 1,946
|
public File getParentDirectory(File directory) { return null; // TODO } // getParentDirectory()
|
public File getParentDirectory(File directory) { return null; // TODO } // getParentDirectory()
| 1,947
|
public abstract File[] getRoots();
|
public abstract File[] getRoots();
| 1,948
|
public abstract boolean isHiddenFile(File file);
|
public abstract boolean isHiddenFile(File file);
| 1,949
|
public abstract boolean isRoot(File file);
|
public abstract boolean isRoot(File file);
| 1,950
|
public void itemStateChanged(ItemEvent e) { showMe_itemStateChanged(e); }
|
public void itemStateChanged(ItemEvent e) { hideTabBar_itemStateChanged(e); }
| 1,952
|
void jbInit() throws Exception { // make it non resizable setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create sessions panel createSessionsPanel(); // create emulator options panel createEmulatorOptionsPanel(); // create the button options createButtonOptions(); JTabbedPane optionTabs = new JTabbedPane(); optionTabs.addChangeListener(this); optionTabs.addTab(LangTool.getString("ss.labelConnections"),sessionPanel); optionTabs.addTab(LangTool.getString("ss.labelOptions1"),emulOptPanel); // add the panels to our dialog getContentPane().add(optionTabs,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // set default selection value as the first row or default session if (sessions.getRowCount() > 0) { int selInterval = 0; for (int x = 0; x < sessions.getRowCount(); x++) { if (((Boolean)ctm.getValueAt(x,2)).booleanValue()) selInterval = x; } sessions.getSelectionModel().setSelectionInterval(selInterval,selInterval); } sessions.requestFocus(); // now show the world what we and they can do this.setVisible(true); }
|
void jbInit() throws Exception { // make it non resizable setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create sessions panel createSessionsPanel(); // create emulator options panel createEmulatorOptionsPanel(); // create the button options createButtonOptions(); JTabbedPane optionTabs = new JTabbedPane(); optionTabs.addChangeListener(this); optionTabs.addTab(LangTool.getString("ss.labelConnections"),sessionPanel); optionTabs.addTab(LangTool.getString("ss.labelOptions1"),emulOptPanel); // add the panels to our dialog getContentPane().add(optionTabs,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // set default selection value as the first row or default session if (sessions.getRowCount() > 0) { int selInterval = 0; for (int x = 0; x < sessions.getRowCount(); x++) { if (((Boolean)ctm.getValueAt(x,2)).booleanValue()) selInterval = x; } sessions.getSelectionModel().setSelectionInterval(selInterval,selInterval); } addWindowListener(new WindowAdapter() { public void windowOpened(WindowEvent e) { SwingUtilities.invokeLater(new Runnable() { public void run() { sessions.requestFocus(); } }); } }); // now show the world what we and they can do this.setVisible(true); }
| 1,953
|
public static TitledBorder createTitledBorder (String title) { return new TitledBorder (title); }
|
public static TitledBorder createTitledBorder(String title) { return new TitledBorder (title); }
| 1,955
|
public static TitledBorder createTitledBorder (String title) { return new TitledBorder (title); }
|
public static TitledBorder createTitledBorder (String title) { return new TitledBorder(title); }
| 1,956
|
public void setSelectionMode(int s) { selectionModel.setSelectionMode(s); columnModel.getSelectionModel().setSelectionMode(s); repaint(); }
|
public void setSelectionMode(int s) { selectionModel.setSelectionMode(s); columnModel.getSelectionModel().setSelectionMode(s); repaint(); }
| 1,957
|
public static Border createRaisedBevelBorder () { return new BevelBorder (BevelBorder.RAISED); }
|
public static Border createRaisedBevelBorder() { return new BevelBorder (BevelBorder.RAISED); }
| 1,958
|
public static Border createRaisedBevelBorder () { return new BevelBorder (BevelBorder.RAISED); }
|
public static Border createRaisedBevelBorder () { return new BevelBorder(BevelBorder.RAISED); }
| 1,959
|
public final boolean hasFeature(int feature) { return ((this.features & feature) == feature); }
|
public final boolean hasFeature(int feature) { return ((this.features & feature) == feature); }
| 1,960
|
public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, int size, int mode) throws ResourceNotFreeException;
|
public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, int size, int mode) throws ResourceNotFreeException;
| 1,961
|
protected DoubleWordItem(int kind, int offsetToFP, Register lsb, Register msb) { super(kind, offsetToFP); this.lsb = lsb; this.msb = msb; }
|
protected DoubleWordItem(int kind, int offsetToFP, Register lsb, Register msb) { super(kind, offsetToFP); this.lsb = lsb; this.msb = msb; }
| 1,962
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
| 1,963
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
| 1,964
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
| 1,965
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
| 1,966
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
| 1,967
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
|
protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; }
| 1,968
|
final int getCategory() { return 2; }
|
final int getCategory() { return 2; }
| 1,969
|
final int getLsbOffsetToFP() { return super.getOffsetToFP(); }
|
final int getLsbOffsetToFP() { return super.getOffsetToFP(); }
| 1,970
|
final Register getLsbRegister() { assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return lsb; }
|
final Register getLsbRegister() { assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return lsb; }
| 1,971
|
final int getMsbOffsetToFP() { return super.getOffsetToFP() + 4; }
|
final int getMsbOffsetToFP() { return super.getOffsetToFP() + 4; }
| 1,972
|
final Register getMsbRegister() { assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return msb; }
|
final Register getMsbRegister() { assertCondition(kind == Kind.REGISTER, "kind == Kind.REGISTER"); return msb; }
| 1,973
|
final int getOffsetToFP() { throw new Error("Do not use this"); }
|
final int getOffsetToFP() { throw new Error("Do not use this"); }
| 1,974
|
final void load(EmitterContext ec) { if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } }
|
final void load(EmitterContext ec) { if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } }
| 1,975
|
final void load(EmitterContext ec) { if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } }
|
final void load(EmitterContext ec) { if (kind != Kind.REGISTER) { X86RegisterPool pool = ec.getPool(); Register l = pool.request(JvmType.INT, this); if (l == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); l = pool.request(JvmType.INT, this); } Register r = pool.request(JvmType.INT, this); if (r == null) { final VirtualStack vstack = ec.getVStack(); vstack.push(ec); r = pool.request(JvmType.INT, this); } assertCondition(r != null, "r != null"); assertCondition(l != null, "l != null"); loadTo(ec, l, r); } }
| 1,976
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,977
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,978
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,979
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,980
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,981
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,982
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,983
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 1,984
|
protected abstract void loadToConstant(EmitterContext ec, AbstractX86Stream os, Register lsb, Register msb);
|
protected abstract void loadToConstant(EmitterContext ec, AbstractX86Stream os, Register lsb, Register msb);
| 1,985
|
final void loadToGPR(EmitterContext ec) { if (kind != Kind.REGISTER) { Register lsb = ec.getPool().request(JvmType.INT); if (lsb == null) { ec.getVStack().push(ec); lsb = ec.getPool().request(JvmType.INT); } assertCondition(lsb != null, "lsb != null"); Register msb = ec.getPool().request(JvmType.INT); if (msb == null) { ec.getVStack().push(ec); msb = ec.getPool().request(JvmType.INT); } assertCondition(msb != null, "msb != null"); loadTo(ec, lsb, msb); } }
|
final void loadToGPR(EmitterContext ec) { if (kind != Kind.REGISTER) { Register lsb = ec.getPool().request(JvmType.INT); if (lsb == null) { ec.getVStack().push(ec); lsb = ec.getPool().request(JvmType.INT); } assertCondition(lsb != null, "lsb != null"); Register msb = ec.getPool().request(JvmType.INT); if (msb == null) { ec.getVStack().push(ec); msb = ec.getPool().request(JvmType.INT); } assertCondition(msb != null, "msb != null"); loadTo(ec, lsb, msb); } }
| 1,986
|
protected abstract void popFromFPU(AbstractX86Stream os, Register reg, int disp);
|
protected abstract void popFromFPU(AbstractX86Stream os, Register reg, int disp);
| 1,987
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,988
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,989
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,990
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,991
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,992
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,993
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,994
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,995
|
protected abstract void pushToFPU(AbstractX86Stream os, Register reg, int disp);
|
protected abstract void pushToFPU(AbstractX86Stream os, Register reg, int disp);
| 1,996
|
final void release(EmitterContext ec) { //assertCondition(!ec.getVStack().contains(this), "Cannot release while on vstack"); final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(lsb); pool.release(msb); break; case Kind.LOCAL: // nothing to do break; case Kind.CONSTANT: // nothing to do break; case Kind.FPUSTACK: // nothing to do break; case Kind.STACK: // nothing to do break; } this.lsb = null; this.msb = null; this.kind = 0; }
|
final void release(EmitterContext ec) { //assertCondition(!ec.getVStack().contains(this), "Cannot release while on vstack"); final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(lsb); pool.release(msb); break; case Kind.LOCAL: // nothing to do break; case Kind.CONSTANT: // nothing to do break; case Kind.FPUSTACK: // nothing to do break; case Kind.STACK: // nothing to do break; } this.lsb = null; this.msb = null; this.kind = 0; }
| 1,997
|
private final Register request(EmitterContext ec, X86RegisterPool pool) { final Register r = pool.request(JvmType.INT); assertCondition(r != null, "r != null"); return r; }
|
private final Register request(EmitterContext ec, X86RegisterPool pool) { final Register r = pool.request(JvmType.INT); assertCondition(r != null, "r != null"); return r; }
| 1,998
|
final void spill(EmitterContext ec, Register reg) { assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newMsb); pool.transferOwnerTo(newLsb, this); pool.transferOwnerTo(newMsb, this); }
|
final void spill(EmitterContext ec, Register reg) { assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newMsb); pool.transferOwnerTo(newLsb, this); pool.transferOwnerTo(newMsb, this); }
| 1,999
|
final void spill(EmitterContext ec, Register reg) { assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newMsb); pool.transferOwnerTo(newLsb, this); pool.transferOwnerTo(newMsb, this); }
|
final void spill(EmitterContext ec, Register reg) { assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newMsb); pool.transferOwnerTo(newLsb, this); pool.transferOwnerTo(newMsb, this); }
| 2,000
|
final boolean uses(Register reg) { return ((kind == Kind.REGISTER) && (msb.equals(reg) || lsb.equals(reg))); }
|
final boolean uses(Register reg) { return ((kind == Kind.REGISTER) && (msb.equals(reg) || lsb.equals(reg))); }
| 2,001
|
final boolean usesVolatileRegister(X86RegisterPool pool) { return ((kind == Kind.REGISTER) && !(pool.isCallerSaved(lsb) && pool.isCallerSaved(msb))); }
|
final boolean usesVolatileRegister(X86RegisterPool pool) { return ((kind == Kind.REGISTER) && !(pool.isCallerSaved(lsb) && pool.isCallerSaved(msb))); }
| 2,002
|
static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); }
|
static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); }
| 2,003
|
static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); }
|
static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); }
| 2,004
|
public X500Principal (String name) { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } }
|
private X500Principal() { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } }
| 2,005
|
public X500Principal (String name) { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } }
|
public X500Principal (String name) { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } }
| 2,006
|
public OID(String strRep) { this(strRep, false); }
|
public OID(int[] components) { this(strRep, false); }
| 2,007
|
public OID(String strRep) { this(strRep, false); }
|
public OID(String strRep) { this(components, false); }
| 2,008
|
public byte[] getEncoded() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return (byte[]) encoded.clone(); }
|
public byte[] getEncoded() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; } } return (byte[]) encoded.clone(); }
| 2,009
|
public int getLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return length; }
|
public int getLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; } } return length; }
| 2,010
|
public int getEncodedLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return encoded.length; }
|
public int getEncodedLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; } } return encoded.length; }
| 2,011
|
public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
|
public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
| 2,012
|
public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
|
public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, tk.createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
| 2,013
|
addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();}
|
addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();}
| 2,014
|
addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();}
|
addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();}
| 2,015
|
public SetAccessibleAction(AccessibleObject member) { this.member = member; }
|
public SetAccessibleAction() { this.member = member; }
| 2,016
|
public SetAccessibleAction(AccessibleObject member) { this.member = member; }
|
public SetAccessibleAction(AccessibleObject member) { }
| 2,017
|
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. File ses = new File(SESSIONS); if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
|
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
| 2,018
|
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. File ses = new File(SESSIONS); if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
|
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. File ses = new File(SESSIONS); if(ses.exists()) { int cfc; settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with the -Duser.home=<your home dir> parameter\n" + "to avoid this question popping up all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
| 2,019
|
private void loadSettings() { FileInputStream in = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); } else { try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { System.out.println(" Information Message: " + fnfe.getMessage() + ". The file " + settingsFile + " will" + " be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioe) { System.out.println("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { System.out.println("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } // we now check to see if the settings directory is a directory. If not then we create it File sd = new File(settings.getProperty("emulator.settingsDirectory")); if (!sd.isDirectory()) sd.mkdirs(); }
|
private void loadSettings() { FileInputStream in = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); } else { try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { System.out.println(" Information Message: " + fnfe.getMessage() + ". The file " + settingsFile + " will" + " be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioe) { System.out.println("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { System.out.println("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } // we now check to see if the settings directory is a directory. If not then we create it File sd = new File(settings.getProperty("emulator.settingsDirectory")); if (!sd.isDirectory()) sd.mkdirs(); }
| 2,020
|
abstract public String getProperty(String regKey, String defaultValue);
|
abstract public String getProperty(String regKey, String defaultValue);
| 2,021
|
public void run() { drainEvents(); }
|
public void run() { drainEvents(); }
| 2,022
|
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
|
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
| 2,023
|
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
|
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
| 2,024
|
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
|
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
| 2,025
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.