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 4157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4168 bool Code::is_keyed_stub() { | 4168 bool Code::is_keyed_stub() { |
4169 return is_keyed_load_stub() || is_keyed_store_stub() || is_keyed_call_stub(); | 4169 return is_keyed_load_stub() || is_keyed_store_stub() || is_keyed_call_stub(); |
4170 } | 4170 } |
4171 | 4171 |
4172 | 4172 |
4173 bool Code::is_debug_stub() { | 4173 bool Code::is_debug_stub() { |
4174 return ic_state() == DEBUG_STUB; | 4174 return ic_state() == DEBUG_STUB; |
4175 } | 4175 } |
4176 | 4176 |
4177 | 4177 |
| 4178 ConstantPoolArray* Code::constant_pool() { |
| 4179 return ConstantPoolArray::cast(READ_FIELD(this, kConstantPoolOffset)); |
| 4180 } |
| 4181 |
| 4182 |
| 4183 void Code::set_constant_pool(Object* value) { |
| 4184 ASSERT(value->IsConstantPoolArray()); |
| 4185 WRITE_FIELD(this, kConstantPoolOffset, value); |
| 4186 WRITE_BARRIER(GetHeap(), this, kConstantPoolOffset, value); |
| 4187 } |
| 4188 |
| 4189 |
4178 Code::Flags Code::ComputeFlags(Kind kind, | 4190 Code::Flags Code::ComputeFlags(Kind kind, |
4179 InlineCacheState ic_state, | 4191 InlineCacheState ic_state, |
4180 ExtraICState extra_ic_state, | 4192 ExtraICState extra_ic_state, |
4181 StubType type, | 4193 StubType type, |
4182 int argc, | 4194 int argc, |
4183 InlineCacheHolderFlag holder) { | 4195 InlineCacheHolderFlag holder) { |
4184 ASSERT(argc <= Code::kMaxArguments); | 4196 ASSERT(argc <= Code::kMaxArguments); |
4185 // Since the extended extra ic state overlaps with the argument count | 4197 // Since the extended extra ic state overlaps with the argument count |
4186 // for CALL_ICs, do so checks to make sure that they don't interfere. | 4198 // for CALL_ICs, do so checks to make sure that they don't interfere. |
4187 ASSERT((kind != Code::CALL_IC && | 4199 ASSERT((kind != Code::CALL_IC && |
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6466 #undef WRITE_UINT32_FIELD | 6478 #undef WRITE_UINT32_FIELD |
6467 #undef READ_SHORT_FIELD | 6479 #undef READ_SHORT_FIELD |
6468 #undef WRITE_SHORT_FIELD | 6480 #undef WRITE_SHORT_FIELD |
6469 #undef READ_BYTE_FIELD | 6481 #undef READ_BYTE_FIELD |
6470 #undef WRITE_BYTE_FIELD | 6482 #undef WRITE_BYTE_FIELD |
6471 | 6483 |
6472 | 6484 |
6473 } } // namespace v8::internal | 6485 } } // namespace v8::internal |
6474 | 6486 |
6475 #endif // V8_OBJECTS_INL_H_ | 6487 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |