use of php.runtime.loader.dump.io.DumpOutputStream in project jphp by jphp-compiler.
the class ConstantDumper method save.
@Override
public void save(ConstantEntity entity, OutputStream output) throws IOException {
DumpOutputStream dump = new DumpOutputStream(output);
dump.writeBoolean(entity.isCaseSensitise());
dump.writeEnum(Modifier.PUBLIC);
dump.writeName(entity.getName());
dump.writeTrace(debugInformation ? null : entity.getTrace());
dump.writeMemory(entity.getValue());
dump.writeRawData(null);
}
use of php.runtime.loader.dump.io.DumpOutputStream in project jphp by jphp-compiler.
the class FunctionDumper method save.
@Override
public void save(FunctionEntity entity, OutputStream output) throws IOException {
DumpOutputStream data = new DumpOutputStream(output);
data.writeBoolean(entity.isStatic());
// name
data.writeName(entity.getName());
data.writeName(entity.getInternalName());
data.writeBoolean(entity.isReturnReference());
data.writeBoolean(entity.isUsesStackTrace());
data.writeBoolean(entity.isImmutable());
data.writeMemory(entity.getImmutableResult());
data.writeBoolean(entity.isEmpty());
// trace
data.writeTrace(debugInformation ? entity.getTrace() : null);
data.writeInt(entity.getParameters() == null ? 0 : entity.getParameters().length);
if (entity.getParameters() != null)
for (ParameterEntity param : entity.getParameters()) {
parameterDumper.save(param, output);
}
if (includeData) {
data.writeRawData(entity.getData());
} else {
data.writeRawData(null);
}
data.writeRawData(null);
}
use of php.runtime.loader.dump.io.DumpOutputStream in project jphp by jphp-compiler.
the class GeneratorDumper method save.
@Override
public void save(GeneratorEntity entity, OutputStream output) throws IOException {
classDumper.save(entity, output);
DumpOutputStream printer = new DumpOutputStream(output);
printer.writeBoolean(entity.isReturnReference());
printer.writeInt(entity.parameters == null ? 0 : entity.parameters.length);
if (entity.parameters != null) {
for (ParameterEntity param : entity.parameters) {
parameterDumper.save(param, output);
}
}
}
use of php.runtime.loader.dump.io.DumpOutputStream in project jphp by jphp-compiler.
the class MethodDumper method save.
@Override
public void save(MethodEntity entity, OutputStream output) throws IOException {
DumpOutputStream print = new DumpOutputStream(output);
DocumentComment docComment = entity.getDocComment();
if (docComment != null) {
print.writeUTF(docComment.toString());
} else {
print.writeUTF("");
}
// static
print.writeBoolean(entity.isStatic());
// final
print.writeBoolean(entity.isFinal());
// abstract
print.writeBoolean(entity.isAbstract());
// abstractable
print.writeBoolean(entity.isAbstractable());
// immutable
print.writeBoolean(entity.isImmutable());
print.writeMemory(entity.getImmutableResult());
print.writeBoolean(entity.isEmpty());
// ref
print.writeBoolean(entity.isReturnReference());
// uses stack trace
print.writeBoolean(entity.isUsesStackTrace());
// modifier
print.writeEnum(entity.getModifier());
// name
print.writeName(entity.getName());
print.writeName(entity.getInternalName());
// trace
print.writeTrace(debugInformation ? entity.getTrace() : null);
print.writeInt(entity.getParameters() == null ? 0 : entity.getParameters().length);
if (entity.getParameters() != null)
for (ParameterEntity param : entity.getParameters()) {
parameterDumper.save(param, output);
}
// raw data
print.writeRawData(null);
}
Aggregations