OLD | NEW |
1 // Copyright 2006-2008 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 |
(...skipping 26 matching lines...) Expand all Loading... |
37 class Memory { | 37 class Memory { |
38 public: | 38 public: |
39 static uint32_t& uint32_at(Address addr) { | 39 static uint32_t& uint32_at(Address addr) { |
40 return *reinterpret_cast<uint32_t*>(addr); | 40 return *reinterpret_cast<uint32_t*>(addr); |
41 } | 41 } |
42 | 42 |
43 static int32_t& int32_at(Address addr) { | 43 static int32_t& int32_at(Address addr) { |
44 return *reinterpret_cast<int32_t*>(addr); | 44 return *reinterpret_cast<int32_t*>(addr); |
45 } | 45 } |
46 | 46 |
| 47 static uint64_t& uint64_at(Address addr) { |
| 48 return *reinterpret_cast<uint64_t*>(addr); |
| 49 } |
| 50 |
47 static int& int_at(Address addr) { | 51 static int& int_at(Address addr) { |
48 return *reinterpret_cast<int*>(addr); | 52 return *reinterpret_cast<int*>(addr); |
49 } | 53 } |
50 | 54 |
51 static Address& Address_at(Address addr) { | 55 static Address& Address_at(Address addr) { |
52 return *reinterpret_cast<Address*>(addr); | 56 return *reinterpret_cast<Address*>(addr); |
53 } | 57 } |
54 | 58 |
55 static Object*& Object_at(Address addr) { | 59 static Object*& Object_at(Address addr) { |
56 return *reinterpret_cast<Object**>(addr); | 60 return *reinterpret_cast<Object**>(addr); |
57 } | 61 } |
58 }; | 62 }; |
59 | 63 |
60 } } // namespace v8::internal | 64 } } // namespace v8::internal |
61 | 65 |
62 #endif // V8_MEMORY_H_ | 66 #endif // V8_MEMORY_H_ |
OLD | NEW |