Index: src/assembler.cc |
diff --git a/src/assembler.cc b/src/assembler.cc |
index 3fa90baf72908be397a4295d942171ae52d22f0d..598448ef83c3d0fae01a6d878a6599588666a264 100644 |
--- a/src/assembler.cc |
+++ b/src/assembler.cc |
@@ -37,6 +37,7 @@ |
#include <cmath> |
#include "src/api.h" |
#include "src/base/cpu.h" |
+#include "src/base/functional.h" |
#include "src/base/lazy-instance.h" |
#include "src/base/platform/platform.h" |
#include "src/builtins.h" |
@@ -1521,6 +1522,29 @@ ExternalReference ExternalReference::debug_step_in_fp_address( |
} |
+bool operator==(ExternalReference lhs, ExternalReference rhs) { |
+ return lhs.address() == rhs.address(); |
+} |
+ |
+ |
+bool operator!=(ExternalReference lhs, ExternalReference rhs) { |
+ return !(lhs == rhs); |
+} |
+ |
+ |
+size_t hash_value(ExternalReference reference) { |
+ return base::hash<Address>()(reference.address()); |
+} |
+ |
+ |
+std::ostream& operator<<(std::ostream& os, ExternalReference reference) { |
+ os << static_cast<const void*>(reference.address()); |
+ const Runtime::Function* fn = Runtime::FunctionForEntry(reference.address()); |
+ if (fn) os << "<" << fn->name << ".entry>"; |
+ return os; |
+} |
+ |
+ |
void PositionsRecorder::RecordPosition(int pos) { |
DCHECK(pos != RelocInfo::kNoPosition); |
DCHECK(pos >= 0); |