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 15 matching lines...) Expand all Loading... |
26 Array::Handle(ArgumentsDescriptor::New(arguments.Length())); | 26 Array::Handle(ArgumentsDescriptor::New(arguments.Length())); |
27 return InvokeFunction(function, arguments, arguments_descriptor); | 27 return InvokeFunction(function, arguments, arguments_descriptor); |
28 } | 28 } |
29 | 29 |
30 | 30 |
31 RawObject* DartEntry::InvokeFunction(const Function& function, | 31 RawObject* DartEntry::InvokeFunction(const Function& function, |
32 const Array& arguments, | 32 const Array& arguments, |
33 const Array& arguments_descriptor) { | 33 const Array& arguments_descriptor) { |
34 const Context& context = | 34 const Context& context = |
35 Context::Handle(Isolate::Current()->object_store()->empty_context()); | 35 Context::Handle(Isolate::Current()->object_store()->empty_context()); |
36 ASSERT(context.isolate() == Isolate::Current()); | |
37 return InvokeFunction(function, arguments, arguments_descriptor, context); | 36 return InvokeFunction(function, arguments, arguments_descriptor, context); |
38 } | 37 } |
39 | 38 |
40 | 39 |
41 class ScopedIsolateStackLimits : public ValueObject { | 40 class ScopedIsolateStackLimits : public ValueObject { |
42 public: | 41 public: |
43 explicit ScopedIsolateStackLimits(Isolate* isolate) | 42 explicit ScopedIsolateStackLimits(Isolate* isolate) |
44 : isolate_(isolate) { | 43 : isolate_(isolate) { |
45 ASSERT(isolate_ != NULL); | 44 ASSERT(isolate_ != NULL); |
46 ASSERT(isolate_ == Isolate::Current()); | 45 ASSERT(isolate_ == Isolate::Current()); |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 const Array& args = Array::Handle(Array::New(kNumArguments)); | 507 const Array& args = Array::Handle(Array::New(kNumArguments)); |
509 args.SetAt(0, map); | 508 args.SetAt(0, map); |
510 args.SetAt(1, key); | 509 args.SetAt(1, key); |
511 args.SetAt(2, value); | 510 args.SetAt(2, value); |
512 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, | 511 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, |
513 args)); | 512 args)); |
514 return result.raw(); | 513 return result.raw(); |
515 } | 514 } |
516 | 515 |
517 } // namespace dart | 516 } // namespace dart |
OLD | NEW |