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 4171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4182 bool Code::is_keyed_stub() { | 4182 bool Code::is_keyed_stub() { |
4183 return is_keyed_load_stub() || is_keyed_store_stub() || is_keyed_call_stub(); | 4183 return is_keyed_load_stub() || is_keyed_store_stub() || is_keyed_call_stub(); |
4184 } | 4184 } |
4185 | 4185 |
4186 | 4186 |
4187 bool Code::is_debug_stub() { | 4187 bool Code::is_debug_stub() { |
4188 return ic_state() == DEBUG_STUB; | 4188 return ic_state() == DEBUG_STUB; |
4189 } | 4189 } |
4190 | 4190 |
4191 | 4191 |
| 4192 ConstantPoolArray* Code::constant_pool() { |
| 4193 return ConstantPoolArray::cast(READ_FIELD(this, kConstantPoolOffset)); |
| 4194 } |
| 4195 |
| 4196 |
| 4197 void Code::set_constant_pool(Object* value) { |
| 4198 ASSERT(value->IsConstantPoolArray()); |
| 4199 WRITE_FIELD(this, kConstantPoolOffset, value); |
| 4200 WRITE_BARRIER(GetHeap(), this, kConstantPoolOffset, value); |
| 4201 } |
| 4202 |
| 4203 |
4192 Code::Flags Code::ComputeFlags(Kind kind, | 4204 Code::Flags Code::ComputeFlags(Kind kind, |
4193 InlineCacheState ic_state, | 4205 InlineCacheState ic_state, |
4194 ExtraICState extra_ic_state, | 4206 ExtraICState extra_ic_state, |
4195 StubType type, | 4207 StubType type, |
4196 int argc, | 4208 int argc, |
4197 InlineCacheHolderFlag holder) { | 4209 InlineCacheHolderFlag holder) { |
4198 ASSERT(argc <= Code::kMaxArguments); | 4210 ASSERT(argc <= Code::kMaxArguments); |
4199 // Since the extended extra ic state overlaps with the argument count | 4211 // Since the extended extra ic state overlaps with the argument count |
4200 // for CALL_ICs, do so checks to make sure that they don't interfere. | 4212 // for CALL_ICs, do so checks to make sure that they don't interfere. |
4201 ASSERT((kind != Code::CALL_IC && | 4213 ASSERT((kind != Code::CALL_IC && |
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6476 #undef WRITE_UINT32_FIELD | 6488 #undef WRITE_UINT32_FIELD |
6477 #undef READ_SHORT_FIELD | 6489 #undef READ_SHORT_FIELD |
6478 #undef WRITE_SHORT_FIELD | 6490 #undef WRITE_SHORT_FIELD |
6479 #undef READ_BYTE_FIELD | 6491 #undef READ_BYTE_FIELD |
6480 #undef WRITE_BYTE_FIELD | 6492 #undef WRITE_BYTE_FIELD |
6481 | 6493 |
6482 | 6494 |
6483 } } // namespace v8::internal | 6495 } } // namespace v8::internal |
6484 | 6496 |
6485 #endif // V8_OBJECTS_INL_H_ | 6497 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |