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

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

Issue 17571010: Reland: Optimizing noSuchMethod invocation with no arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | runtime/vm/code_generator.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) 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/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 // Check if an instance method of same name exists in any super class. 950 // Check if an instance method of same name exists in any super class.
951 static RawClass* FindSuperOwnerOfFunction(const Class& cls, 951 static RawClass* FindSuperOwnerOfFunction(const Class& cls,
952 const String& name) { 952 const String& name) {
953 Class& super_class = Class::Handle(); 953 Class& super_class = Class::Handle();
954 Function& function = Function::Handle(); 954 Function& function = Function::Handle();
955 super_class = cls.SuperClass(); 955 super_class = cls.SuperClass();
956 while (!super_class.IsNull()) { 956 while (!super_class.IsNull()) {
957 function = super_class.LookupFunction(name); 957 function = super_class.LookupFunction(name);
958 if (!function.IsNull() && 958 if (!function.IsNull() &&
959 !function.is_static() && 959 !function.is_static() &&
960 !function.IsMethodExtractor()) { 960 !function.IsMethodExtractor() &&
961 !function.IsNoSuchMethodDispatcher()) {
961 return super_class.raw(); 962 return super_class.raw();
962 } 963 }
963 super_class = super_class.SuperClass(); 964 super_class = super_class.SuperClass();
964 } 965 }
965 return Class::null(); 966 return Class::null();
966 } 967 }
967 968
968 969
969 // Resolve the upper bounds of the type parameters of class cls. 970 // Resolve the upper bounds of the type parameters of class cls.
970 void ClassFinalizer::ResolveUpperBounds(const Class& cls) { 971 void ClassFinalizer::ResolveUpperBounds(const Class& cls) {
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 expected_name ^= String::New("_offset"); 2045 expected_name ^= String::New("_offset");
2045 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 2046 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
2046 field ^= fields_array.At(2); 2047 field ^= fields_array.At(2);
2047 ASSERT(field.Offset() == TypedDataView::length_offset()); 2048 ASSERT(field.Offset() == TypedDataView::length_offset());
2048 name ^= field.name(); 2049 name ^= field.name();
2049 ASSERT(name.Equals("length")); 2050 ASSERT(name.Equals("length"));
2050 #endif 2051 #endif
2051 } 2052 }
2052 2053
2053 } // namespace dart 2054 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698