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

Unified Diff: src/vm/heap.h

Issue 1375373004: Use the event-handler for timers. (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Created 5 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 | « src/vm/event_handler_posix.cc ('k') | src/vm/natives.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vm/heap.h
diff --git a/src/vm/heap.h b/src/vm/heap.h
index 8dbd6c14df40d5ecb152ded788ed631860000126..dd9eb639e6f63158f79ad4f641007a0b1df69c96 100644
--- a/src/vm/heap.h
+++ b/src/vm/heap.h
@@ -174,7 +174,7 @@ class ScavengeVisitor: public PointerVisitor {
Space* to_;
};
-// Extract a raw void* pointer from [object].
+// Read [object] as an integer word value.
//
// [object] must be either a Smi or a LargeInteger.
inline word AsForeignWord(Object* object) {
@@ -183,6 +183,15 @@ inline word AsForeignWord(Object* object) {
: LargeInteger::cast(object)->value();
}
+// Read [object] as an integer int64 value.
+//
+// [object] must be either a Smi or a LargeInteger.
+inline int64 AsForeignInt64(Object* object) {
+ return object->IsSmi()
+ ? Smi::cast(object)->value()
+ : LargeInteger::cast(object)->value();
+}
+
} // namespace fletch
« no previous file with comments | « src/vm/event_handler_posix.cc ('k') | src/vm/natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698