| 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
|
|
|
|
|