| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 9234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9245 } | 9245 } |
| 9246 | 9246 |
| 9247 | 9247 |
| 9248 void ICData::GetOneClassCheckAt(intptr_t index, | 9248 void ICData::GetOneClassCheckAt(intptr_t index, |
| 9249 intptr_t* class_id, | 9249 intptr_t* class_id, |
| 9250 Function* target) const { | 9250 Function* target) const { |
| 9251 ASSERT(class_id != NULL); | 9251 ASSERT(class_id != NULL); |
| 9252 ASSERT(target != NULL); | 9252 ASSERT(target != NULL); |
| 9253 ASSERT(num_args_tested() == 1); | 9253 ASSERT(num_args_tested() == 1); |
| 9254 const Array& data = Array::Handle(ic_data()); | 9254 const Array& data = Array::Handle(ic_data()); |
| 9255 intptr_t data_pos = index * TestEntryLength(); | 9255 const intptr_t data_pos = index * TestEntryLength(); |
| 9256 *class_id = Smi::Value(Smi::RawCast(data.At(data_pos))); | 9256 *class_id = Smi::Value(Smi::RawCast(data.At(data_pos))); |
| 9257 *target ^= data.At(data_pos + 1); | 9257 *target ^= data.At(data_pos + 1); |
| 9258 } | 9258 } |
| 9259 | 9259 |
| 9260 | 9260 |
| 9261 intptr_t ICData::GetCidAt(intptr_t index) const { |
| 9262 ASSERT(num_args_tested() == 1); |
| 9263 const Array& data = Array::Handle(ic_data()); |
| 9264 const intptr_t data_pos = index * TestEntryLength(); |
| 9265 return Smi::Value(Smi::RawCast(data.At(data_pos))); |
| 9266 } |
| 9267 |
| 9268 |
| 9261 intptr_t ICData::GetClassIdAt(intptr_t index, intptr_t arg_nr) const { | 9269 intptr_t ICData::GetClassIdAt(intptr_t index, intptr_t arg_nr) const { |
| 9262 GrowableArray<intptr_t> class_ids; | 9270 GrowableArray<intptr_t> class_ids; |
| 9263 Function& target = Function::Handle(); | 9271 Function& target = Function::Handle(); |
| 9264 GetCheckAt(index, &class_ids, &target); | 9272 GetCheckAt(index, &class_ids, &target); |
| 9265 return class_ids[arg_nr]; | 9273 return class_ids[arg_nr]; |
| 9266 } | 9274 } |
| 9267 | 9275 |
| 9268 | 9276 |
| 9269 intptr_t ICData::GetReceiverClassIdAt(intptr_t index) const { | 9277 intptr_t ICData::GetReceiverClassIdAt(intptr_t index) const { |
| 9270 ASSERT(index < NumberOfChecks()); | 9278 ASSERT(index < NumberOfChecks()); |
| (...skipping 5293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14564 } | 14572 } |
| 14565 | 14573 |
| 14566 | 14574 |
| 14567 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 14575 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 14568 stream->OpenObject(); | 14576 stream->OpenObject(); |
| 14569 stream->CloseObject(); | 14577 stream->CloseObject(); |
| 14570 } | 14578 } |
| 14571 | 14579 |
| 14572 | 14580 |
| 14573 } // namespace dart | 14581 } // namespace dart |
| OLD | NEW |