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

Side by Side Diff: runtime/vm/object.h

Issue 1418813008: This adds a mechanism to invalidate code that was generated in the background. The invalidation can… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 1 month 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 | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 2355
2356 intptr_t NumImplicitParameters() const; 2356 intptr_t NumImplicitParameters() const;
2357 2357
2358 static intptr_t usage_counter_offset() { 2358 static intptr_t usage_counter_offset() {
2359 return OFFSET_OF(RawFunction, usage_counter_); 2359 return OFFSET_OF(RawFunction, usage_counter_);
2360 } 2360 }
2361 intptr_t usage_counter() const { 2361 intptr_t usage_counter() const {
2362 return raw_ptr()->usage_counter_; 2362 return raw_ptr()->usage_counter_;
2363 } 2363 }
2364 void set_usage_counter(intptr_t value) const { 2364 void set_usage_counter(intptr_t value) const {
2365 // TODO(Srdjan): Assert that this is thread-safe, i.e., only
2366 // set from mutator-thread or while at a safepoint (e.g., during marking).
2365 StoreNonPointer(&raw_ptr()->usage_counter_, value); 2367 StoreNonPointer(&raw_ptr()->usage_counter_, value);
2366 } 2368 }
2367 2369
2368 int16_t deoptimization_counter() const { 2370 int16_t deoptimization_counter() const {
2369 return raw_ptr()->deoptimization_counter_; 2371 return raw_ptr()->deoptimization_counter_;
2370 } 2372 }
2371 void set_deoptimization_counter(int16_t value) const { 2373 void set_deoptimization_counter(int16_t value) const {
2372 StoreNonPointer(&raw_ptr()->deoptimization_counter_, value); 2374 StoreNonPointer(&raw_ptr()->deoptimization_counter_, value);
2373 } 2375 }
2374 2376
(...skipping 5850 matching lines...) Expand 10 before | Expand all | Expand 10 after
8225 8227
8226 8228
8227 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8229 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8228 intptr_t index) { 8230 intptr_t index) {
8229 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8231 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8230 } 8232 }
8231 8233
8232 } // namespace dart 8234 } // namespace dart
8233 8235
8234 #endif // VM_OBJECT_H_ 8236 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698