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

Unified Diff: runtime/vm/snapshot.cc

Issue 2859913002: Resolve inconsistent treatment of stubs in kAppJIT snapshots in favor of write stubs in the snapsho… (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/clustered_snapshot.cc ('K') | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index d720d0ef67efd9d017814adfff8599e7f16c44bf..3d8f5757eabdcf613098d17d55dbf42ed9a5d400 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -685,28 +685,17 @@ RawObject* SnapshotReader::NewInteger(int64_t value) {
}
-int32_t ImageWriter::GetOffsetFor(RawInstructions* instructions,
- RawCode* code) {
-#if defined(PRODUCT)
- // Instructions are only dedup in product mode because it obfuscates profiler
rmacnak 2017/05/03 19:53:53 This comment is misleading. To effectively dedupli
- // results.
- for (intptr_t i = 0; i < instructions_.length(); i++) {
- if (instructions_[i].raw_insns_ == instructions) {
- return instructions_[i].offset_;
- }
- }
-#endif
-
+int32_t ImageWriter::GetTextOffsetFor(RawInstructions* instructions,
+ RawCode* code) {
intptr_t heap_size = instructions->Size();
intptr_t offset = next_offset_;
next_offset_ += heap_size;
instructions_.Add(InstructionsData(instructions, code, offset));
-
return offset;
}
-int32_t ImageWriter::GetObjectOffsetFor(RawObject* raw_object) {
+int32_t ImageWriter::GetDataOffsetFor(RawObject* raw_object) {
intptr_t heap_size = raw_object->Size();
intptr_t offset = next_object_offset_;
next_object_offset_ += heap_size;
« runtime/vm/clustered_snapshot.cc ('K') | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698