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 5134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5145 return Context::cast(READ_FIELD(this, kContextOffset)); | 5145 return Context::cast(READ_FIELD(this, kContextOffset)); |
5146 } | 5146 } |
5147 | 5147 |
5148 | 5148 |
5149 void JSFunction::set_context(Object* value) { | 5149 void JSFunction::set_context(Object* value) { |
5150 ASSERT(value->IsUndefined() || value->IsContext()); | 5150 ASSERT(value->IsUndefined() || value->IsContext()); |
5151 WRITE_FIELD(this, kContextOffset, value); | 5151 WRITE_FIELD(this, kContextOffset, value); |
5152 WRITE_BARRIER(GetHeap(), this, kContextOffset, value); | 5152 WRITE_BARRIER(GetHeap(), this, kContextOffset, value); |
5153 } | 5153 } |
5154 | 5154 |
| 5155 |
| 5156 ConstantPoolArray* JSFunction::constant_pool() { |
| 5157 return ConstantPoolArray::cast(READ_FIELD(this, kConstantPoolOffset)); |
| 5158 } |
| 5159 |
| 5160 |
| 5161 void JSFunction::set_constant_pool(Object* value) { |
| 5162 ASSERT(value->IsConstantPoolArray()); |
| 5163 WRITE_FIELD(this, kConstantPoolOffset, value); |
| 5164 WRITE_BARRIER(GetHeap(), this, kConstantPoolOffset, value); |
| 5165 } |
| 5166 |
| 5167 |
5155 ACCESSORS(JSFunction, prototype_or_initial_map, Object, | 5168 ACCESSORS(JSFunction, prototype_or_initial_map, Object, |
5156 kPrototypeOrInitialMapOffset) | 5169 kPrototypeOrInitialMapOffset) |
5157 | 5170 |
5158 | 5171 |
5159 Map* JSFunction::initial_map() { | 5172 Map* JSFunction::initial_map() { |
5160 return Map::cast(prototype_or_initial_map()); | 5173 return Map::cast(prototype_or_initial_map()); |
5161 } | 5174 } |
5162 | 5175 |
5163 | 5176 |
5164 void JSFunction::set_initial_map(Map* value) { | 5177 void JSFunction::set_initial_map(Map* value) { |
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6476 #undef WRITE_UINT32_FIELD | 6489 #undef WRITE_UINT32_FIELD |
6477 #undef READ_SHORT_FIELD | 6490 #undef READ_SHORT_FIELD |
6478 #undef WRITE_SHORT_FIELD | 6491 #undef WRITE_SHORT_FIELD |
6479 #undef READ_BYTE_FIELD | 6492 #undef READ_BYTE_FIELD |
6480 #undef WRITE_BYTE_FIELD | 6493 #undef WRITE_BYTE_FIELD |
6481 | 6494 |
6482 | 6495 |
6483 } } // namespace v8::internal | 6496 } } // namespace v8::internal |
6484 | 6497 |
6485 #endif // V8_OBJECTS_INL_H_ | 6498 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |