| 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 5424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5435 | 5435 |
| 5436 | 5436 |
| 5437 void Function::set_result_type(const AbstractType& value) const { | 5437 void Function::set_result_type(const AbstractType& value) const { |
| 5438 ASSERT(!value.IsNull()); | 5438 ASSERT(!value.IsNull()); |
| 5439 StorePointer(&raw_ptr()->result_type_, value.raw()); | 5439 StorePointer(&raw_ptr()->result_type_, value.raw()); |
| 5440 } | 5440 } |
| 5441 | 5441 |
| 5442 | 5442 |
| 5443 RawAbstractType* Function::ParameterTypeAt(intptr_t index) const { | 5443 RawAbstractType* Function::ParameterTypeAt(intptr_t index) const { |
| 5444 const Array& parameter_types = Array::Handle(raw_ptr()->parameter_types_); | 5444 const Array& parameter_types = Array::Handle(raw_ptr()->parameter_types_); |
| 5445 AbstractType& parameter_type = AbstractType::Handle(); | 5445 return AbstractType::RawCast(parameter_types.At(index)); |
| 5446 parameter_type ^= parameter_types.At(index); | |
| 5447 return parameter_type.raw(); | |
| 5448 } | 5446 } |
| 5449 | 5447 |
| 5450 | 5448 |
| 5451 void Function::SetParameterTypeAt( | 5449 void Function::SetParameterTypeAt( |
| 5452 intptr_t index, const AbstractType& value) const { | 5450 intptr_t index, const AbstractType& value) const { |
| 5453 ASSERT(!value.IsNull()); | 5451 ASSERT(!value.IsNull()); |
| 5454 const Array& parameter_types = Array::Handle(raw_ptr()->parameter_types_); | 5452 const Array& parameter_types = Array::Handle(raw_ptr()->parameter_types_); |
| 5455 parameter_types.SetAt(index, value); | 5453 parameter_types.SetAt(index, value); |
| 5456 } | 5454 } |
| 5457 | 5455 |
| 5458 | 5456 |
| 5459 void Function::set_parameter_types(const Array& value) const { | 5457 void Function::set_parameter_types(const Array& value) const { |
| 5460 StorePointer(&raw_ptr()->parameter_types_, value.raw()); | 5458 StorePointer(&raw_ptr()->parameter_types_, value.raw()); |
| 5461 } | 5459 } |
| 5462 | 5460 |
| 5463 | 5461 |
| 5464 RawString* Function::ParameterNameAt(intptr_t index) const { | 5462 RawString* Function::ParameterNameAt(intptr_t index) const { |
| 5465 const Array& parameter_names = Array::Handle(raw_ptr()->parameter_names_); | 5463 const Array& parameter_names = Array::Handle(raw_ptr()->parameter_names_); |
| 5466 String& parameter_name = String::Handle(); | 5464 return String::RawCast(parameter_names.At(index)); |
| 5467 parameter_name ^= parameter_names.At(index); | |
| 5468 return parameter_name.raw(); | |
| 5469 } | 5465 } |
| 5470 | 5466 |
| 5471 | 5467 |
| 5472 void Function::SetParameterNameAt(intptr_t index, const String& value) const { | 5468 void Function::SetParameterNameAt(intptr_t index, const String& value) const { |
| 5473 ASSERT(!value.IsNull() && value.IsSymbol()); | 5469 ASSERT(!value.IsNull() && value.IsSymbol()); |
| 5474 const Array& parameter_names = Array::Handle(raw_ptr()->parameter_names_); | 5470 const Array& parameter_names = Array::Handle(raw_ptr()->parameter_names_); |
| 5475 parameter_names.SetAt(index, value); | 5471 parameter_names.SetAt(index, value); |
| 5476 } | 5472 } |
| 5477 | 5473 |
| 5478 | 5474 |
| (...skipping 14141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19620 return tag_label.ToCString(); | 19616 return tag_label.ToCString(); |
| 19621 } | 19617 } |
| 19622 | 19618 |
| 19623 | 19619 |
| 19624 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19620 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 19625 Instance::PrintJSONImpl(stream, ref); | 19621 Instance::PrintJSONImpl(stream, ref); |
| 19626 } | 19622 } |
| 19627 | 19623 |
| 19628 | 19624 |
| 19629 } // namespace dart | 19625 } // namespace dart |
| OLD | NEW |