| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 | 70 |
| 71 static uintptr_t& uintptr_at(Address addr) { | 71 static uintptr_t& uintptr_at(Address addr) { |
| 72 return *reinterpret_cast<uintptr_t*>(addr); | 72 return *reinterpret_cast<uintptr_t*>(addr); |
| 73 } | 73 } |
| 74 | 74 |
| 75 static double& double_at(Address addr) { | 75 static double& double_at(Address addr) { |
| 76 return *reinterpret_cast<double*>(addr); | 76 return *reinterpret_cast<double*>(addr); |
| 77 } | 77 } |
| 78 | 78 |
| 79 static float32x4_value_t& float32x4_at(Address addr) { |
| 80 return *reinterpret_cast<float32x4_value_t*>(addr); |
| 81 } |
| 82 |
| 83 static int32x4_value_t& int32x4_at(Address addr) { |
| 84 return *reinterpret_cast<int32x4_value_t*>(addr); |
| 85 } |
| 86 |
| 79 static Address& Address_at(Address addr) { | 87 static Address& Address_at(Address addr) { |
| 80 return *reinterpret_cast<Address*>(addr); | 88 return *reinterpret_cast<Address*>(addr); |
| 81 } | 89 } |
| 82 | 90 |
| 83 static Object*& Object_at(Address addr) { | 91 static Object*& Object_at(Address addr) { |
| 84 return *reinterpret_cast<Object**>(addr); | 92 return *reinterpret_cast<Object**>(addr); |
| 85 } | 93 } |
| 86 | 94 |
| 87 static Handle<Object>& Object_Handle_at(Address addr) { | 95 static Handle<Object>& Object_Handle_at(Address addr) { |
| 88 return *reinterpret_cast<Handle<Object>*>(addr); | 96 return *reinterpret_cast<Handle<Object>*>(addr); |
| 89 } | 97 } |
| 90 }; | 98 }; |
| 91 | 99 |
| 92 } } // namespace v8::internal | 100 } } // namespace v8::internal |
| 93 | 101 |
| 94 #endif // V8_MEMORY_H_ | 102 #endif // V8_MEMORY_H_ |
| OLD | NEW |