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

Unified Diff: runtime/vm/object.h

Issue 203523011: Introduce a lazy-compile stub for functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased & added MIPS code Created 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 34118)
+++ runtime/vm/object.h (working copy)
@@ -1491,8 +1491,9 @@
void set_parameter_names(const Array& value) const;
// Sets function's code and code's function.
- void SetCode(const Code& value) const;
- void ClearCode() const;
+ void AttachCode(const Code& value) const;
+ void set_code(const Code& value) const;
+ void ClearCode() const;
// Disables optimized code and switches to unoptimized code.
void SwitchToUnoptimizedCode() const;
@@ -1507,7 +1508,7 @@
static intptr_t unoptimized_code_offset() {
return OFFSET_OF(RawFunction, unoptimized_code_);
}
- inline bool HasCode() const;
+ bool HasCode() const;
// Returns true if there is at least one debugger breakpoint
// set in this function.
@@ -1991,6 +1992,7 @@
// RawFunction::VisitFunctionPointers accesses the private constructor of
// Function.
friend class RawFunction;
+ friend class MarkingVisitor; // Access to KindBits
};
@@ -2977,9 +2979,6 @@
return GetBit(index);
}
- RawCode* Code() const { return raw_ptr()->code_; }
- void SetCode(const dart::Code& code) const;
-
intptr_t Length() const { return raw_ptr()->length_; }
uword PC() const { return raw_ptr()->pc_; }
@@ -6632,11 +6631,6 @@
}
-bool Function::HasCode() const {
- return raw_ptr()->code_ != Code::null();
-}
-
-
intptr_t Field::Offset() const {
ASSERT(!is_static()); // Offset is valid only for instance fields.
intptr_t value = Smi::Value(reinterpret_cast<RawSmi*>(raw_ptr()->value_));

Powered by Google App Engine
This is Rietveld 408576698