OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/dart_entry.h" | 5 #include "vm/dart_entry.h" |
6 | 6 |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 RawString* ArgumentsDescriptor::NameAt(intptr_t index) const { | 292 RawString* ArgumentsDescriptor::NameAt(intptr_t index) const { |
293 const intptr_t offset = kFirstNamedEntryIndex + | 293 const intptr_t offset = kFirstNamedEntryIndex + |
294 (index * kNamedEntrySize) + | 294 (index * kNamedEntrySize) + |
295 kNameOffset; | 295 kNameOffset; |
296 String& result = String::Handle(); | 296 String& result = String::Handle(); |
297 result ^= array_.At(offset); | 297 result ^= array_.At(offset); |
298 return result.raw(); | 298 return result.raw(); |
299 } | 299 } |
300 | 300 |
301 | 301 |
| 302 intptr_t ArgumentsDescriptor::PositionAt(intptr_t index) const { |
| 303 const intptr_t offset = kFirstNamedEntryIndex + |
| 304 (index * kNamedEntrySize) + |
| 305 kPositionOffset; |
| 306 return Smi::Value(Smi::RawCast(array_.At(offset))); |
| 307 } |
| 308 |
| 309 |
302 bool ArgumentsDescriptor::MatchesNameAt(intptr_t index, | 310 bool ArgumentsDescriptor::MatchesNameAt(intptr_t index, |
303 const String& other) const { | 311 const String& other) const { |
304 return NameAt(index) == other.raw(); | 312 return NameAt(index) == other.raw(); |
305 } | 313 } |
306 | 314 |
307 | 315 |
308 intptr_t ArgumentsDescriptor::count_offset() { | 316 intptr_t ArgumentsDescriptor::count_offset() { |
309 return Array::element_offset(kCountIndex); | 317 return Array::element_offset(kCountIndex); |
310 } | 318 } |
311 | 319 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 const Array& args = Array::Handle(Array::New(kNumArguments)); | 620 const Array& args = Array::Handle(Array::New(kNumArguments)); |
613 args.SetAt(0, map); | 621 args.SetAt(0, map); |
614 args.SetAt(1, key); | 622 args.SetAt(1, key); |
615 args.SetAt(2, value); | 623 args.SetAt(2, value); |
616 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, | 624 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, |
617 args)); | 625 args)); |
618 return result.raw(); | 626 return result.raw(); |
619 } | 627 } |
620 | 628 |
621 } // namespace dart | 629 } // namespace dart |
OLD | NEW |