| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/code_generator.h" | 5 #include "vm/code_generator.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
| 9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 // Arg2: arguments descriptor array. | 1079 // Arg2: arguments descriptor array. |
| 1080 // Arg3: arguments array. | 1080 // Arg3: arguments array. |
| 1081 DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction, 4) { | 1081 DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction, 4) { |
| 1082 ASSERT(arguments.ArgCount() == | 1082 ASSERT(arguments.ArgCount() == |
| 1083 kInvokeNoSuchMethodFunctionRuntimeEntry.argument_count()); | 1083 kInvokeNoSuchMethodFunctionRuntimeEntry.argument_count()); |
| 1084 const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0)); | 1084 const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0)); |
| 1085 const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1)); | 1085 const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1)); |
| 1086 const Array& orig_arguments_desc = Array::CheckedHandle(arguments.ArgAt(2)); | 1086 const Array& orig_arguments_desc = Array::CheckedHandle(arguments.ArgAt(2)); |
| 1087 const Array& orig_arguments = Array::CheckedHandle(arguments.ArgAt(3)); | 1087 const Array& orig_arguments = Array::CheckedHandle(arguments.ArgAt(3)); |
| 1088 | 1088 |
| 1089 const String& original_function_name = String::Handle(ic_data.target_name()); | 1089 String& original_function_name = String::Handle(ic_data.target_name()); |
| 1090 if (receiver.IsClosure()) { |
| 1091 // For closure the function name is always 'call'. Replace it with the |
| 1092 // name of the closurized function so that exception contains more |
| 1093 // relevant information. |
| 1094 const Function& function = Function::Handle(Closure::function(receiver)); |
| 1095 original_function_name = function.QualifiedUserVisibleName(); |
| 1096 } |
| 1090 const Object& result = Object::Handle( | 1097 const Object& result = Object::Handle( |
| 1091 DartEntry::InvokeNoSuchMethod(receiver, | 1098 DartEntry::InvokeNoSuchMethod(receiver, |
| 1092 original_function_name, | 1099 original_function_name, |
| 1093 orig_arguments, | 1100 orig_arguments, |
| 1094 orig_arguments_desc)); | 1101 orig_arguments_desc)); |
| 1095 CheckResultError(result); | 1102 CheckResultError(result); |
| 1096 arguments.SetReturn(result); | 1103 arguments.SetReturn(result); |
| 1097 } | 1104 } |
| 1098 | 1105 |
| 1099 | 1106 |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1695 // Arg1: Value that is being stored. | 1702 // Arg1: Value that is being stored. |
| 1696 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { | 1703 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { |
| 1697 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count()); | 1704 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count()); |
| 1698 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 1705 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
| 1699 const Object& value = Object::Handle(arguments.ArgAt(1)); | 1706 const Object& value = Object::Handle(arguments.ArgAt(1)); |
| 1700 | 1707 |
| 1701 field.UpdateCid(Class::Handle(value.clazz()).id()); | 1708 field.UpdateCid(Class::Handle(value.clazz()).id()); |
| 1702 } | 1709 } |
| 1703 | 1710 |
| 1704 } // namespace dart | 1711 } // namespace dart |
| OLD | NEW |