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)) \
480 // so we can simply compare the pointers to find out if things are duplicated.
521 // so we can simply compare the pointers to find out if things are duplicated.
564 WriteCodeMethodVisitor(OatWriter* writer, OutputStream* out, const size_t file_offset,
567 out_(out),
577 OutputStream* out = out_;
589 if (UNLIKELY(!out->WriteFully(kPadding, aligned_code_delta))) {
609 if (!out->WriteFully(&method_header, sizeof(method_header))) {
616 if (!out->WriteFully(&(*quick_code)[0], code_size)) {
644 WriteMapMethodVisitor(OatWriter* writer, OutputStream* out, const size_t file_offset,
647 out_(out),
657 OutputStream* out = out_;
669 if (UNLIKELY(!out->WriteFully(&(*map)[0], map_size))) {
879 bool OatWriter::Write(OutputStream* out) {
880 const size_t file_offset = out->Seek(0, kSeekCurrent);
883 if (!out->WriteFully(oat_header_, header_size)) {
884 PLOG(ERROR) << "Failed to write oat header to " << out->GetLocation();
890 if (!WriteTables(out, file_offset)) {
891 LOG(ERROR) << "Failed to write oat tables to " << out->GetLocation();
895 size_t relative_offset = out->Seek(0, kSeekCurrent) - file_offset;
896 relative_offset = WriteMaps(out, file_offset, relative_offset);
898 LOG(ERROR) << "Failed to write oat code to " << out->GetLocation();
902 relative_offset = WriteCode(out, file_offset, relative_offset);
904 LOG(ERROR) << "Failed to write oat code to " << out->GetLocation();
908 relative_offset = WriteCodeDexFiles(out, file_offset, relative_offset);
910 LOG(ERROR) << "Failed to write oat code for dex files to " << out->GetLocation();
954 CHECK_EQ(file_offset + size_total, static_cast<uint32_t>(out->Seek(0, kSeekCurrent)));
958 CHECK_EQ(file_offset + size_, static_cast<uint32_t>(out->Seek(0, kSeekCurrent)));
964 bool OatWriter::WriteTables(OutputStream* out, const size_t file_offset) {
966 if (!oat_dex_files_[i]->Write(this, out, file_offset)) {
967 PLOG(ERROR) << "Failed to write oat dex information to " << out->GetLocation();
973 off_t actual_offset = out->Seek(expected_offset, kSeekSet);
981 if (!out->WriteFully(&dex_file->GetHeader(), dex_file->GetHeader().file_size_)) {
983 << " to " << out->GetLocation();
989 if (!oat_classes_[i]->Write(this, out, file_offset)) {
990 PLOG(ERROR) << "Failed to write oat methods information to " << out->GetLocation();
997 size_t OatWriter::WriteMaps(OutputStream* out, const size_t file_offset, size_t relative_offset) {
1000 VisitorType visitor(this, out, file_offset, relative_offset); \
1024 size_t OatWriter::WriteCode(OutputStream* out, const size_t file_offset, size_t relative_offset) {
1025 off_t new_offset = out->Seek(size_executable_offset_alignment_, kSeekCurrent);
1031 << " Expected: " << expected_file_offset << " File: " << out->GetLocation();
1042 out->Seek(alignment_padding, kSeekCurrent); \
1044 if (!out->WriteFully(&(*field)[0], field->size())) { \
1045 PLOG(ERROR) << "Failed to write " # field " to " << out->GetLocation(); \
1068 size_t OatWriter::WriteCodeDexFiles(OutputStream* out,
1073 VisitorType visitor(this, out, file_offset, relative_offset); \
1115 OutputStream* out,
1118 if (!out->WriteFully(&dex_file_location_size_, sizeof(dex_file_location_size_))) {
1119 PLOG(ERROR) << "Failed to write dex file location length to " << out->GetLocation();
1123 if (!out->WriteFully(dex_file_location_data_, dex_file_location_size_)) {
1124 PLOG(ERROR) << "Failed to write dex file location data to " << out->GetLocation();
1128 if (!out->WriteFully(&dex_file_location_checksum_, sizeof(dex_file_location_checksum_))) {
1129 PLOG(ERROR) << "Failed to write dex file location checksum to " << out->GetLocation();
1133 if (!out->WriteFully(&dex_file_offset_, sizeof(dex_file_offset_))) {
1134 PLOG(ERROR) << "Failed to write dex file offset to " << out->GetLocation();
1138 if (!out->WriteFully(&methods_offsets_[0],
1140 PLOG(ERROR) << "Failed to write methods offsets to " << out->GetLocation();
1241 out,
1244 if (!out->WriteFully(&status_, sizeof(status_))) {
1245 PLOG(ERROR) << "Failed to write class status to " << out->GetLocation();
1249 if (!out->WriteFully(&type_, sizeof(type_))) {
1250 PLOG(ERROR) << "Failed to write oat class type to " << out->GetLocation();
1256 if (!out->WriteFully(&method_bitmap_size_, sizeof(method_bitmap_size_))) {
1257 PLOG(ERROR) << "Failed to write method bitmap size to " << out->GetLocation();
1261 if (!out->WriteFully(method_bitmap_->GetRawStorage(), method_bitmap_size_)) {
1262 PLOG(ERROR) << "Failed to write method bitmap to " << out->GetLocation();
1267 if (!out->WriteFully(&method_offsets_[0],
1269 PLOG(ERROR) << "Failed to write method offsets to " << out->GetLocation();