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

Side by Side Diff: src/register-allocator.h

Issue 50051: Inline the Result::Unuse member function and change the Result... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/jump-target-ia32.cc ('k') | src/register-allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 Result& operator=(const Result& other) { 68 Result& operator=(const Result& other) {
69 if (this != &other) { 69 if (this != &other) {
70 Unuse(); 70 Unuse();
71 other.CopyTo(this); 71 other.CopyTo(this);
72 } 72 }
73 return *this; 73 return *this;
74 } 74 }
75 75
76 ~Result() { Unuse(); } 76 inline ~Result();
77 77
78 void Unuse(); 78 inline void Unuse();
79 79
80 Type type() const { return type_; } 80 Type type() const { return type_; }
81 81
82 bool is_valid() const { return type() != INVALID; } 82 bool is_valid() const { return type() != INVALID; }
83 bool is_register() const { return type() == REGISTER; } 83 bool is_register() const { return type() == REGISTER; }
84 bool is_constant() const { return type() == CONSTANT; } 84 bool is_constant() const { return type() == CONSTANT; }
85 85
86 Register reg() const { 86 Register reg() const {
87 ASSERT(type() == REGISTER); 87 ASSERT(type() == REGISTER);
88 return data_.reg_; 88 return data_.reg_;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 private: 240 private:
241 CodeGenerator* cgen_; 241 CodeGenerator* cgen_;
242 RegisterFile registers_; 242 RegisterFile registers_;
243 }; 243 };
244 244
245 } } // namespace v8::internal 245 } } // namespace v8::internal
246 246
247 #endif // V8_REGISTER_ALLOCATOR_H_ 247 #endif // V8_REGISTER_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « src/jump-target-ia32.cc ('k') | src/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698