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

Unified Diff: runtime/vm/object.h

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/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 28022)
+++ runtime/vm/object.h (working copy)
@@ -1680,6 +1680,11 @@
}
void set_is_intrinsic(bool value) const;
+ bool is_recognized() const {
+ return RecognizedBit::decode(raw_ptr()->kind_tag_);
+ }
+ void set_is_recognized(bool value) const;
+
bool HasOptimizedCode() const;
// Returns true if the argument counts are valid for calling this function.
@@ -1838,7 +1843,8 @@
kExternalBit = 7,
kVisibleBit = 8,
kIntrinsicBit = 9,
- kKindTagBit = 10,
+ kRecognizedBit = 10,
+ kKindTagBit = 11,
kKindTagSize = 4,
};
class StaticBit : public BitField<bool, kStaticBit, 1> {};
@@ -1851,6 +1857,7 @@
class ExternalBit : public BitField<bool, kExternalBit, 1> {};
class VisibleBit : public BitField<bool, kVisibleBit, 1> {};
class IntrinsicBit : public BitField<bool, kIntrinsicBit, 1> {};
+ class RecognizedBit : public BitField<bool, kRecognizedBit, 1> {};
class KindBits :
public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT
@@ -2499,6 +2506,11 @@
static bool IsPrivate(const String& name);
+ // Return Function::null() if function does not exist in libs.
+ static RawFunction* GetFunction(const GrowableArray<Library*>& libs,
+ const char* class_name,
+ const char* function_name);
+
private:
static const int kInitialImportsCapacity = 4;
static const int kImportsCapacityIncrement = 8;
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698