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

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: self-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') | runtime/vm/raw_object_snapshot.cc » ('J')
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 4328 matching lines...) Expand 10 before | Expand all | Expand 10 after
4339 4339
4340 // Check if object matches find condition. 4340 // Check if object matches find condition.
4341 virtual bool FindObject(RawObject* obj) const; 4341 virtual bool FindObject(RawObject* obj) const;
4342 4342
4343 private: 4343 private:
4344 const uword pc_; 4344 const uword pc_;
4345 4345
4346 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor); 4346 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor);
4347 }; 4347 };
4348 4348
4349 static bool IsOptimized(RawCode* code) {
4350 return Code::OptimizedBit::decode(code->ptr()->state_bits_);
4351 }
4352
4349 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT 4353 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT
4350 4354
4351 void set_compile_timestamp(int64_t timestamp) const { 4355 void set_compile_timestamp(int64_t timestamp) const {
4352 StoreNonPointer(&raw_ptr()->compile_timestamp_, timestamp); 4356 StoreNonPointer(&raw_ptr()->compile_timestamp_, timestamp);
4353 } 4357 }
4354 4358
4355 void set_instructions(RawInstructions* instructions) { 4359 void set_instructions(RawInstructions* instructions) {
4356 // RawInstructions are never allocated in New space and hence a 4360 // RawInstructions are never allocated in New space and hence a
4357 // store buffer update is not needed here. 4361 // store buffer update is not needed here.
4358 StorePointer(&raw_ptr()->instructions_, instructions); 4362 StorePointer(&raw_ptr()->instructions_, instructions);
(...skipping 3676 matching lines...) Expand 10 before | Expand all | Expand 10 after
8035 8039
8036 8040
8037 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8041 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8038 intptr_t index) { 8042 intptr_t index) {
8039 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8043 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8040 } 8044 }
8041 8045
8042 } // namespace dart 8046 } // namespace dart
8043 8047
8044 #endif // VM_OBJECT_H_ 8048 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object_snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698