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

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

Issue 1830473002: Speedup function profile by using a hash table instead of a linear scan (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
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 5156 matching lines...) Expand 10 before | Expand all | Expand 10 after
5167 void PatchClass::set_origin_class(const Class& value) const { 5167 void PatchClass::set_origin_class(const Class& value) const {
5168 StorePointer(&raw_ptr()->origin_class_, value.raw()); 5168 StorePointer(&raw_ptr()->origin_class_, value.raw());
5169 } 5169 }
5170 5170
5171 5171
5172 void PatchClass::set_script(const Script& value) const { 5172 void PatchClass::set_script(const Script& value) const {
5173 StorePointer(&raw_ptr()->script_, value.raw()); 5173 StorePointer(&raw_ptr()->script_, value.raw());
5174 } 5174 }
5175 5175
5176 5176
5177 intptr_t Function::Hash() const {
5178 return String::HashRawSymbol(name());
5179 }
5180
5181
5177 bool Function::HasBreakpoint() const { 5182 bool Function::HasBreakpoint() const {
5178 if (!FLAG_support_debugger) { 5183 if (!FLAG_support_debugger) {
5179 return false; 5184 return false;
5180 } 5185 }
5181 Thread* thread = Thread::Current(); 5186 Thread* thread = Thread::Current();
5182 return thread->isolate()->debugger()->HasBreakpoint(*this, thread->zone()); 5187 return thread->isolate()->debugger()->HasBreakpoint(*this, thread->zone());
5183 } 5188 }
5184 5189
5185 5190
5186 void Function::InstallOptimizedCode(const Code& code, bool is_osr) const { 5191 void Function::InstallOptimizedCode(const Code& code, bool is_osr) const {
(...skipping 16549 matching lines...) Expand 10 before | Expand all | Expand 10 after
21736 return UserTag::null(); 21741 return UserTag::null();
21737 } 21742 }
21738 21743
21739 21744
21740 const char* UserTag::ToCString() const { 21745 const char* UserTag::ToCString() const {
21741 const String& tag_label = String::Handle(label()); 21746 const String& tag_label = String::Handle(label());
21742 return tag_label.ToCString(); 21747 return tag_label.ToCString();
21743 } 21748 }
21744 21749
21745 } // namespace dart 21750 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698