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

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

Issue 1329503002: Changes to prepare for allowing script snapshots to be taken after running the main application (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 years, 3 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/raw_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) 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 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after
4345 4345
4346 // Check if object matches find condition. 4346 // Check if object matches find condition.
4347 virtual bool FindObject(RawObject* obj) const; 4347 virtual bool FindObject(RawObject* obj) const;
4348 4348
4349 private: 4349 private:
4350 const uword pc_; 4350 const uword pc_;
4351 4351
4352 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor); 4352 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor);
4353 }; 4353 };
4354 4354
4355 static bool IsOptimized(RawCode* code) {
4356 return Code::OptimizedBit::decode(code->ptr()->state_bits_);
4357 }
4358
4355 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT 4359 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT
4356 4360
4357 void set_compile_timestamp(int64_t timestamp) const { 4361 void set_compile_timestamp(int64_t timestamp) const {
4358 StoreNonPointer(&raw_ptr()->compile_timestamp_, timestamp); 4362 StoreNonPointer(&raw_ptr()->compile_timestamp_, timestamp);
4359 } 4363 }
4360 4364
4361 void set_instructions(RawInstructions* instructions) { 4365 void set_instructions(RawInstructions* instructions) {
4362 // RawInstructions are never allocated in New space and hence a 4366 // RawInstructions are never allocated in New space and hence a
4363 // store buffer update is not needed here. 4367 // store buffer update is not needed here.
4364 StorePointer(&raw_ptr()->instructions_, instructions); 4368 StorePointer(&raw_ptr()->instructions_, instructions);
(...skipping 3682 matching lines...) Expand 10 before | Expand all | Expand 10 after
8047 8051
8048 8052
8049 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8053 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8050 intptr_t index) { 8054 intptr_t index) {
8051 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8055 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8052 } 8056 }
8053 8057
8054 } // namespace dart 8058 } // namespace dart
8055 8059
8056 #endif // VM_OBJECT_H_ 8060 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698