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 5082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5093 return Context::cast(READ_FIELD(this, kContextOffset)); | 5093 return Context::cast(READ_FIELD(this, kContextOffset)); |
5094 } | 5094 } |
5095 | 5095 |
5096 | 5096 |
5097 void JSFunction::set_context(Object* value) { | 5097 void JSFunction::set_context(Object* value) { |
5098 ASSERT(value->IsUndefined() || value->IsContext()); | 5098 ASSERT(value->IsUndefined() || value->IsContext()); |
5099 WRITE_FIELD(this, kContextOffset, value); | 5099 WRITE_FIELD(this, kContextOffset, value); |
5100 WRITE_BARRIER(GetHeap(), this, kContextOffset, value); | 5100 WRITE_BARRIER(GetHeap(), this, kContextOffset, value); |
5101 } | 5101 } |
5102 | 5102 |
| 5103 |
| 5104 ConstantPoolArray* JSFunction::constant_pool() { |
| 5105 return ConstantPoolArray::cast(READ_FIELD(this, kConstantPoolOffset)); |
| 5106 } |
| 5107 |
| 5108 |
| 5109 void JSFunction::set_constant_pool(Object* value) { |
| 5110 ASSERT(value->IsConstantPoolArray()); |
| 5111 WRITE_FIELD(this, kConstantPoolOffset, value); |
| 5112 WRITE_BARRIER(GetHeap(), this, kConstantPoolOffset, value); |
| 5113 } |
| 5114 |
| 5115 |
5103 ACCESSORS(JSFunction, prototype_or_initial_map, Object, | 5116 ACCESSORS(JSFunction, prototype_or_initial_map, Object, |
5104 kPrototypeOrInitialMapOffset) | 5117 kPrototypeOrInitialMapOffset) |
5105 | 5118 |
5106 | 5119 |
5107 Map* JSFunction::initial_map() { | 5120 Map* JSFunction::initial_map() { |
5108 return Map::cast(prototype_or_initial_map()); | 5121 return Map::cast(prototype_or_initial_map()); |
5109 } | 5122 } |
5110 | 5123 |
5111 | 5124 |
5112 void JSFunction::set_initial_map(Map* value) { | 5125 void JSFunction::set_initial_map(Map* value) { |
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6424 #undef WRITE_UINT32_FIELD | 6437 #undef WRITE_UINT32_FIELD |
6425 #undef READ_SHORT_FIELD | 6438 #undef READ_SHORT_FIELD |
6426 #undef WRITE_SHORT_FIELD | 6439 #undef WRITE_SHORT_FIELD |
6427 #undef READ_BYTE_FIELD | 6440 #undef READ_BYTE_FIELD |
6428 #undef WRITE_BYTE_FIELD | 6441 #undef WRITE_BYTE_FIELD |
6429 | 6442 |
6430 | 6443 |
6431 } } // namespace v8::internal | 6444 } } // namespace v8::internal |
6432 | 6445 |
6433 #endif // V8_OBJECTS_INL_H_ | 6446 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |