Home | History | Annotate | Download | only in compiler

Lines Matching defs:out

43   DCHECK_EQ(static_cast<off_t>(file_offset + relative_offset), out->Seek(0, kSeekCurrent)) \
47 DCHECK_EQ(static_cast<off_t>(file_offset + offset_), out->Seek(0, kSeekCurrent)) \
488 // so we can simply compare the pointers to find out if things are duplicated.
529 // so we can simply compare the pointers to find out if things are duplicated.
571 WriteCodeMethodVisitor(OatWriter* writer, OutputStream* out, const size_t file_offset,
574 out_(out),
584 OutputStream* out = out_;
596 if (UNLIKELY(!out->WriteFully(kPadding, aligned_code_delta))) {
617 if (!out->WriteFully(&method_header, sizeof(method_header))) {
624 if (!out->WriteFully(&(*quick_code)[0], code_size)) {
652 WriteMapMethodVisitor(OatWriter* writer, OutputStream* out, const size_t file_offset,
655 out_(out),
665 OutputStream* out = out_;
678 if (UNLIKELY(!out->WriteFully(&(*map)[0], map_size))) {
888 bool OatWriter::Write(OutputStream* out) {
889 const size_t file_offset = out->Seek(0, kSeekCurrent);
892 if (!out->WriteFully(oat_header_, header_size)) {
893 PLOG(ERROR) << "Failed to write oat header to " << out->GetLocation();
899 if (!WriteTables(out, file_offset)) {
900 LOG(ERROR) << "Failed to write oat tables to " << out->GetLocation();
904 size_t relative_offset = out->Seek(0, kSeekCurrent) - file_offset;
905 relative_offset = WriteMaps(out, file_offset, relative_offset);
907 LOG(ERROR) << "Failed to write oat code to " << out->GetLocation();
911 relative_offset = WriteCode(out, file_offset, relative_offset);
913 LOG(ERROR) << "Failed to write oat code to " << out->GetLocation();
917 relative_offset = WriteCodeDexFiles(out, file_offset, relative_offset);
919 LOG(ERROR) << "Failed to write oat code for dex files to " << out->GetLocation();
963 CHECK_EQ(file_offset + size_total, static_cast<uint32_t>(out->Seek(0, kSeekCurrent)));
967 CHECK_EQ(file_offset + size_, static_cast<uint32_t>(out->Seek(0, kSeekCurrent)));
973 bool OatWriter::WriteTables(OutputStream* out, const size_t file_offset) {
975 if (!oat_dex_files_[i]->Write(this, out, file_offset)) {
976 PLOG(ERROR) << "Failed to write oat dex information to " << out->GetLocation();
982 off_t actual_offset = out->Seek(expected_offset, kSeekSet);
990 if (!out->WriteFully(&dex_file->GetHeader(), dex_file->GetHeader().file_size_)) {
992 << " to " << out->GetLocation();
998 if (!oat_classes_[i]->Write(this, out, file_offset)) {
999 PLOG(ERROR) << "Failed to write oat methods information to " << out->GetLocation();
1006 size_t OatWriter::WriteMaps(OutputStream* out, const size_t file_offset, size_t relative_offset) {
1009 VisitorType visitor(this, out, file_offset, relative_offset); \
1033 size_t OatWriter::WriteCode(OutputStream* out, const size_t file_offset, size_t relative_offset) {
1034 off_t new_offset = out->Seek(size_executable_offset_alignment_, kSeekCurrent);
1040 << " Expected: " << expected_file_offset << " File: " << out->GetLocation();
1051 out->Seek(alignment_padding, kSeekCurrent); \
1053 if (!out->WriteFully(&(*field)[0], field->size())) { \
1054 PLOG(ERROR) << "Failed to write " # field " to " << out->GetLocation(); \
1077 size_t OatWriter::WriteCodeDexFiles(OutputStream* out,
1082 VisitorType visitor(this, out, file_offset, relative_offset); \
1124 OutputStream* out,
1127 if (!out->WriteFully(&dex_file_location_size_, sizeof(dex_file_location_size_))) {
1128 PLOG(ERROR) << "Failed to write dex file location length to " << out->GetLocation();
1132 if (!out->WriteFully(dex_file_location_data_, dex_file_location_size_)) {
1133 PLOG(ERROR) << "Failed to write dex file location data to " << out->GetLocation();
1137 if (!out->WriteFully(&dex_file_location_checksum_, sizeof(dex_file_location_checksum_))) {
1138 PLOG(ERROR) << "Failed to write dex file location checksum to " << out->GetLocation();
1142 if (!out->WriteFully(&dex_file_offset_, sizeof(dex_file_offset_))) {
1143 PLOG(ERROR) << "Failed to write dex file offset to " << out->GetLocation();
1147 if (!out->WriteFully(&methods_offsets_[0],
1149 PLOG(ERROR) << "Failed to write methods offsets to " << out->GetLocation();
1250 OutputStream* out,
1253 if (!out->WriteFully(&status_, sizeof(status_))) {
1254 PLOG(ERROR) << "Failed to write class status to " << out->GetLocation();
1258 if (!out->WriteFully(&type_, sizeof(type_))) {
1259 PLOG(ERROR) << "Failed to write oat class type to " << out->GetLocation();
1265 if (!out->WriteFully(&method_bitmap_size_, sizeof(method_bitmap_size_))) {
1266 PLOG(ERROR) << "Failed to write method bitmap size to " << out->GetLocation();
1270 if (!out->WriteFully(method_bitmap_->GetRawStorage(), method_bitmap_size_)) {
1271 PLOG(ERROR) << "Failed to write method bitmap to " << out->GetLocation();
1276 if (!out->WriteFully(&method_offsets_[0],
1278 PLOG(ERROR) << "Failed to write method offsets to " << out->GetLocation();