| 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 11071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11082 intptr_t ICData::GetClassIdAt(intptr_t index, intptr_t arg_nr) const { | 11082 intptr_t ICData::GetClassIdAt(intptr_t index, intptr_t arg_nr) const { |
| 11083 GrowableArray<intptr_t> class_ids; | 11083 GrowableArray<intptr_t> class_ids; |
| 11084 Function& target = Function::Handle(); | 11084 Function& target = Function::Handle(); |
| 11085 GetCheckAt(index, &class_ids, &target); | 11085 GetCheckAt(index, &class_ids, &target); |
| 11086 return class_ids[arg_nr]; | 11086 return class_ids[arg_nr]; |
| 11087 } | 11087 } |
| 11088 | 11088 |
| 11089 | 11089 |
| 11090 intptr_t ICData::GetReceiverClassIdAt(intptr_t index) const { | 11090 intptr_t ICData::GetReceiverClassIdAt(intptr_t index) const { |
| 11091 ASSERT(index < NumberOfChecks()); | 11091 ASSERT(index < NumberOfChecks()); |
| 11092 const Array& data = Array::Handle(ic_data()); | |
| 11093 const intptr_t data_pos = index * TestEntryLength(); | 11092 const intptr_t data_pos = index * TestEntryLength(); |
| 11094 return Smi::Value(Smi::RawCast(data.At(data_pos))); | 11093 NoGCScope no_gc; |
| 11094 RawArray* raw_data = ic_data(); |
| 11095 return Smi::Value(Smi::RawCast(raw_data->ptr()->data()[data_pos])); |
| 11095 } | 11096 } |
| 11096 | 11097 |
| 11097 | 11098 |
| 11098 RawFunction* ICData::GetTargetAt(intptr_t index) const { | 11099 RawFunction* ICData::GetTargetAt(intptr_t index) const { |
| 11099 const intptr_t data_pos = index * TestEntryLength() + NumArgsTested(); | 11100 const intptr_t data_pos = index * TestEntryLength() + NumArgsTested(); |
| 11100 ASSERT(Object::Handle(Array::Handle(ic_data()).At(data_pos)).IsFunction()); | 11101 ASSERT(Object::Handle(Array::Handle(ic_data()).At(data_pos)).IsFunction()); |
| 11101 | 11102 |
| 11102 NoGCScope no_gc; | 11103 NoGCScope no_gc; |
| 11103 RawArray* raw_data = ic_data(); | 11104 RawArray* raw_data = ic_data(); |
| 11104 return reinterpret_cast<RawFunction*>(raw_data->ptr()->data()[data_pos]); | 11105 return reinterpret_cast<RawFunction*>(raw_data->ptr()->data()[data_pos]); |
| (...skipping 7804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18909 return tag_label.ToCString(); | 18910 return tag_label.ToCString(); |
| 18910 } | 18911 } |
| 18911 | 18912 |
| 18912 | 18913 |
| 18913 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 18914 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 18914 Instance::PrintJSONImpl(stream, ref); | 18915 Instance::PrintJSONImpl(stream, ref); |
| 18915 } | 18916 } |
| 18916 | 18917 |
| 18917 | 18918 |
| 18918 } // namespace dart | 18919 } // namespace dart |
| OLD | NEW |