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

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

Issue 11187046: Apply optimization after class-id propagation: instance calls without ICData are optimized by using… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « runtime/vm/intermediate_language.h ('k') | no next file » | 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 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 } 2198 }
2199 return true; 2199 return true;
2200 } 2200 }
2201 2201
2202 2202
2203 RawFunction* Class::LookupFunction(const String& name) const { 2203 RawFunction* Class::LookupFunction(const String& name) const {
2204 Isolate* isolate = Isolate::Current(); 2204 Isolate* isolate = Isolate::Current();
2205 ASSERT(name.IsOneByteString()); 2205 ASSERT(name.IsOneByteString());
2206 const OneByteString& lookup_name = OneByteString::Cast(name); 2206 const OneByteString& lookup_name = OneByteString::Cast(name);
2207 Array& funcs = Array::Handle(isolate, functions()); 2207 Array& funcs = Array::Handle(isolate, functions());
2208 if (funcs.IsNull()) {
2209 // This can occur, e.g., for Null classes.
2210 return Function::null();
2211 }
2208 Function& function = Function::Handle(isolate, Function::null()); 2212 Function& function = Function::Handle(isolate, Function::null());
2209 OneByteString& function_name = 2213 OneByteString& function_name =
2210 OneByteString::Handle(isolate, OneByteString::null()); 2214 OneByteString::Handle(isolate, OneByteString::null());
2211 intptr_t len = funcs.Length(); 2215 intptr_t len = funcs.Length();
2212 for (intptr_t i = 0; i < len; i++) { 2216 for (intptr_t i = 0; i < len; i++) {
2213 function ^= funcs.At(i); 2217 function ^= funcs.At(i);
2214 function_name ^= function.name(); 2218 function_name ^= function.name();
2215 if (function_name.EqualsIgnoringPrivateKey(lookup_name)) { 2219 if (function_name.EqualsIgnoringPrivateKey(lookup_name)) {
2216 return function.raw(); 2220 return function.raw();
2217 } 2221 }
(...skipping 9983 matching lines...) Expand 10 before | Expand all | Expand 10 after
12201 } 12205 }
12202 return result.raw(); 12206 return result.raw();
12203 } 12207 }
12204 12208
12205 12209
12206 const char* WeakProperty::ToCString() const { 12210 const char* WeakProperty::ToCString() const {
12207 return "_WeakProperty"; 12211 return "_WeakProperty";
12208 } 12212 }
12209 12213
12210 } // namespace dart 12214 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698