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

Side by Side Diff: runtime/vm/clustered_snapshot.cc

Issue 2246083003: AOT: Optimize even large functions. Ensures all calls are optimized static calls, switchable calls … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 #include "vm/clustered_snapshot.h" 5 #include "vm/clustered_snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 for (RawObject** p = to_snapshot + 1; p <= to; p++) { 2119 for (RawObject** p = to_snapshot + 1; p <= to; p++) {
2120 *p = Object::null(); 2120 *p = Object::null();
2121 } 2121 }
2122 ic->ptr()->deopt_id_ = d->Read<int32_t>(); 2122 ic->ptr()->deopt_id_ = d->Read<int32_t>();
2123 ic->ptr()->state_bits_ = d->Read<int32_t>(); 2123 ic->ptr()->state_bits_ = d->Read<int32_t>();
2124 #if defined(TAG_IC_DATA) 2124 #if defined(TAG_IC_DATA)
2125 ic->ptr()->tag_ = d->Read<int32_t>(); 2125 ic->ptr()->tag_ = d->Read<int32_t>();
2126 #endif 2126 #endif
2127 } 2127 }
2128 } 2128 }
2129
2130 void PostLoad(const Array& refs, Snapshot::Kind kind, Zone* zone) {
2131 NOT_IN_PRODUCT(TimelineDurationScope tds(Thread::Current(),
2132 Timeline::GetIsolateStream(), "PostLoadICData"));
2133
2134 if (kind == Snapshot::kAppNoJIT) {
2135 ICData& ic = ICData::Handle(zone);
2136 Object& funcOrCode = Object::Handle(zone);
2137 Code& code = Code::Handle(zone);
2138 Smi& entry_point = Smi::Handle(zone);
2139 for (intptr_t i = start_index_; i < stop_index_; i++) {
2140 ic ^= refs.At(i);
2141 for (intptr_t j = 0; j < ic.NumberOfChecks(); j++) {
2142 funcOrCode = ic.GetTargetOrCodeAt(j);
2143 if (funcOrCode.IsCode()) {
2144 code ^= funcOrCode.raw();
2145 entry_point = Smi::FromAlignedAddress(code.UncheckedEntryPoint());
2146 ic.SetEntryPointAt(j, entry_point);
2147 }
2148 }
2149 }
2150 }
2151 }
2152 }; 2129 };
2153 2130
2154 2131
2155 class MegamorphicCacheSerializationCluster : public SerializationCluster { 2132 class MegamorphicCacheSerializationCluster : public SerializationCluster {
2156 public: 2133 public:
2157 MegamorphicCacheSerializationCluster() { } 2134 MegamorphicCacheSerializationCluster() { }
2158 virtual ~MegamorphicCacheSerializationCluster() { } 2135 virtual ~MegamorphicCacheSerializationCluster() { }
2159 2136
2160 void Trace(Serializer* s, RawObject* object) { 2137 void Trace(Serializer* s, RawObject* object) {
2161 RawMegamorphicCache* cache = MegamorphicCache::RawCast(object); 2138 RawMegamorphicCache* cache = MegamorphicCache::RawCast(object);
(...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after
5034 5011
5035 deserializer.ReadVMSnapshot(); 5012 deserializer.ReadVMSnapshot();
5036 5013
5037 Dart::set_instructions_snapshot_buffer(instructions_buffer_); 5014 Dart::set_instructions_snapshot_buffer(instructions_buffer_);
5038 Dart::set_data_snapshot_buffer(data_buffer_); 5015 Dart::set_data_snapshot_buffer(data_buffer_);
5039 5016
5040 return ApiError::null(); 5017 return ApiError::null();
5041 } 5018 }
5042 5019
5043 } // namespace dart 5020 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698