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

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

Issue 8413047: Special code for equality comparison for Smi, allowing null on left or right without calling deop... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/opt_code_generator_ia32.h » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/code_index_table.h" 7 #include "vm/code_index_table.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 DartFrame* caller_frame = iterator.NextFrame(); 472 DartFrame* caller_frame = iterator.NextFrame();
473 ICData ic_data(Array::Handle( 473 ICData ic_data(Array::Handle(
474 CodePatcher::GetInstanceCallIcDataAt(caller_frame->pc()))); 474 CodePatcher::GetInstanceCallIcDataAt(caller_frame->pc())));
475 GrowableArray<const Class*> classes; 475 GrowableArray<const Class*> classes;
476 classes.Add(&Class::ZoneHandle(receiver.clazz())); 476 classes.Add(&Class::ZoneHandle(receiver.clazz()));
477 ic_data.AddCheck(classes, target_function); 477 ic_data.AddCheck(classes, target_function);
478 CodePatcher::SetInstanceCallIcDataAt(caller_frame->pc(), 478 CodePatcher::SetInstanceCallIcDataAt(caller_frame->pc(),
479 Array::ZoneHandle(ic_data.data())); 479 Array::ZoneHandle(ic_data.data()));
480 arguments.SetReturn(target_function); 480 arguments.SetReturn(target_function);
481 if (FLAG_trace_ic) { 481 if (FLAG_trace_ic) {
482 OS::Print("InlineCacheMissHandler 0x%x adding receiver '%s' -> '%s'\n", 482 OS::Print("InlineCacheMissHandler call at 0x%x' adding <%s> -> <%s>\n",
483 caller_frame->pc(), receiver.ToCString(), target_function.ToCString()); 483 caller_frame->pc(),
484 Class::Handle(receiver.clazz()).ToCString(),
485 target_function.ToCString());
484 } 486 }
485 } 487 }
486 488
487 489
488 static RawFunction* LookupDynamicFunction(const Class& in_cls, 490 static RawFunction* LookupDynamicFunction(const Class& in_cls,
489 const String& name) { 491 const String& name) {
490 Class& cls = Class::Handle(); 492 Class& cls = Class::Handle();
491 // For lookups treat null as an instance of class Object. 493 // For lookups treat null as an instance of class Object.
492 if (in_cls.IsNullClass()) { 494 if (in_cls.IsNullClass()) {
493 cls = Isolate::Current()->object_store()->object_class(); 495 cls = Isolate::Current()->object_store()->object_class();
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 } 964 }
963 } 965 }
964 } 966 }
965 // The cache is null terminated, therefore the loop above should never 967 // The cache is null terminated, therefore the loop above should never
966 // terminate by itself. 968 // terminate by itself.
967 UNREACHABLE(); 969 UNREACHABLE();
968 return Code::null(); 970 return Code::null();
969 } 971 }
970 972
971 } // namespace dart 973 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/opt_code_generator_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698