Chromium Code Reviews| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 getter_arguments.SetAt(0, instance); | 185 getter_arguments.SetAt(0, instance); |
| 186 const Object& getter_result = | 186 const Object& getter_result = |
| 187 Object::Handle(DartEntry::InvokeFunction(function, | 187 Object::Handle(DartEntry::InvokeFunction(function, |
| 188 getter_arguments)); | 188 getter_arguments)); |
| 189 if (getter_result.IsError()) { | 189 if (getter_result.IsError()) { |
| 190 return getter_result.raw(); | 190 return getter_result.raw(); |
| 191 } | 191 } |
| 192 ASSERT(getter_result.IsNull() || getter_result.IsInstance()); | 192 ASSERT(getter_result.IsNull() || getter_result.IsInstance()); |
| 193 | 193 |
| 194 arguments.SetAt(0, getter_result); | 194 arguments.SetAt(0, getter_result); |
| 195 return InvokeClosure(arguments, arguments_descriptor); | 195 // This otherwise unnecessary handle is used to prevent clang from |
|
Florian Schneider
2016/01/15 00:46:46
Should we only do this in simulator builds? i.e. #
rmacnak
2016/01/15 01:00:07
We need a stack overflow check for all configurati
| |
| 196 // doing tail call elimination, which would make the stack overflow | |
| 197 // check above ineffective. | |
| 198 Object& result = Object::Handle(InvokeClosure(arguments, | |
| 199 arguments_descriptor)); | |
| 200 return result.raw(); | |
| 196 } | 201 } |
| 197 cls = cls.SuperClass(); | 202 cls = cls.SuperClass(); |
| 198 } | 203 } |
| 199 } | 204 } |
| 200 | 205 |
| 201 // No compatible method or getter so invoke noSuchMethod. | 206 // No compatible method or getter so invoke noSuchMethod. |
| 202 return InvokeNoSuchMethod(instance, | 207 return InvokeNoSuchMethod(instance, |
| 203 Symbols::Call(), | 208 Symbols::Call(), |
| 204 arguments, | 209 arguments, |
| 205 arguments_descriptor); | 210 arguments_descriptor); |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 590 const Array& args = Array::Handle(Array::New(kNumArguments)); | 595 const Array& args = Array::Handle(Array::New(kNumArguments)); |
| 591 args.SetAt(0, map); | 596 args.SetAt(0, map); |
| 592 args.SetAt(1, key); | 597 args.SetAt(1, key); |
| 593 args.SetAt(2, value); | 598 args.SetAt(2, value); |
| 594 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, | 599 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, |
| 595 args)); | 600 args)); |
| 596 return result.raw(); | 601 return result.raw(); |
| 597 } | 602 } |
| 598 | 603 |
| 599 } // namespace dart | 604 } // namespace dart |
| OLD | NEW |