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

Side by Side Diff: runtime/lib/object_patch.dart

Issue 2799373002: Pass a second type argument vector to all type instantiation calls in the VM. (Closed)
Patch Set: addressed comments Created 3 years, 8 months 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 | « runtime/lib/object.cc ('k') | runtime/vm/aot_optimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 @patch 5 @patch
6 class Object { 6 class Object {
7 // The VM has its own implementation of equals. 7 // The VM has its own implementation of equals.
8 @patch 8 @patch
9 bool operator ==(other) native "Object_equals"; 9 bool operator ==(other) native "Object_equals";
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 _symbolMapToStringMap(invocation.namedArguments)); 52 _symbolMapToStringMap(invocation.namedArguments));
53 } 53 }
54 54
55 @patch 55 @patch
56 Type get runtimeType native "Object_runtimeType"; 56 Type get runtimeType native "Object_runtimeType";
57 57
58 static bool _haveSameRuntimeType(a, b) native "Object_haveSameRuntimeType"; 58 static bool _haveSameRuntimeType(a, b) native "Object_haveSameRuntimeType";
59 59
60 // Call this function instead of inlining instanceof, thus collecting 60 // Call this function instead of inlining instanceof, thus collecting
61 // type feedback and reducing code size of unoptimized code. 61 // type feedback and reducing code size of unoptimized code.
62 bool _instanceOf(instantiator_type_arguments, type) 62 bool _instanceOf(instantiator_type_arguments, function_type_arguments, type)
63 native "Object_instanceOf"; 63 native "Object_instanceOf";
64 64
65 // Group of functions for implementing fast simple instance of. 65 // Group of functions for implementing fast simple instance of.
66 bool _simpleInstanceOf(type) native "Object_simpleInstanceOf"; 66 bool _simpleInstanceOf(type) native "Object_simpleInstanceOf";
67 bool _simpleInstanceOfTrue(type) => true; 67 bool _simpleInstanceOfTrue(type) => true;
68 bool _simpleInstanceOfFalse(type) => false; 68 bool _simpleInstanceOfFalse(type) => false;
69 69
70 // Call this function instead of inlining 'as', thus collecting type 70 // Call this function instead of inlining 'as', thus collecting type
71 // feedback. Returns receiver. 71 // feedback. Returns receiver.
72 _as(instantiator_type_arguments, type) native "Object_as"; 72 _as(instantiator_type_arguments, function_type_arguments, type)
73 native "Object_as";
73 74
74 static _symbolMapToStringMap(Map<Symbol, dynamic> map) { 75 static _symbolMapToStringMap(Map<Symbol, dynamic> map) {
75 var result = new Map<String, dynamic>(); 76 var result = new Map<String, dynamic>();
76 map.forEach((Symbol key, value) { 77 map.forEach((Symbol key, value) {
77 result[internal.Symbol.getName(key)] = value; 78 result[internal.Symbol.getName(key)] = value;
78 }); 79 });
79 return result; 80 return result;
80 } 81 }
81 } 82 }
OLDNEW
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/vm/aot_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698