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

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

Issue 10910224: Using type feedback, eliminate store barriers for indexed stores. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 #include "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler_macros.h" 7 #include "vm/assembler_macros.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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 const Instance& other = Instance::CheckedHandle(arguments.At(1)); 973 const Instance& other = Instance::CheckedHandle(arguments.At(1));
974 GrowableArray<const Instance*> args(2); 974 GrowableArray<const Instance*> args(2);
975 args.Add(&receiver); 975 args.Add(&receiver);
976 args.Add(&other); 976 args.Add(&other);
977 const Function& result = 977 const Function& result =
978 Function::Handle(InlineCacheMissHandler(isolate, args)); 978 Function::Handle(InlineCacheMissHandler(isolate, args));
979 arguments.SetReturn(result); 979 arguments.SetReturn(result);
980 } 980 }
981 981
982 982
983 DEFINE_RUNTIME_ENTRY(InlineCacheMissHandlerThreeArgs, 3) {
984 ASSERT(arguments.Count() ==
985 kInlineCacheMissHandlerThreeArgsRuntimeEntry.argument_count());
986 const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
987 const Instance& other = Instance::CheckedHandle(arguments.At(1));
Vyacheslav Egorov (Google) 2012/09/12 15:38:09 why no first and second or arg1, arg2 ?
srdjan 2012/09/12 15:45:25 Done.
988 const Instance& other_other = Instance::CheckedHandle(arguments.At(2));
989 GrowableArray<const Instance*> args(3);
990 args.Add(&receiver);
991 args.Add(&other);
992 args.Add(&other_other);
993 const Function& result =
994 Function::Handle(InlineCacheMissHandler(isolate, args));
995 arguments.SetReturn(result);
996 }
997
998
983 static RawFunction* LookupDynamicFunction(Isolate* isolate, 999 static RawFunction* LookupDynamicFunction(Isolate* isolate,
984 const Class& in_cls, 1000 const Class& in_cls,
985 const String& name) { 1001 const String& name) {
986 Class& cls = Class::Handle(); 1002 Class& cls = Class::Handle();
987 // For lookups treat null as an instance of class Object. 1003 // For lookups treat null as an instance of class Object.
988 if (in_cls.IsNullClass()) { 1004 if (in_cls.IsNullClass()) {
989 cls = isolate->object_store()->object_class(); 1005 cls = isolate->object_store()->object_class();
990 } else { 1006 } else {
991 cls = in_cls.raw(); 1007 cls = in_cls.raw();
992 } 1008 }
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 current->slot(), 1719 current->slot(),
1704 current->value()); 1720 current->value());
1705 } 1721 }
1706 1722
1707 delete current; 1723 delete current;
1708 } 1724 }
1709 } 1725 }
1710 1726
1711 1727
1712 } // namespace dart 1728 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698