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

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

Issue 1846443002: - Remove --coverage_dir flag and old-style coverage service requests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove obsolete tests. Created 4 years, 8 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/isolate.cc ('k') | runtime/vm/service.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 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 DEFINE_FLAG(bool, overlap_type_arguments, true, 53 DEFINE_FLAG(bool, overlap_type_arguments, true,
54 "When possible, partially or fully overlap the type arguments of a type " 54 "When possible, partially or fully overlap the type arguments of a type "
55 "with the type arguments of its super type."); 55 "with the type arguments of its super type.");
56 DEFINE_FLAG(bool, show_internal_names, false, 56 DEFINE_FLAG(bool, show_internal_names, false,
57 "Show names of internal classes (e.g. \"OneByteString\") in error messages " 57 "Show names of internal classes (e.g. \"OneByteString\") in error messages "
58 "instead of showing the corresponding interface names (e.g. \"String\")"); 58 "instead of showing the corresponding interface names (e.g. \"String\")");
59 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache"); 59 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache");
60 DEFINE_FLAG(bool, ignore_patch_signature_mismatch, false, 60 DEFINE_FLAG(bool, ignore_patch_signature_mismatch, false,
61 "Ignore patch file member signature mismatch."); 61 "Ignore patch file member signature mismatch.");
62 62
63 DECLARE_FLAG(charp, coverage_dir);
64 DECLARE_FLAG(bool, show_invisible_frames); 63 DECLARE_FLAG(bool, show_invisible_frames);
65 DECLARE_FLAG(bool, trace_deoptimization); 64 DECLARE_FLAG(bool, trace_deoptimization);
66 DECLARE_FLAG(bool, trace_deoptimization_verbose); 65 DECLARE_FLAG(bool, trace_deoptimization_verbose);
67 DECLARE_FLAG(bool, write_protect_code); 66 DECLARE_FLAG(bool, write_protect_code);
68 67
69 68
70 static const char* const kGetterPrefix = "get:"; 69 static const char* const kGetterPrefix = "get:";
71 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix); 70 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
72 static const char* const kSetterPrefix = "set:"; 71 static const char* const kSetterPrefix = "set:";
73 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix); 72 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix);
(...skipping 5716 matching lines...) Expand 10 before | Expand all | Expand 10 after
5790 void Function::SetNumOptionalParameters(intptr_t num_optional_parameters, 5789 void Function::SetNumOptionalParameters(intptr_t num_optional_parameters,
5791 bool are_optional_positional) const { 5790 bool are_optional_positional) const {
5792 ASSERT(num_optional_parameters >= 0); 5791 ASSERT(num_optional_parameters >= 0);
5793 set_num_optional_parameters(are_optional_positional ? 5792 set_num_optional_parameters(are_optional_positional ?
5794 num_optional_parameters : 5793 num_optional_parameters :
5795 -num_optional_parameters); 5794 -num_optional_parameters);
5796 } 5795 }
5797 5796
5798 5797
5799 bool Function::IsOptimizable() const { 5798 bool Function::IsOptimizable() const {
5800 if (FLAG_coverage_dir != NULL) {
5801 // Do not optimize if collecting coverage data.
5802 return false;
5803 }
5804 if (is_native()) { 5799 if (is_native()) {
5805 // Native methods don't need to be optimized. 5800 // Native methods don't need to be optimized.
5806 return false; 5801 return false;
5807 } 5802 }
5808 const intptr_t function_length = end_token_pos().Pos() - token_pos().Pos(); 5803 const intptr_t function_length = end_token_pos().Pos() - token_pos().Pos();
5809 if (is_optimizable() && (script() != Script::null()) && 5804 if (is_optimizable() && (script() != Script::null()) &&
5810 (function_length < FLAG_huge_method_cutoff_in_tokens)) { 5805 (function_length < FLAG_huge_method_cutoff_in_tokens)) {
5811 // Additional check needed for implicit getters. 5806 // Additional check needed for implicit getters.
5812 return (unoptimized_code() == Object::null()) || 5807 return (unoptimized_code() == Object::null()) ||
5813 (Code::Handle(unoptimized_code()).Size() < 5808 (Code::Handle(unoptimized_code()).Size() <
(...skipping 15968 matching lines...) Expand 10 before | Expand all | Expand 10 after
21782 return UserTag::null(); 21777 return UserTag::null();
21783 } 21778 }
21784 21779
21785 21780
21786 const char* UserTag::ToCString() const { 21781 const char* UserTag::ToCString() const {
21787 const String& tag_label = String::Handle(label()); 21782 const String& tag_label = String::Handle(label());
21788 return tag_label.ToCString(); 21783 return tag_label.ToCString();
21789 } 21784 }
21790 21785
21791 } // namespace dart 21786 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698