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" |
11 #include "vm/object_store.h" | 11 #include "vm/object_store.h" |
12 #include "vm/resolver.h" | 12 #include "vm/resolver.h" |
13 #include "vm/safepoint.h" | 13 #include "vm/safepoint.h" |
14 #include "vm/simulator.h" | 14 #include "vm/simulator.h" |
15 #include "vm/stub_code.h" | 15 #include "vm/stub_code.h" |
16 #include "vm/symbols.h" | 16 #include "vm/symbols.h" |
17 | 17 |
18 namespace dart { | 18 namespace dart { |
19 | 19 |
20 DECLARE_FLAG(bool, lazy_dispatchers); | |
21 | |
22 // A cache of VM heap allocated arguments descriptors. | 20 // A cache of VM heap allocated arguments descriptors. |
23 RawArray* ArgumentsDescriptor::cached_args_descriptors_[kCachedDescriptorCount]; | 21 RawArray* ArgumentsDescriptor::cached_args_descriptors_[kCachedDescriptorCount]; |
24 | 22 |
25 | 23 |
26 RawObject* DartEntry::InvokeFunction(const Function& function, | 24 RawObject* DartEntry::InvokeFunction(const Function& function, |
27 const Array& arguments) { | 25 const Array& arguments) { |
28 ASSERT(Thread::Current()->IsMutatorThread()); | 26 ASSERT(Thread::Current()->IsMutatorThread()); |
29 const Array& arguments_descriptor = | 27 const Array& arguments_descriptor = |
30 Array::Handle(ArgumentsDescriptor::New(arguments.Length())); | 28 Array::Handle(ArgumentsDescriptor::New(arguments.Length())); |
31 return InvokeFunction(function, arguments, arguments_descriptor); | 29 return InvokeFunction(function, arguments, arguments_descriptor); |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 const Array& args = Array::Handle(Array::New(kNumArguments)); | 595 const Array& args = Array::Handle(Array::New(kNumArguments)); |
598 args.SetAt(0, map); | 596 args.SetAt(0, map); |
599 args.SetAt(1, key); | 597 args.SetAt(1, key); |
600 args.SetAt(2, value); | 598 args.SetAt(2, value); |
601 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, | 599 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, |
602 args)); | 600 args)); |
603 return result.raw(); | 601 return result.raw(); |
604 } | 602 } |
605 | 603 |
606 } // namespace dart | 604 } // namespace dart |
OLD | NEW |