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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 volatile uword c_stack_pos = Thread::GetCurrentStackPointer(); | 170 volatile uword c_stack_pos = Thread::GetCurrentStackPointer(); |
171 volatile uword c_stack_limit = OSThread::Current()->stack_base() - | 171 volatile uword c_stack_limit = OSThread::Current()->stack_base() - |
172 OSThread::GetSpecifiedStackSize(); | 172 OSThread::GetSpecifiedStackSize(); |
173 #if !defined(USING_SIMULATOR) | 173 #if !defined(USING_SIMULATOR) |
174 ASSERT(c_stack_limit == thread->saved_stack_limit()); | 174 ASSERT(c_stack_limit == thread->saved_stack_limit()); |
175 #endif | 175 #endif |
176 | 176 |
177 if (c_stack_pos < c_stack_limit) { | 177 if (c_stack_pos < c_stack_limit) { |
178 const Instance& exception = | 178 const Instance& exception = |
179 Instance::Handle(zone, isolate->object_store()->stack_overflow()); | 179 Instance::Handle(zone, isolate->object_store()->stack_overflow()); |
180 return UnhandledException::New(exception, Stacktrace::Handle(zone)); | 180 return UnhandledException::New(exception, StackTrace::Handle(zone)); |
181 } | 181 } |
182 | 182 |
183 const Array& getter_arguments = Array::Handle(zone, Array::New(1)); | 183 const Array& getter_arguments = Array::Handle(zone, Array::New(1)); |
184 getter_arguments.SetAt(0, instance); | 184 getter_arguments.SetAt(0, instance); |
185 const Object& getter_result = Object::Handle( | 185 const Object& getter_result = Object::Handle( |
186 zone, DartEntry::InvokeFunction(function, getter_arguments)); | 186 zone, DartEntry::InvokeFunction(function, getter_arguments)); |
187 if (getter_result.IsError()) { | 187 if (getter_result.IsError()) { |
188 return getter_result.raw(); | 188 return getter_result.raw(); |
189 } | 189 } |
190 ASSERT(getter_result.IsNull() || getter_result.IsInstance()); | 190 ASSERT(getter_result.IsNull() || getter_result.IsInstance()); |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 const Array& args = Array::Handle(Array::New(kNumArguments)); | 586 const Array& args = Array::Handle(Array::New(kNumArguments)); |
587 args.SetAt(0, map); | 587 args.SetAt(0, map); |
588 args.SetAt(1, key); | 588 args.SetAt(1, key); |
589 args.SetAt(2, value); | 589 args.SetAt(2, value); |
590 const Object& result = | 590 const Object& result = |
591 Object::Handle(DartEntry::InvokeFunction(function, args)); | 591 Object::Handle(DartEntry::InvokeFunction(function, args)); |
592 return result.raw(); | 592 return result.raw(); |
593 } | 593 } |
594 | 594 |
595 } // namespace dart | 595 } // namespace dart |
OLD | NEW |