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

Unified Diff: src/register-allocator-inl.h

Issue 585009: Eliminate unnecessary depencencies in some header files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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/register-allocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/register-allocator-inl.h
===================================================================
--- src/register-allocator-inl.h (revision 3815)
+++ src/register-allocator-inl.h (working copy)
@@ -48,6 +48,20 @@
namespace v8 {
namespace internal {
+Result::Result(const Result& other) {
+ other.CopyTo(this);
+}
+
+
+Result& Result::operator=(const Result& other) {
+ if (this != &other) {
+ Unuse();
+ other.CopyTo(this);
+ }
+ return *this;
+}
+
+
Result::~Result() {
if (is_register()) {
CodeGeneratorScope::Current()->allocator()->Unuse(reg());
@@ -71,6 +85,25 @@
}
+bool RegisterAllocator::is_used(Register reg) {
+ return registers_.is_used(ToNumber(reg));
+}
+
+
+int RegisterAllocator::count(Register reg) {
+ return registers_.count(ToNumber(reg));
+}
+
+
+void RegisterAllocator::Use(Register reg) {
+ registers_.Use(ToNumber(reg));
+}
+
+
+void RegisterAllocator::Unuse(Register reg) {
+ registers_.Unuse(ToNumber(reg));
+}
+
} } // namespace v8::internal
#endif // V8_REGISTER_ALLOCATOR_INL_H_
« no previous file with comments | « src/register-allocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698