本文整理了Java中org.mozilla.javascript.UintMap.<init>()
方法的一些代码示例,展示了UintMap.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UintMap.<init>()
方法的具体详情如下:
包路径:org.mozilla.javascript.UintMap
类名称:UintMap
方法名:<init>
暂无
代码示例来源:origin: rhino/js
private void resolveGoto(int fromPC, int jumpPC)
{
int offset = jumpPC - fromPC;
// Ensure that jumps do not overlap
if (0 <= offset && offset <= 2) throw Kit.codeBug();
int offsetSite = fromPC + 1;
if (offset != (short)offset) {
if (itsData.longJumps == null) {
itsData.longJumps = new UintMap();
}
itsData.longJumps.put(offsetSite, jumpPC);
offset = 0;
}
byte[] array = itsData.itsICode;
array[offsetSite] = (byte)(offset >> 8);
array[offsetSite + 1] = (byte)offset;
}
代码示例来源:origin: geogebra/geogebra
private void resolveGoto(int fromPC, int jumpPC)
{
int offset = jumpPC - fromPC;
// Ensure that jumps do not overlap
if (0 <= offset && offset <= 2) throw Kit.codeBug();
int offsetSite = fromPC + 1;
if (offset != (short)offset) {
if (itsData.longJumps == null) {
itsData.longJumps = new UintMap();
}
itsData.longJumps.put(offsetSite, jumpPC);
offset = 0;
}
byte[] array = itsData.itsICode;
array[offsetSite] = (byte)(offset >> 8);
array[offsetSite + 1] = (byte)offset;
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
private void resolveGoto(int fromPC, int jumpPC)
{
int offset = jumpPC - fromPC;
// Ensure that jumps do not overlap
if (0 <= offset && offset <= 2) throw Kit.codeBug();
int offsetSite = fromPC + 1;
if (offset != (short)offset) {
if (itsData.longJumps == null) {
itsData.longJumps = new UintMap();
}
itsData.longJumps.put(offsetSite, jumpPC);
offset = 0;
}
byte[] array = itsData.itsICode;
array[offsetSite] = (byte)(offset >> 8);
array[offsetSite + 1] = (byte)offset;
}
代码示例来源:origin: io.apigee/rhino
private void resolveGoto(int fromPC, int jumpPC)
{
int offset = jumpPC - fromPC;
// Ensure that jumps do not overlap
if (0 <= offset && offset <= 2) throw Kit.codeBug();
int offsetSite = fromPC + 1;
if (offset != (short)offset) {
if (itsData.longJumps == null) {
itsData.longJumps = new UintMap();
}
itsData.longJumps.put(offsetSite, jumpPC);
offset = 0;
}
byte[] array = itsData.itsICode;
array[offsetSite] = (byte)(offset >> 8);
array[offsetSite + 1] = (byte)offset;
}
代码示例来源:origin: ro.isdc.wro4j/rhino
private void resolveGoto(int fromPC, int jumpPC)
{
int offset = jumpPC - fromPC;
// Ensure that jumps do not overlap
if (0 <= offset && offset <= 2) throw Kit.codeBug();
int offsetSite = fromPC + 1;
if (offset != (short)offset) {
if (itsData.longJumps == null) {
itsData.longJumps = new UintMap();
}
itsData.longJumps.put(offsetSite, jumpPC);
offset = 0;
}
byte[] array = itsData.itsICode;
array[offsetSite] = (byte)(offset >> 8);
array[offsetSite + 1] = (byte)offset;
}
代码示例来源:origin: com.github.tntim96/rhino
private void resolveGoto(int fromPC, int jumpPC)
{
int offset = jumpPC - fromPC;
// Ensure that jumps do not overlap
if (0 <= offset && offset <= 2) throw Kit.codeBug();
int offsetSite = fromPC + 1;
if (offset != (short)offset) {
if (itsData.longJumps == null) {
itsData.longJumps = new UintMap();
}
itsData.longJumps.put(offsetSite, jumpPC);
offset = 0;
}
byte[] array = itsData.itsICode;
array[offsetSite] = (byte)(offset >> 8);
array[offsetSite + 1] = (byte)offset;
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
/**
* @param indent How much to indent the decompiled result
*
* @param flags Flags specifying format of decompilation output
*/
final String decompile(int indent, int flags)
{
String encodedSource = getEncodedSource();
if (encodedSource == null) {
return super.decompile(indent, flags);
} else {
UintMap properties = new UintMap(1);
properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
return Decompiler.decompile(encodedSource, flags, properties);
}
}
代码示例来源:origin: geogebra/geogebra
/**
* @param indent How much to indent the decompiled result
*
* @param flags Flags specifying format of decompilation output
*/
@Override
final String decompile(int indent, int flags)
{
String encodedSource = getEncodedSource();
if (encodedSource == null) {
return super.decompile(indent, flags);
} else {
UintMap properties = new UintMap(1);
properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
return Decompiler.decompile(encodedSource, flags, properties);
}
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
* @param indent How much to indent the decompiled result
*
* @param flags Flags specifying format of decompilation output
*/
@Override
final String decompile(int indent, int flags)
{
String encodedSource = getEncodedSource();
if (encodedSource == null) {
return super.decompile(indent, flags);
} else {
UintMap properties = new UintMap(1);
properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
return Decompiler.decompile(encodedSource, flags, properties);
}
}
代码示例来源:origin: rhino/js
/**
* @param indent How much to indent the decompiled result
*
* @param flags Flags specifying format of decompilation output
*/
@Override
final String decompile(int indent, int flags)
{
String encodedSource = getEncodedSource();
if (encodedSource == null) {
return super.decompile(indent, flags);
} else {
UintMap properties = new UintMap(1);
properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
return Decompiler.decompile(encodedSource, flags, properties);
}
}
代码示例来源:origin: io.apigee/rhino
/**
* @param indent How much to indent the decompiled result
*
* @param flags Flags specifying format of decompilation output
*/
@Override
final String decompile(int indent, int flags)
{
String encodedSource = getEncodedSource();
if (encodedSource == null) {
return super.decompile(indent, flags);
} else {
UintMap properties = new UintMap(1);
properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
return Decompiler.decompile(encodedSource, flags, properties);
}
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* @param indent How much to indent the decompiled result
*
* @param flags Flags specifying format of decompilation output
*/
@Override
final String decompile(int indent, int flags)
{
String encodedSource = getEncodedSource();
if (encodedSource == null) {
return super.decompile(indent, flags);
} else {
UintMap properties = new UintMap(1);
properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
return Decompiler.decompile(encodedSource, flags, properties);
}
}
代码示例来源:origin: rhino/js
static int[] getLineNumbers(InterpreterData data)
{
UintMap presentLines = new UintMap();
byte[] iCode = data.itsICode;
int iCodeLength = iCode.length;
for (int pc = 0; pc != iCodeLength;) {
int bytecode = iCode[pc];
int span = bytecodeSpan(bytecode);
if (bytecode == Icode_LINE) {
if (span != 3) Kit.codeBug();
int line = getIndex(iCode, pc + 1);
presentLines.put(line, 0);
}
pc += span;
}
return presentLines.getKeys();
}
代码示例来源:origin: geogebra/geogebra
static int[] getLineNumbers(InterpreterData data)
{
UintMap presentLines = new UintMap();
byte[] iCode = data.itsICode;
int iCodeLength = iCode.length;
for (int pc = 0; pc != iCodeLength;) {
int bytecode = iCode[pc];
int span = bytecodeSpan(bytecode);
if (bytecode == Icode_LINE) {
if (span != 3) Kit.codeBug();
int line = getIndex(iCode, pc + 1);
presentLines.put(line, 0);
}
pc += span;
}
return presentLines.getKeys();
}
代码示例来源:origin: com.github.tntim96/rhino
static int[] getLineNumbers(InterpreterData data)
{
UintMap presentLines = new UintMap();
byte[] iCode = data.itsICode;
int iCodeLength = iCode.length;
for (int pc = 0; pc != iCodeLength;) {
int bytecode = iCode[pc];
int span = bytecodeSpan(bytecode);
if (bytecode == Icode_LINE) {
if (span != 3) Kit.codeBug();
int line = getIndex(iCode, pc + 1);
presentLines.put(line, 0);
}
pc += span;
}
return presentLines.getKeys();
}
代码示例来源:origin: io.apigee/rhino
static int[] getLineNumbers(InterpreterData data)
{
UintMap presentLines = new UintMap();
byte[] iCode = data.itsICode;
int iCodeLength = iCode.length;
for (int pc = 0; pc != iCodeLength;) {
int bytecode = iCode[pc];
int span = bytecodeSpan(bytecode);
if (bytecode == Icode_LINE) {
if (span != 3) Kit.codeBug();
int line = getIndex(iCode, pc + 1);
presentLines.put(line, 0);
}
pc += span;
}
return presentLines.getKeys();
}
代码示例来源:origin: ro.isdc.wro4j/rhino
static int[] getLineNumbers(InterpreterData data)
{
UintMap presentLines = new UintMap();
byte[] iCode = data.itsICode;
int iCodeLength = iCode.length;
for (int pc = 0; pc != iCodeLength;) {
int bytecode = iCode[pc];
int span = bytecodeSpan(bytecode);
if (bytecode == Icode_LINE) {
if (span != 3) Kit.codeBug();
int line = getIndex(iCode, pc + 1);
presentLines.put(line, 0);
}
pc += span;
}
return presentLines.getKeys();
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
static int[] getLineNumbers(InterpreterData data)
{
UintMap presentLines = new UintMap();
byte[] iCode = data.itsICode;
int iCodeLength = iCode.length;
for (int pc = 0; pc != iCodeLength;) {
int bytecode = iCode[pc];
int span = bytecodeSpan(bytecode);
if (bytecode == Icode_LINE) {
if (span != 3) Kit.codeBug();
int line = getIndex(iCode, pc + 1);
presentLines.put(line, 0);
}
pc += span;
}
return presentLines.getKeys();
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
* Add a method and begin adding code.
*
* This method must be called before other methods for adding code,
* exception tables, etc. can be invoked.
*
* @param methodName the name of the method
* @param type a string representing the type
* @param flags the attributes of the field, such as ACC_PUBLIC, etc.
* bitwise or'd together
*/
public void startMethod(String methodName, String type, short flags) {
short methodNameIndex = itsConstantPool.addUtf8(methodName);
short typeIndex = itsConstantPool.addUtf8(type);
itsCurrentMethod = new ClassFileMethod(methodName, methodNameIndex,
type, typeIndex, flags);
itsJumpFroms = new UintMap();
itsMethods.add(itsCurrentMethod);
addSuperBlockStart(0);
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* Add a method and begin adding code.
*
* This method must be called before other methods for adding code,
* exception tables, etc. can be invoked.
*
* @param methodName the name of the method
* @param type a string representing the type
* @param flags the attributes of the field, such as ACC_PUBLIC, etc.
* bitwise or'd together
*/
public void startMethod(String methodName, String type, short flags) {
short methodNameIndex = itsConstantPool.addUtf8(methodName);
short typeIndex = itsConstantPool.addUtf8(type);
itsCurrentMethod = new ClassFileMethod(methodName, methodNameIndex,
type, typeIndex, flags);
itsJumpFroms = new UintMap();
itsMethods.add(itsCurrentMethod);
addSuperBlockStart(0);
}
内容来源于网络,如有侵权,请联系作者删除!