Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 | 70 |
| 71 #define TYPE_CHECKER(type, instancetype) \ | 71 #define TYPE_CHECKER(type, instancetype) \ |
| 72 bool Object::Is##type() { \ | 72 bool Object::Is##type() { \ |
| 73 return Object::IsHeapObject() && \ | 73 return Object::IsHeapObject() && \ |
| 74 HeapObject::cast(this)->map()->instance_type() == instancetype; \ | 74 HeapObject::cast(this)->map()->instance_type() == instancetype; \ |
| 75 } | 75 } |
| 76 | 76 |
| 77 | 77 |
| 78 #define CAST_ACCESSOR(type) \ | 78 #define CAST_ACCESSOR(type) \ |
| 79 type* type::cast(Object* object) { \ | 79 type* type::cast(Object* object) { \ |
| 80 ASSERT(object->Is##type()); \ | 80 ASSERT(object->Is##type()); \ |
|
Michael Starzinger
2013/01/31 14:27:50
Unnecessary white-space change.
ulan
2013/02/04 09:54:06
Done.
| |
| 81 return reinterpret_cast<type*>(object); \ | 81 return reinterpret_cast<type*>(object); \ |
| 82 } | 82 } |
| 83 | 83 |
| 84 | 84 |
| 85 #define INT_ACCESSORS(holder, name, offset) \ | 85 #define INT_ACCESSORS(holder, name, offset) \ |
| 86 int holder::name() { return READ_INT_FIELD(this, offset); } \ | 86 int holder::name() { return READ_INT_FIELD(this, offset); } \ |
| 87 void holder::set_##name(int value) { WRITE_INT_FIELD(this, offset, value); } | 87 void holder::set_##name(int value) { WRITE_INT_FIELD(this, offset, value); } |
| 88 | 88 |
| 89 | 89 |
| 90 #define ACCESSORS(holder, name, type, offset) \ | 90 #define ACCESSORS(holder, name, type, offset) \ |
| (...skipping 5789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5880 #undef WRITE_UINT32_FIELD | 5880 #undef WRITE_UINT32_FIELD |
| 5881 #undef READ_SHORT_FIELD | 5881 #undef READ_SHORT_FIELD |
| 5882 #undef WRITE_SHORT_FIELD | 5882 #undef WRITE_SHORT_FIELD |
| 5883 #undef READ_BYTE_FIELD | 5883 #undef READ_BYTE_FIELD |
| 5884 #undef WRITE_BYTE_FIELD | 5884 #undef WRITE_BYTE_FIELD |
| 5885 | 5885 |
| 5886 | 5886 |
| 5887 } } // namespace v8::internal | 5887 } } // namespace v8::internal |
| 5888 | 5888 |
| 5889 #endif // V8_OBJECTS_INL_H_ | 5889 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |