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

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

Issue 2379733002: Recognize and optimize a.runtimeType == b.runtimeType pattern. (Closed)
Patch Set: fix lint Created 4 years, 1 month 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/method_recognizer.h ('k') | runtime/vm/object_store.h » ('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/become.h" 10 #include "vm/become.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 DEFINE_FLAG(bool, remove_script_timestamps_for_test, false, 65 DEFINE_FLAG(bool, remove_script_timestamps_for_test, false,
66 "Remove script timestamps to allow for deterministic testing."); 66 "Remove script timestamps to allow for deterministic testing.");
67 67
68 DECLARE_FLAG(bool, show_invisible_frames); 68 DECLARE_FLAG(bool, show_invisible_frames);
69 DECLARE_FLAG(bool, trace_deoptimization); 69 DECLARE_FLAG(bool, trace_deoptimization);
70 DECLARE_FLAG(bool, trace_deoptimization_verbose); 70 DECLARE_FLAG(bool, trace_deoptimization_verbose);
71 DECLARE_FLAG(bool, trace_reload); 71 DECLARE_FLAG(bool, trace_reload);
72 DECLARE_FLAG(bool, write_protect_code); 72 DECLARE_FLAG(bool, write_protect_code);
73 DECLARE_FLAG(bool, support_externalizable_strings); 73 DECLARE_FLAG(bool, support_externalizable_strings);
74 74
75
76 static const char* const kGetterPrefix = "get:"; 75 static const char* const kGetterPrefix = "get:";
77 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix); 76 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
78 static const char* const kSetterPrefix = "set:"; 77 static const char* const kSetterPrefix = "set:";
79 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix); 78 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix);
80 79
80
81 // A cache of VM heap allocated preinitialized empty ic data entry arrays. 81 // A cache of VM heap allocated preinitialized empty ic data entry arrays.
82 RawArray* ICData::cached_icdata_arrays_[kCachedICDataArrayCount]; 82 RawArray* ICData::cached_icdata_arrays_[kCachedICDataArrayCount];
83 83
84 cpp_vtable Object::handle_vtable_ = 0; 84 cpp_vtable Object::handle_vtable_ = 0;
85 cpp_vtable Object::builtin_vtables_[kNumPredefinedCids] = { 0 }; 85 cpp_vtable Object::builtin_vtables_[kNumPredefinedCids] = { 0 };
86 cpp_vtable Smi::handle_vtable_ = 0; 86 cpp_vtable Smi::handle_vtable_ = 0;
87 87
88 // These are initialized to a value that will force a illegal memory access if 88 // These are initialized to a value that will force a illegal memory access if
89 // they are being used. 89 // they are being used.
90 #if defined(RAW_NULL) 90 #if defined(RAW_NULL)
(...skipping 22939 matching lines...) Expand 10 before | Expand all | Expand 10 after
23030 return UserTag::null(); 23030 return UserTag::null();
23031 } 23031 }
23032 23032
23033 23033
23034 const char* UserTag::ToCString() const { 23034 const char* UserTag::ToCString() const {
23035 const String& tag_label = String::Handle(label()); 23035 const String& tag_label = String::Handle(label());
23036 return tag_label.ToCString(); 23036 return tag_label.ToCString();
23037 } 23037 }
23038 23038
23039 } // namespace dart 23039 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698