Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Side by Side Diff: runtime/bin/file.h

Issue 2405393002: Use a single file for app snapshots. (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_FILE_H_ 5 #ifndef BIN_FILE_H_
6 #define BIN_FILE_H_ 6 #define BIN_FILE_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 kLockUnlock = 0, 81 kLockUnlock = 0,
82 kLockShared = 1, 82 kLockShared = 1,
83 kLockExclusive = 2, 83 kLockExclusive = 2,
84 kLockBlockingShared = 3, 84 kLockBlockingShared = 3,
85 kLockBlockingExclusive = 4, 85 kLockBlockingExclusive = 4,
86 kLockMax = 4 86 kLockMax = 4
87 }; 87 };
88 88
89 intptr_t GetFD(); 89 intptr_t GetFD();
90 90
91 void* MapExecutable(intptr_t* num_bytes); 91 void* MapReadOnly(int64_t position, int64_t length);
92 void* MapReadExecute(int64_t position, int64_t length);
siva 2016/10/12 20:37:33 Instead of having two entry points would it make s
rmacnak 2016/10/13 01:08:16 Done.
92 93
93 // Read/Write attempt to transfer num_bytes to/from buffer. It returns 94 // Read/Write attempt to transfer num_bytes to/from buffer. It returns
94 // the number of bytes read/written. 95 // the number of bytes read/written.
95 int64_t Read(void* buffer, int64_t num_bytes); 96 int64_t Read(void* buffer, int64_t num_bytes);
96 int64_t Write(const void* buffer, int64_t num_bytes); 97 int64_t Write(const void* buffer, int64_t num_bytes);
97 98
98 // ReadFully and WriteFully do attempt to transfer num_bytes to/from 99 // ReadFully and WriteFully do attempt to transfer num_bytes to/from
99 // the buffer. In the event of short accesses they will loop internally until 100 // the buffer. In the event of short accesses they will loop internally until
100 // the whole buffer has been transferred or an error occurs. If an error 101 // the whole buffer has been transferred or an error occurs. If an error
101 // occurred the result will be set to false. 102 // occurred the result will be set to false.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 Dart_WeakPersistentHandle weak_handle_; 235 Dart_WeakPersistentHandle weak_handle_;
235 236
236 friend class ReferenceCounted<File>; 237 friend class ReferenceCounted<File>;
237 DISALLOW_COPY_AND_ASSIGN(File); 238 DISALLOW_COPY_AND_ASSIGN(File);
238 }; 239 };
239 240
240 } // namespace bin 241 } // namespace bin
241 } // namespace dart 242 } // namespace dart
242 243
243 #endif // BIN_FILE_H_ 244 #endif // BIN_FILE_H_
OLDNEW
« no previous file with comments | « runtime/bin/extensions_win.cc ('k') | runtime/bin/file_android.cc » ('j') | runtime/bin/main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698