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

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

Issue 194813008: Add compile timestamp to Code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.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 3346 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 intptr_t ExtractIcDataArraysAtCalls( 3357 intptr_t ExtractIcDataArraysAtCalls(
3358 GrowableArray<intptr_t>* node_ids, 3358 GrowableArray<intptr_t>* node_ids,
3359 const GrowableObjectArray& ic_data_objs) const; 3359 const GrowableObjectArray& ic_data_objs) const;
3360 3360
3361 // Returns an array indexed by deopt id, containing the extracted ICData. 3361 // Returns an array indexed by deopt id, containing the extracted ICData.
3362 RawArray* ExtractTypeFeedbackArray() const; 3362 RawArray* ExtractTypeFeedbackArray() const;
3363 3363
3364 RawString* Name() const; 3364 RawString* Name() const;
3365 RawString* UserName() const; 3365 RawString* UserName() const;
3366 3366
3367 int64_t compile_timestamp() {
3368 return raw_ptr()->compile_timestamp_;
siva 2014/03/11 20:32:08 compile_timestamp() const {
Cutch 2014/03/11 21:09:15 Done.
3369 }
3370
3367 private: 3371 private:
3368 void set_state_bits(intptr_t bits) const; 3372 void set_state_bits(intptr_t bits) const;
3369 3373
3370 friend class RawCode; 3374 friend class RawCode;
3371 enum { 3375 enum {
3372 kOptimizedBit = 0, 3376 kOptimizedBit = 0,
3373 kAliveBit = 1, 3377 kAliveBit = 1,
3374 }; 3378 };
3375 3379
3376 class OptimizedBit : public BitField<bool, kOptimizedBit, 1> {}; 3380 class OptimizedBit : public BitField<bool, kOptimizedBit, 1> {};
(...skipping 12 matching lines...) Expand all
3389 virtual bool FindObject(RawObject* obj) const; 3393 virtual bool FindObject(RawObject* obj) const;
3390 3394
3391 private: 3395 private:
3392 const uword pc_; 3396 const uword pc_;
3393 3397
3394 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor); 3398 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor);
3395 }; 3399 };
3396 3400
3397 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT 3401 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT
3398 3402
3403 void set_compile_timestamp(int64_t timestamp) {
siva 2014/03/11 20:32:08 const {
Cutch 2014/03/11 21:09:15 Done.
3404 raw_ptr()->compile_timestamp_ = timestamp;
3405 }
3406
3399 void set_instructions(RawInstructions* instructions) { 3407 void set_instructions(RawInstructions* instructions) {
3400 // RawInstructions are never allocated in New space and hence a 3408 // RawInstructions are never allocated in New space and hence a
3401 // store buffer update is not needed here. 3409 // store buffer update is not needed here.
3402 raw_ptr()->instructions_ = instructions; 3410 raw_ptr()->instructions_ = instructions;
3403 } 3411 }
3404 void set_pointer_offsets_length(intptr_t value) { 3412 void set_pointer_offsets_length(intptr_t value) {
3405 ASSERT(value >= 0); 3413 ASSERT(value >= 0);
3406 raw_ptr()->pointer_offsets_length_ = value; 3414 raw_ptr()->pointer_offsets_length_ = value;
3407 } 3415 }
3408 int32_t* PointerOffsetAddrAt(int index) const { 3416 int32_t* PointerOffsetAddrAt(int index) const {
(...skipping 3311 matching lines...) Expand 10 before | Expand all | Expand 10 after
6720 6728
6721 6729
6722 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6730 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6723 intptr_t index) { 6731 intptr_t index) {
6724 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6732 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6725 } 6733 }
6726 6734
6727 } // namespace dart 6735 } // namespace dart
6728 6736
6729 #endif // VM_OBJECT_H_ 6737 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698