| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 | 54 |
| 55 static uint64_t& uint64_at(Address addr) { | 55 static uint64_t& uint64_at(Address addr) { |
| 56 return *reinterpret_cast<uint64_t*>(addr); | 56 return *reinterpret_cast<uint64_t*>(addr); |
| 57 } | 57 } |
| 58 | 58 |
| 59 static int& int_at(Address addr) { | 59 static int& int_at(Address addr) { |
| 60 return *reinterpret_cast<int*>(addr); | 60 return *reinterpret_cast<int*>(addr); |
| 61 } | 61 } |
| 62 | 62 |
| 63 static unsigned& unsigned_at(Address addr) { | |
| 64 return *reinterpret_cast<unsigned*>(addr); | |
| 65 } | |
| 66 | |
| 67 static double& double_at(Address addr) { | 63 static double& double_at(Address addr) { |
| 68 return *reinterpret_cast<double*>(addr); | 64 return *reinterpret_cast<double*>(addr); |
| 69 } | 65 } |
| 70 | 66 |
| 71 static Address& Address_at(Address addr) { | 67 static Address& Address_at(Address addr) { |
| 72 return *reinterpret_cast<Address*>(addr); | 68 return *reinterpret_cast<Address*>(addr); |
| 73 } | 69 } |
| 74 | 70 |
| 75 static Object*& Object_at(Address addr) { | 71 static Object*& Object_at(Address addr) { |
| 76 return *reinterpret_cast<Object**>(addr); | 72 return *reinterpret_cast<Object**>(addr); |
| 77 } | 73 } |
| 78 | 74 |
| 79 static Handle<Object>& Object_Handle_at(Address addr) { | 75 static Handle<Object>& Object_Handle_at(Address addr) { |
| 80 return *reinterpret_cast<Handle<Object>*>(addr); | 76 return *reinterpret_cast<Handle<Object>*>(addr); |
| 81 } | 77 } |
| 82 }; | 78 }; |
| 83 | 79 |
| 84 } } // namespace v8::internal | 80 } } // namespace v8::internal |
| 85 | 81 |
| 86 #endif // V8_MEMORY_H_ | 82 #endif // V8_MEMORY_H_ |
| OLD | NEW |