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

Unified Diff: runtime/vm/object.cc

Issue 25050004: Add a is_recognized bit to function kind field. Improves performance of method recognizer and thus … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 28022)
+++ runtime/vm/object.cc (working copy)
@@ -1175,9 +1175,12 @@
ClassFinalizer::VerifyBootstrapClasses();
MarkInvisibleFunctions();
- // Set up the intrinsic state of all functions (core, math and scalar list).
+ // Set up the intrinsic state of all functions (core, math and typed data).
Intrinsifier::InitializeState();
+ // Set up recognized state of all functions (core, math and typed data).
+ MethodRecognizer::InitializeState();
+
return Error::null();
}
@@ -4135,6 +4138,11 @@
}
+void Function::set_is_recognized(bool value) const {
+ set_kind_tag(RecognizedBit::update(value, raw_ptr()->kind_tag_));
+}
+
+
void Function::set_is_static(bool value) const {
set_kind_tag(StaticBit::update(value, raw_ptr()->kind_tag_));
}
@@ -4708,6 +4716,7 @@
result.set_is_external(is_external);
result.set_is_visible(true); // Will be computed later.
result.set_is_intrinsic(false);
+ result.set_is_recognized(false);
result.set_owner(owner);
result.set_token_pos(token_pos);
result.set_end_token_pos(token_pos);
@@ -7997,10 +8006,10 @@
-// Return Function::null() if function does not exist in lib.
-static RawFunction* GetFunction(const GrowableArray<Library*>& libs,
- const char* class_name,
- const char* function_name) {
+// Return Function::null() if function does not exist in libs.
+RawFunction* Library::GetFunction(const GrowableArray<Library*>& libs,
+ const char* class_name,
+ const char* function_name) {
Function& func = Function::Handle();
String& class_str = String::Handle();
String& func_str = String::Handle();
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698