| 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 Exceptions::PropagateError(error); | 1043 Exceptions::PropagateError(error); |
| 1044 } | 1044 } |
| 1045 } | 1045 } |
| 1046 ASSERT(target.HasCode()); | 1046 ASSERT(target.HasCode()); |
| 1047 instructions = Code::Handle(target.CurrentCode()).instructions(); | 1047 instructions = Code::Handle(target.CurrentCode()).instructions(); |
| 1048 } | 1048 } |
| 1049 arguments.SetReturn(instructions); | 1049 arguments.SetReturn(instructions); |
| 1050 if (instructions.IsNull()) return; | 1050 if (instructions.IsNull()) return; |
| 1051 | 1051 |
| 1052 cache.EnsureCapacity(); | 1052 cache.EnsureCapacity(); |
| 1053 const Smi& class_id = Smi::Handle(Smi::New(is_null ? kNullCid : cls.id())); | 1053 const Smi& class_id = Smi::Handle(Smi::New( |
| 1054 is_null ? static_cast<intptr_t>(kNullCid) : cls.id())); |
| 1054 cache.Insert(class_id, target); | 1055 cache.Insert(class_id, target); |
| 1055 return; | 1056 return; |
| 1056 } | 1057 } |
| 1057 | 1058 |
| 1058 | 1059 |
| 1059 // Updates IC data for two arguments. Used by the equality operation when | 1060 // Updates IC data for two arguments. Used by the equality operation when |
| 1060 // the control flow bypasses regular inline cache (null arguments). | 1061 // the control flow bypasses regular inline cache (null arguments). |
| 1061 // Arg0: Receiver object. | 1062 // Arg0: Receiver object. |
| 1062 // Arg1: Argument after receiver. | 1063 // Arg1: Argument after receiver. |
| 1063 // Arg2: Target's name. | 1064 // Arg2: Target's name. |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1726 // Arg1: Value that is being stored. | 1727 // Arg1: Value that is being stored. |
| 1727 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { | 1728 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { |
| 1728 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count()); | 1729 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count()); |
| 1729 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 1730 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
| 1730 const Object& value = Object::Handle(arguments.ArgAt(1)); | 1731 const Object& value = Object::Handle(arguments.ArgAt(1)); |
| 1731 | 1732 |
| 1732 field.UpdateCid(Class::Handle(value.clazz()).id()); | 1733 field.UpdateCid(Class::Handle(value.clazz()).id()); |
| 1733 } | 1734 } |
| 1734 | 1735 |
| 1735 } // namespace dart | 1736 } // namespace dart |
| OLD | NEW |