Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: runtime/vm/code_generator.cc

Issue 1418863003: Precompilation: Generate instance calls as IC calls that can switch to Megamoprhic calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/code_patcher.h » ('j') | runtime/vm/flow_graph_compiler_ia32.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "Trace IC miss in optimized code"); 54 "Trace IC miss in optimized code");
55 DEFINE_FLAG(bool, trace_optimized_ic_calls, false, 55 DEFINE_FLAG(bool, trace_optimized_ic_calls, false,
56 "Trace IC calls in optimized code."); 56 "Trace IC calls in optimized code.");
57 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); 57 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code.");
58 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls"); 58 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls");
59 DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks."); 59 DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks.");
60 60
61 DECLARE_FLAG(int, deoptimization_counter_threshold); 61 DECLARE_FLAG(int, deoptimization_counter_threshold);
62 DECLARE_FLAG(bool, trace_compiler); 62 DECLARE_FLAG(bool, trace_compiler);
63 DECLARE_FLAG(bool, warn_on_javascript_compatibility); 63 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
64 DECLARE_FLAG(int, max_polymorphic_checks);
64 65
65 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement."); 66 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement.");
66 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement."); 67 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement.");
67 68
68 DEFINE_FLAG(int, stacktrace_every, 0, 69 DEFINE_FLAG(int, stacktrace_every, 0,
69 "Compute debugger stacktrace on every N stack overflow checks"); 70 "Compute debugger stacktrace on every N stack overflow checks");
70 DEFINE_FLAG(charp, stacktrace_filter, NULL, 71 DEFINE_FLAG(charp, stacktrace_filter, NULL,
71 "Compute stacktrace in named function on stack overflow checks"); 72 "Compute stacktrace in named function on stack overflow checks");
72 DEFINE_FLAG(int, deoptimize_every, 0, 73 DEFINE_FLAG(int, deoptimize_every, 0,
73 "Deoptimize on every N stack overflow checks"); 74 "Deoptimize on every N stack overflow checks");
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 target_function.IsNull() ? "null" : target_function.ToCString()); 773 target_function.IsNull() ? "null" : target_function.ToCString());
773 } 774 }
774 *result = target_function.raw(); 775 *result = target_function.raw();
775 return true; 776 return true;
776 } 777 }
777 778
778 779
779 // Handle other invocations (implicit closures, noSuchMethod). 780 // Handle other invocations (implicit closures, noSuchMethod).
780 RawFunction* InlineCacheMissHelper( 781 RawFunction* InlineCacheMissHelper(
781 const Instance& receiver, 782 const Instance& receiver,
782 const ICData& ic_data) { 783 const Array& args_descriptor,
783 const Array& args_descriptor = Array::Handle(ic_data.arguments_descriptor()); 784 const String& target_name) {
784
785 const Class& receiver_class = Class::Handle(receiver.clazz()); 785 const Class& receiver_class = Class::Handle(receiver.clazz());
786 const String& target_name = String::Handle(ic_data.target_name());
787 786
788 Function& result = Function::Handle(); 787 Function& result = Function::Handle();
789 if (!ResolveCallThroughGetter(receiver, 788 if (!ResolveCallThroughGetter(receiver,
790 receiver_class, 789 receiver_class,
791 target_name, 790 target_name,
792 args_descriptor, 791 args_descriptor,
793 &result)) { 792 &result)) {
794 ArgumentsDescriptor desc(args_descriptor); 793 ArgumentsDescriptor desc(args_descriptor);
795 const Function& target_function = 794 const Function& target_function =
796 Function::Handle(receiver_class.GetInvocationDispatcher( 795 Function::Handle(receiver_class.GetInvocationDispatcher(
(...skipping 24 matching lines...) Expand all
821 String& function_name = String::Handle(ic_data.target_name()); 820 String& function_name = String::Handle(ic_data.target_name());
822 ASSERT(function_name.IsSymbol()); 821 ASSERT(function_name.IsSymbol());
823 Function& target_function = Function::Handle( 822 Function& target_function = Function::Handle(
824 Resolver::ResolveDynamic(receiver, function_name, arguments_descriptor)); 823 Resolver::ResolveDynamic(receiver, function_name, arguments_descriptor));
825 if (target_function.IsNull()) { 824 if (target_function.IsNull()) {
826 if (FLAG_trace_ic) { 825 if (FLAG_trace_ic) {
827 OS::PrintErr("InlineCacheMissHandler NULL function for %s receiver: %s\n", 826 OS::PrintErr("InlineCacheMissHandler NULL function for %s receiver: %s\n",
828 String::Handle(ic_data.target_name()).ToCString(), 827 String::Handle(ic_data.target_name()).ToCString(),
829 receiver.ToCString()); 828 receiver.ToCString());
830 } 829 }
831 target_function = InlineCacheMissHelper(receiver, ic_data); 830 const Array& args_descriptor =
831 Array::Handle(ic_data.arguments_descriptor());
832 const String& target_name = String::Handle(ic_data.target_name());
833 target_function = InlineCacheMissHelper(receiver,
834 args_descriptor,
835 target_name);
832 } 836 }
833 if (target_function.IsNull()) { 837 if (target_function.IsNull()) {
834 ASSERT(!FLAG_lazy_dispatchers); 838 ASSERT(!FLAG_lazy_dispatchers);
835 return target_function.raw(); 839 return target_function.raw();
836 } 840 }
837 if (args.length() == 1) { 841 if (args.length() == 1) {
838 ic_data.AddReceiverCheck(args[0]->GetClassId(), target_function); 842 ic_data.AddReceiverCheck(args[0]->GetClassId(), target_function);
839 } else { 843 } else {
840 GrowableArray<intptr_t> class_ids(args.length()); 844 GrowableArray<intptr_t> class_ids(args.length());
841 ASSERT(ic_data.NumArgsTested() == args.length()); 845 ASSERT(ic_data.NumArgsTested() == args.length());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 OS::PrintErr("StaticCallMissHandler at %#" Px 1005 OS::PrintErr("StaticCallMissHandler at %#" Px
1002 " target %s (%" Pd ", %" Pd ")\n", 1006 " target %s (%" Pd ", %" Pd ")\n",
1003 caller_frame->pc(), target.ToCString(), cids[0], cids[1]); 1007 caller_frame->pc(), target.ToCString(), cids[0], cids[1]);
1004 } 1008 }
1005 arguments.SetReturn(target); 1009 arguments.SetReturn(target);
1006 } 1010 }
1007 1011
1008 1012
1009 // Handle a miss of a megamorphic cache. 1013 // Handle a miss of a megamorphic cache.
1010 // Arg0: Receiver. 1014 // Arg0: Receiver.
1011 // Arg1: ICData object. 1015 // Arg1: ICData or MegamorphicCache.
1012 // Arg2: Arguments descriptor array. 1016 // Arg2: Arguments descriptor array.
1013
1014 // Returns: target function to call. 1017 // Returns: target function to call.
1015 DEFINE_RUNTIME_ENTRY(MegamorphicCacheMissHandler, 3) { 1018 DEFINE_RUNTIME_ENTRY(MegamorphicCacheMissHandler, 3) {
1016 const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0)); 1019 const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
1017 const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1)); 1020 const Object& ic_data_or_cache = Object::Handle(zone, arguments.ArgAt(1));
1018 const Array& descriptor = Array::CheckedHandle(arguments.ArgAt(2)); 1021 const Array& descriptor = Array::CheckedHandle(zone, arguments.ArgAt(2));
1019 const String& name = String::Handle(ic_data.target_name()); 1022 String& name = String::Handle(zone);
1020 const MegamorphicCache& cache = MegamorphicCache::Handle( 1023 if (ic_data_or_cache.IsICData()) {
1021 MegamorphicCacheTable::Lookup(isolate, name, descriptor)); 1024 name = ICData::Cast(ic_data_or_cache).target_name();
1022 Class& cls = Class::Handle(receiver.clazz()); 1025 } else {
1026 ASSERT(ic_data_or_cache.IsMegamorphicCache());
1027 name = MegamorphicCache::Cast(ic_data_or_cache).target_name();
1028 }
1029 Class& cls = Class::Handle(zone, receiver.clazz());
1023 ASSERT(!cls.IsNull()); 1030 ASSERT(!cls.IsNull());
1024 if (FLAG_trace_ic || FLAG_trace_ic_miss_in_optimized) { 1031 if (FLAG_trace_ic || FLAG_trace_ic_miss_in_optimized) {
1025 OS::PrintErr("Megamorphic IC miss, class=%s, function=%s\n", 1032 OS::PrintErr("Megamorphic IC miss, class=%s, function=%s\n",
1026 cls.ToCString(), name.ToCString()); 1033 cls.ToCString(), name.ToCString());
1027 } 1034 }
1028 1035
1029 ArgumentsDescriptor args_desc(descriptor); 1036 ArgumentsDescriptor args_desc(descriptor);
1030 Function& target_function = Function::Handle( 1037 Function& target_function = Function::Handle(zone,
1031 Resolver::ResolveDynamicForReceiverClass(cls, 1038 Resolver::ResolveDynamicForReceiverClass(cls,
1032 name, 1039 name,
1033 args_desc)); 1040 args_desc));
1034 if (target_function.IsNull()) { 1041 if (target_function.IsNull()) {
1035 target_function = InlineCacheMissHelper(receiver, ic_data); 1042 target_function = InlineCacheMissHelper(receiver, descriptor, name);
1036 } 1043 }
1037 if (target_function.IsNull()) { 1044 if (target_function.IsNull()) {
1038 ASSERT(!FLAG_lazy_dispatchers); 1045 ASSERT(!FLAG_lazy_dispatchers);
1046 // TODO(rmacnak): Consider inserting null into the cache.
1039 arguments.SetReturn(target_function); 1047 arguments.SetReturn(target_function);
1040 return; 1048 return;
1041 } 1049 }
1042 // Insert function found into cache and return it. 1050
1043 cache.EnsureCapacity(); 1051 if (ic_data_or_cache.IsICData()) {
1044 const Smi& class_id = Smi::Handle(Smi::New(cls.id())); 1052 const ICData& ic_data = ICData::Cast(ic_data_or_cache);
1045 cache.Insert(class_id, target_function); 1053 if (ic_data.NumberOfChecks() >= FLAG_max_polymorphic_checks) {
1054 // Switch
1055 const MegamorphicCache& cache = MegamorphicCache::Handle(zone,
1056 MegamorphicCacheTable::Lookup(isolate, name, descriptor));
1057 DartFrameIterator iterator;
1058 StackFrame* miss_function_frame = iterator.NextFrame();
1059 ASSERT(miss_function_frame->IsDartFrame());
1060 StackFrame* caller_frame = iterator.NextFrame();
1061 ASSERT(caller_frame->IsDartFrame());
1062 const Code& code = Code::Handle(zone, caller_frame->LookupDartCode());
1063 const Code& stub =
1064 Code::Handle(zone, StubCode::MegamorphicLookup_entry()->code());
1065 CodePatcher::PatchSwitchableCallAt(caller_frame->pc(),
1066 code, ic_data, cache, stub);
Florian Schneider 2015/11/04 01:27:10 I think target_function should be inserted in the
rmacnak 2015/11/04 01:50:22 Done.
1067 } else {
1068 ic_data.AddReceiverCheck(receiver.GetClassId(), target_function);
1069 }
1070 } else {
1071 const MegamorphicCache& cache = MegamorphicCache::Cast(ic_data_or_cache);
1072 // Insert function found into cache and return it.
1073 cache.EnsureCapacity();
1074 const Smi& class_id = Smi::Handle(zone, Smi::New(cls.id()));
1075 cache.Insert(class_id, target_function);
1076 }
1046 arguments.SetReturn(target_function); 1077 arguments.SetReturn(target_function);
1047 } 1078 }
1048 1079
1049 1080
1050 // Invoke appropriate noSuchMethod or closure from getter. 1081 // Invoke appropriate noSuchMethod or closure from getter.
1051 // Arg0: receiver 1082 // Arg0: receiver
1052 // Arg1: IC data 1083 // Arg1: ICData or MegamorphicCache
1053 // Arg2: arguments descriptor array 1084 // Arg2: arguments descriptor array
1054 // Arg3: arguments array 1085 // Arg3: arguments array
1055 DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethodDispatcher, 4) { 1086 DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethodDispatcher, 4) {
1056 ASSERT(!FLAG_lazy_dispatchers); 1087 ASSERT(!FLAG_lazy_dispatchers);
1057 const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0)); 1088 const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
1058 const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1)); 1089 const Object& ic_data_or_cache = Object::Handle(zone, arguments.ArgAt(1));
1059 const Array& orig_arguments_desc = Array::CheckedHandle(arguments.ArgAt(2)); 1090 const Array& orig_arguments_desc =
1060 const Array& orig_arguments = Array::CheckedHandle(arguments.ArgAt(3)); 1091 Array::CheckedHandle(zone, arguments.ArgAt(2));
1061 const String& target_name = String::Handle(ic_data.target_name()); 1092 const Array& orig_arguments = Array::CheckedHandle(zone, arguments.ArgAt(3));
1093 String& target_name = String::Handle(zone);
1094 if (ic_data_or_cache.IsICData()) {
1095 target_name = ICData::Cast(ic_data_or_cache).target_name();
1096 } else {
1097 ASSERT(ic_data_or_cache.IsMegamorphicCache());
1098 target_name = MegamorphicCache::Cast(ic_data_or_cache).target_name();
1099 }
1062 1100
1063 Class& cls = Class::Handle(receiver.clazz()); 1101 Class& cls = Class::Handle(zone, receiver.clazz());
1064 Function& function = Function::Handle(); 1102 Function& function = Function::Handle(zone);
1065 1103
1066 // Dart distinguishes getters and regular methods and allows their calls 1104 // Dart distinguishes getters and regular methods and allows their calls
1067 // to mix with conversions, and its selectors are independent of arity. So do 1105 // to mix with conversions, and its selectors are independent of arity. So do
1068 // a zigzagged lookup to see if this call failed because of an arity mismatch, 1106 // a zigzagged lookup to see if this call failed because of an arity mismatch,
1069 // need for conversion, or there really is no such method. 1107 // need for conversion, or there really is no such method.
1070 1108
1071 #define NO_SUCH_METHOD() \ 1109 #define NO_SUCH_METHOD() \
1072 const Object& result = Object::Handle( \ 1110 const Object& result = Object::Handle(zone, \
1073 DartEntry::InvokeNoSuchMethod(receiver, \ 1111 DartEntry::InvokeNoSuchMethod(receiver, \
1074 target_name, \ 1112 target_name, \
1075 orig_arguments, \ 1113 orig_arguments, \
1076 orig_arguments_desc)); \ 1114 orig_arguments_desc)); \
1077 CheckResultError(result); \ 1115 CheckResultError(result); \
1078 arguments.SetReturn(result); \ 1116 arguments.SetReturn(result); \
1079 1117
1080 #define CLOSURIZE(some_function) \ 1118 #define CLOSURIZE(some_function) \
1081 const Function& closure_function = \ 1119 const Function& closure_function = \
1082 Function::Handle(some_function.ImplicitClosureFunction()); \ 1120 Function::Handle(zone, some_function.ImplicitClosureFunction()); \
1083 const Object& result = \ 1121 const Object& result = \
1084 Object::Handle(closure_function.ImplicitInstanceClosure(receiver)); \ 1122 Object::Handle(zone, closure_function.ImplicitInstanceClosure(receiver));\
1085 arguments.SetReturn(result); \ 1123 arguments.SetReturn(result); \
1086 1124
1087 const bool is_getter = Field::IsGetterName(target_name); 1125 const bool is_getter = Field::IsGetterName(target_name);
1088 if (is_getter) { 1126 if (is_getter) {
1089 // o.foo (o.get:foo) failed, closurize o.foo() if it exists. Or, 1127 // o.foo (o.get:foo) failed, closurize o.foo() if it exists. Or,
1090 // o#foo (o.get:#foo) failed, closurizee o.foo or o.foo(), whichever is 1128 // o#foo (o.get:#foo) failed, closurizee o.foo or o.foo(), whichever is
1091 // encountered first on the inheritance chain. Or, 1129 // encountered first on the inheritance chain. Or,
1092 // o#foo= (o.get:#set:foo) failed, closurize o.foo= if it exists. 1130 // o#foo= (o.get:#set:foo) failed, closurize o.foo= if it exists.
1093 String& field_name = 1131 String& field_name =
1094 String::Handle(Field::NameFromGetter(target_name)); 1132 String::Handle(zone, Field::NameFromGetter(target_name));
1095 1133
1096 const bool is_extractor = field_name.CharAt(0) == '#'; 1134 const bool is_extractor = field_name.CharAt(0) == '#';
1097 if (is_extractor) { 1135 if (is_extractor) {
1098 field_name = String::SubString(field_name, 1); 1136 field_name = String::SubString(field_name, 1);
1099 ASSERT(!Field::IsGetterName(field_name)); 1137 ASSERT(!Field::IsGetterName(field_name));
1100 field_name = Symbols::New(field_name); 1138 field_name = Symbols::New(field_name);
1101 1139
1102 if (!Field::IsSetterName(field_name)) { 1140 if (!Field::IsSetterName(field_name)) {
1103 const String& getter_name = 1141 const String& getter_name =
1104 String::Handle(Field::GetterName(field_name)); 1142 String::Handle(Field::GetterName(field_name));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 // Fall through for noSuchMethod 1174 // Fall through for noSuchMethod
1137 } else { 1175 } else {
1138 // o.foo(...) failed, invoke noSuchMethod is foo exists but has the wrong 1176 // o.foo(...) failed, invoke noSuchMethod is foo exists but has the wrong
1139 // number of arguments, or try (o.foo).call(...) 1177 // number of arguments, or try (o.foo).call(...)
1140 1178
1141 if ((target_name.raw() == Symbols::Call().raw()) && receiver.IsClosure()) { 1179 if ((target_name.raw() == Symbols::Call().raw()) && receiver.IsClosure()) {
1142 // Special case: closures are implemented with a call getter instead of a 1180 // Special case: closures are implemented with a call getter instead of a
1143 // call method and with lazy dispatchers the field-invocation-dispatcher 1181 // call method and with lazy dispatchers the field-invocation-dispatcher
1144 // would perform the closure call. 1182 // would perform the closure call.
1145 const Object& result = 1183 const Object& result =
1146 Object::Handle(DartEntry::InvokeClosure(orig_arguments, 1184 Object::Handle(zone, DartEntry::InvokeClosure(orig_arguments,
1147 orig_arguments_desc)); 1185 orig_arguments_desc));
1148 CheckResultError(result); 1186 CheckResultError(result);
1149 arguments.SetReturn(result); 1187 arguments.SetReturn(result);
1150 return; 1188 return;
1151 } 1189 }
1152 1190
1153 const String& getter_name = String::Handle(Field::GetterName(target_name)); 1191 const String& getter_name =
1192 String::Handle(zone, Field::GetterName(target_name));
1154 while (!cls.IsNull()) { 1193 while (!cls.IsNull()) {
1155 function ^= cls.LookupDynamicFunction(target_name); 1194 function ^= cls.LookupDynamicFunction(target_name);
1156 if (!function.IsNull()) { 1195 if (!function.IsNull()) {
1157 ArgumentsDescriptor args_desc(orig_arguments_desc); 1196 ArgumentsDescriptor args_desc(orig_arguments_desc);
1158 ASSERT(!function.AreValidArguments(args_desc, NULL)); 1197 ASSERT(!function.AreValidArguments(args_desc, NULL));
1159 break; // mismatch, invoke noSuchMethod 1198 break; // mismatch, invoke noSuchMethod
1160 } 1199 }
1161 function ^= cls.LookupDynamicFunction(getter_name); 1200 function ^= cls.LookupDynamicFunction(getter_name);
1162 if (!function.IsNull()) { 1201 if (!function.IsNull()) {
1163 const Array& getter_arguments = Array::Handle(Array::New(1)); 1202 const Array& getter_arguments = Array::Handle(Array::New(1));
1164 getter_arguments.SetAt(0, receiver); 1203 getter_arguments.SetAt(0, receiver);
1165 const Object& getter_result = 1204 const Object& getter_result =
1166 Object::Handle(DartEntry::InvokeFunction(function, 1205 Object::Handle(zone, DartEntry::InvokeFunction(function,
1167 getter_arguments)); 1206 getter_arguments));
1168 CheckResultError(getter_result); 1207 CheckResultError(getter_result);
1169 ASSERT(getter_result.IsNull() || getter_result.IsInstance()); 1208 ASSERT(getter_result.IsNull() || getter_result.IsInstance());
1170 1209
1171 orig_arguments.SetAt(0, getter_result); 1210 orig_arguments.SetAt(0, getter_result);
1172 const Object& call_result = 1211 const Object& call_result =
1173 Object::Handle(DartEntry::InvokeClosure(orig_arguments, 1212 Object::Handle(zone, DartEntry::InvokeClosure(orig_arguments,
1174 orig_arguments_desc)); 1213 orig_arguments_desc));
1175 CheckResultError(call_result); 1214 CheckResultError(call_result);
1176 arguments.SetReturn(call_result); 1215 arguments.SetReturn(call_result);
1177 return; 1216 return;
1178 } 1217 }
1179 cls = cls.SuperClass(); 1218 cls = cls.SuperClass();
1180 } 1219 }
1181 } 1220 }
1182 1221
1183 NO_SUCH_METHOD(); 1222 NO_SUCH_METHOD();
1184 1223
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1883 const intptr_t elm_size = old_data.ElementSizeInBytes();
1845 const TypedData& new_data = 1884 const TypedData& new_data =
1846 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1885 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1847 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1886 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1848 typed_data_cell.SetAt(0, new_data); 1887 typed_data_cell.SetAt(0, new_data);
1849 arguments.SetReturn(new_data); 1888 arguments.SetReturn(new_data);
1850 } 1889 }
1851 1890
1852 1891
1853 } // namespace dart 1892 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_patcher.h » ('j') | runtime/vm/flow_graph_compiler_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698