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

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

Issue 113837: Change the register allocator so that it no longer tracks references... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 14 matching lines...) Expand all
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_REGISTER_ALLOCATOR_INL_H_ 28 #ifndef V8_REGISTER_ALLOCATOR_INL_H_
29 #define V8_REGISTER_ALLOCATOR_INL_H_ 29 #define V8_REGISTER_ALLOCATOR_INL_H_
30 30
31 #include "codegen.h" 31 #include "codegen.h"
32 #include "register-allocator.h" 32 #include "register-allocator.h"
33 #include "virtual-frame.h" 33 #include "virtual-frame.h"
34 34
35 #if V8_TARGET_ARCH_IA32
36 #include "ia32/register-allocator-ia32-inl.h"
37 #elif V8_TARGET_ARCH_X64
38 #include "x64/register-allocator-x64-inl.h"
39 #elif V8_TARGET_ARCH_ARM
40 #include "arm/register-allocator-arm-inl.h"
41 #else
42 #error Unsupported target architecture.
43 #endif
44
45
35 namespace v8 { 46 namespace v8 {
36 namespace internal { 47 namespace internal {
37 48
38 Result::~Result() { 49 Result::~Result() {
39 if (is_register()) { 50 if (is_register()) {
40 CodeGeneratorScope::Current()->allocator()->Unuse(reg()); 51 CodeGeneratorScope::Current()->allocator()->Unuse(reg());
41 } 52 }
42 } 53 }
43 54
44 55
45 void Result::Unuse() { 56 void Result::Unuse() {
46 if (is_register()) { 57 if (is_register()) {
47 CodeGeneratorScope::Current()->allocator()->Unuse(reg()); 58 CodeGeneratorScope::Current()->allocator()->Unuse(reg());
48 } 59 }
49 invalidate(); 60 invalidate();
50 } 61 }
51 62
52 63
53 void Result::CopyTo(Result* destination) const { 64 void Result::CopyTo(Result* destination) const {
54 destination->value_ = value_; 65 destination->value_ = value_;
55 if (is_register()) { 66 if (is_register()) {
56 CodeGeneratorScope::Current()->allocator()->Use(reg()); 67 CodeGeneratorScope::Current()->allocator()->Use(reg());
57 } 68 }
58 } 69 }
59 70
60 71
61 } } // namespace v8::internal 72 } } // namespace v8::internal
62 73
63 #endif // V8_REGISTER_ALLOCATOR_INL_H_ 74 #endif // V8_REGISTER_ALLOCATOR_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698