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

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

Issue 1295823003: VM: Cache instructions entry point in RawFunction/RawCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_arm.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_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 // Fields below are not part of the snapshot. 764 // Fields below are not part of the snapshot.
765 RawArray* ic_data_array_; // ICData of unoptimized code. 765 RawArray* ic_data_array_; // ICData of unoptimized code.
766 RawObject** to_no_code() { 766 RawObject** to_no_code() {
767 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); 767 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_);
768 } 768 }
769 RawInstructions* instructions_; // Instructions of currently active code. 769 RawInstructions* instructions_; // Instructions of currently active code.
770 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization. 770 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization.
771 RawObject** to() { 771 RawObject** to() {
772 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); 772 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_);
773 } 773 }
774 uword entry_point_;
774 775
775 int32_t token_pos_; 776 int32_t token_pos_;
776 int32_t end_token_pos_; 777 int32_t end_token_pos_;
777 int32_t usage_counter_; // Incremented while function is running. 778 int32_t usage_counter_; // Incremented while function is running.
778 int16_t num_fixed_parameters_; 779 int16_t num_fixed_parameters_;
779 int16_t num_optional_parameters_; // > 0: positional; < 0: named. 780 int16_t num_optional_parameters_; // > 0: positional; < 0: named.
780 int16_t deoptimization_counter_; 781 int16_t deoptimization_counter_;
781 uint32_t kind_tag_; // See Function::KindTagBits. 782 uint32_t kind_tag_; // See Function::KindTagBits.
782 uint16_t optimized_instruction_count_; 783 uint16_t optimized_instruction_count_;
783 uint16_t optimized_call_site_count_; 784 uint16_t optimized_call_site_count_;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 RawArray* stackmaps_; 997 RawArray* stackmaps_;
997 RawLocalVarDescriptors* var_descriptors_; 998 RawLocalVarDescriptors* var_descriptors_;
998 RawArray* inlined_metadata_; 999 RawArray* inlined_metadata_;
999 RawArray* comments_; 1000 RawArray* comments_;
1000 // If return_address_info_ is a Smi, it is the offset to the prologue. 1001 // If return_address_info_ is a Smi, it is the offset to the prologue.
1001 // Else, return_address_info_ is null. 1002 // Else, return_address_info_ is null.
1002 RawObject* return_address_metadata_; 1003 RawObject* return_address_metadata_;
1003 RawObject** to() { 1004 RawObject** to() {
1004 return reinterpret_cast<RawObject**>(&ptr()->comments_); 1005 return reinterpret_cast<RawObject**>(&ptr()->comments_);
1005 } 1006 }
1007 uword entry_point_;
1006 1008
1007 // Compilation timestamp. 1009 // Compilation timestamp.
1008 int64_t compile_timestamp_; 1010 int64_t compile_timestamp_;
1009 1011
1010 // state_bits_ is a bitfield with three fields: 1012 // state_bits_ is a bitfield with three fields:
1011 // The optimized bit, the alive bit, and a count of the number of pointer 1013 // The optimized bit, the alive bit, and a count of the number of pointer
1012 // offsets. 1014 // offsets.
1013 // Alive: If true, the embedded object pointers will be visited during GC. 1015 // Alive: If true, the embedded object pointers will be visited during GC.
1014 int32_t state_bits_; 1016 int32_t state_bits_;
1015 1017
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2195 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2194 kTypedDataInt8ArrayViewCid + 15); 2196 kTypedDataInt8ArrayViewCid + 15);
2195 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2197 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2196 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2198 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2197 return (kNullCid - kTypedDataInt8ArrayCid); 2199 return (kNullCid - kTypedDataInt8ArrayCid);
2198 } 2200 }
2199 2201
2200 } // namespace dart 2202 } // namespace dart
2201 2203
2202 #endif // VM_RAW_OBJECT_H_ 2204 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698