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

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

Issue 333453002: Reduce snapshot size by not writing null values for function code fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/raw_object_snapshot.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/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 RawArray* parameter_names_; 613 RawArray* parameter_names_;
614 RawObject* data_; // Additional data specific to the function kind. 614 RawObject* data_; // Additional data specific to the function kind.
615 RawInstructions* instructions_; // Instructions of currently active code. 615 RawInstructions* instructions_; // Instructions of currently active code.
616 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization. 616 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization.
617 RawObject** to() { 617 RawObject** to() {
618 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); 618 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_);
619 } 619 }
620 RawObject** to_no_code() { 620 RawObject** to_no_code() {
621 return reinterpret_cast<RawObject**>(&ptr()->data_); 621 return reinterpret_cast<RawObject**>(&ptr()->data_);
622 } 622 }
623 RawObject** to_snapshot() {
624 return reinterpret_cast<RawObject**>(&ptr()->data_);
625 }
623 626
624 intptr_t token_pos_; 627 intptr_t token_pos_;
625 intptr_t end_token_pos_; 628 intptr_t end_token_pos_;
626 intptr_t usage_counter_; // Incremented while function is running. 629 intptr_t usage_counter_; // Incremented while function is running.
627 int16_t num_fixed_parameters_; 630 int16_t num_fixed_parameters_;
628 int16_t num_optional_parameters_; // > 0: positional; < 0: named. 631 int16_t num_optional_parameters_; // > 0: positional; < 0: named.
629 int16_t deoptimization_counter_; 632 int16_t deoptimization_counter_;
630 uint16_t kind_tag_; // See Function::KindTagBits. 633 uint16_t kind_tag_; // See Function::KindTagBits.
631 uint16_t optimized_instruction_count_; 634 uint16_t optimized_instruction_count_;
632 uint16_t optimized_call_site_count_; 635 uint16_t optimized_call_site_count_;
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); 1859 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14);
1857 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 1860 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
1858 kTypedDataInt8ArrayViewCid + 15); 1861 kTypedDataInt8ArrayViewCid + 15);
1859 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); 1862 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14);
1860 return (kNullCid - kTypedDataInt8ArrayCid); 1863 return (kNullCid - kTypedDataInt8ArrayCid);
1861 } 1864 }
1862 1865
1863 } // namespace dart 1866 } // namespace dart
1864 1867
1865 #endif // VM_RAW_OBJECT_H_ 1868 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698