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

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

Issue 2994283002: [VM-Compiler] Don't inline if we don't have inlining budget enough to fully inline.
Patch Set: Do InliningDecision the way Slava suggested Created 3 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 | « runtime/vm/object.cc ('k') | 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 RUNTIME_VM_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_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/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 RawObject** to() { 875 RawObject** to() {
876 #if defined(DART_PRECOMPILED_RUNTIME) 876 #if defined(DART_PRECOMPILED_RUNTIME)
877 return reinterpret_cast<RawObject**>(&ptr()->code_); 877 return reinterpret_cast<RawObject**>(&ptr()->code_);
878 #else 878 #else
879 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); 879 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_);
880 #endif 880 #endif
881 } 881 }
882 882
883 NOT_IN_PRECOMPILED(TokenPosition token_pos_); 883 NOT_IN_PRECOMPILED(TokenPosition token_pos_);
884 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); 884 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_);
885 NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
886 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code
887 // (JIT only).
888 uint32_t kind_tag_; // See Function::KindTagBits. 885 uint32_t kind_tag_; // See Function::KindTagBits.
889 int16_t num_fixed_parameters_; 886 int16_t num_fixed_parameters_;
890 int16_t num_optional_parameters_; // > 0: positional; < 0: named. 887 int16_t num_optional_parameters_; // > 0: positional; < 0: named.
891 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); 888
892 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); 889 #define JIT_FUNCTION_COUNTERS(F) \
893 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); 890 F(intptr_t, intptr_t, kernel_offset) \
894 NOT_IN_PRECOMPILED(int8_t was_compiled_); 891 F(intptr_t, int32_t, usage_counter) \
892 F(intptr_t, uint16_t, optimized_instruction_count) \
893 F(intptr_t, uint16_t, optimized_call_site_count) \
894 F(int8_t, int8_t, deoptimization_counter) \
895 F(intptr_t, int8_t, was_compiled_numeric) \
896 F(int, int8_t, inlining_depth)
897
898 #if !defined(DART_PRECOMPILED_RUNTIME)
899 #define DECLARE(return_type, type, name) type name##_;
900
901 JIT_FUNCTION_COUNTERS(DECLARE)
902
903 #undef DECLARE
904 #endif
895 }; 905 };
896 906
897 class RawClosureData : public RawObject { 907 class RawClosureData : public RawObject {
898 private: 908 private:
899 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); 909 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData);
900 910
901 RawObject** from() { 911 RawObject** from() {
902 return reinterpret_cast<RawObject**>(&ptr()->context_scope_); 912 return reinterpret_cast<RawObject**>(&ptr()->context_scope_);
903 } 913 }
904 RawContextScope* context_scope_; 914 RawContextScope* context_scope_;
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2463 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2454 kTypedDataInt8ArrayViewCid + 15); 2464 kTypedDataInt8ArrayViewCid + 15);
2455 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2465 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2456 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2466 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2457 return (kNullCid - kTypedDataInt8ArrayCid); 2467 return (kNullCid - kTypedDataInt8ArrayCid);
2458 } 2468 }
2459 2469
2460 } // namespace dart 2470 } // namespace dart
2461 2471
2462 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2472 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698