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

Unified Diff: runtime/vm/object.h

Issue 11358047: Add is_intrinsic and is_not_intrinsic bits to prevent repeated tests on the same function (inlining… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier.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 14433)
+++ runtime/vm/object.h (working copy)
@@ -1273,6 +1273,17 @@
bool IsInlineable() const;
void set_is_inlinable(bool value) const;
+ enum IntrinsicKind {
+ kUnknownIntrinsic = 0, // Initial value.
+ kIsIntrinsic,
+ kIsNotIntrinsic,
+ };
+
+ IntrinsicKind intrinsic_kind() const {
+ return IntrinsicKindBits::decode(raw_ptr()->kind_tag_);
+ }
+ void set_intrinsic_kind(IntrinsicKind value) const;
+
bool HasOptimizedCode() const;
// Returns true if the argument counts are valid for calling this function.
@@ -1402,15 +1413,17 @@
private:
enum KindTagBits {
- kStaticBit = 1,
- kConstBit,
- kOptimizableBit,
- kInlinableBit,
- kHasFinallyBit,
- kNativeBit,
- kAbstractBit,
- kExternalBit,
- kKindTagBit,
+ kStaticBit = 0,
+ kConstBit = 1,
+ kOptimizableBit = 2,
+ kInlinableBit = 3,
+ kHasFinallyBit = 4,
+ kNativeBit = 5,
+ kAbstractBit = 6,
+ kExternalBit = 7,
+ kIntrinsicTagBit = 8,
+ kIntrinsicTagSize = 2,
+ kKindTagBit = 10,
kKindTagSize = 4,
};
class StaticBit : public BitField<bool, kStaticBit, 1> {};
@@ -1421,6 +1434,9 @@
class NativeBit : public BitField<bool, kNativeBit, 1> {};
class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
class ExternalBit : public BitField<bool, kExternalBit, 1> {};
+ class IntrinsicKindBits :
+ public BitField<Function::IntrinsicKind,
+ kIntrinsicTagBit, kIntrinsicTagSize> {}; // NOLINT
class KindBits :
public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698