OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 #include "register-allocator-inl.h" | 31 #include "register-allocator-inl.h" |
32 #include "virtual-frame-inl.h" | 32 #include "virtual-frame-inl.h" |
33 | 33 |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
37 // ------------------------------------------------------------------------- | 37 // ------------------------------------------------------------------------- |
38 // Result implementation. | 38 // Result implementation. |
39 | 39 |
40 | 40 |
41 Result::Result(Register reg, NumberInfo info) { | 41 Result::Result(Register reg, TypeInfo info) { |
42 ASSERT(reg.is_valid() && !RegisterAllocator::IsReserved(reg)); | 42 ASSERT(reg.is_valid() && !RegisterAllocator::IsReserved(reg)); |
43 CodeGeneratorScope::Current()->allocator()->Use(reg); | 43 CodeGeneratorScope::Current()->allocator()->Use(reg); |
44 value_ = TypeField::encode(REGISTER) | 44 value_ = TypeField::encode(REGISTER) |
45 | NumberInfoField::encode(info.ToInt()) | 45 | TypeInfoField::encode(info.ToInt()) |
46 | DataField::encode(reg.code_); | 46 | DataField::encode(reg.code_); |
47 } | 47 } |
48 | 48 |
49 | 49 |
50 Result::ZoneObjectList* Result::ConstantList() { | 50 Result::ZoneObjectList* Result::ConstantList() { |
51 static ZoneObjectList list(10); | 51 static ZoneObjectList list(10); |
52 return &list; | 52 return &list; |
53 } | 53 } |
54 | 54 |
55 | 55 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 cgen_->frame()->Spill(target); | 94 cgen_->frame()->Spill(target); |
95 ASSERT(!is_used(target)); | 95 ASSERT(!is_used(target)); |
96 return Result(target); | 96 return Result(target); |
97 } | 97 } |
98 // Otherwise (if it's referenced outside the frame) we cannot allocate it. | 98 // Otherwise (if it's referenced outside the frame) we cannot allocate it. |
99 return Result(); | 99 return Result(); |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 } } // namespace v8::internal | 103 } } // namespace v8::internal |
OLD | NEW |