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

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

Issue 313083008: Add LoadTaggedClassIdMayBeSmi to assembly and improve performance of inline cache stubs. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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/globals.h" // Needed here to get TARGET_ARCH_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 return LocationSummary::Make(isolate, 894 return LocationSummary::Make(isolate,
895 kNumInputs, 895 kNumInputs,
896 Location::RequiresRegister(), 896 Location::RequiresRegister(),
897 LocationSummary::kNoCall); 897 LocationSummary::kNoCall);
898 } 898 }
899 899
900 900
901 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 901 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
902 const Register object = locs()->in(0).reg(); 902 const Register object = locs()->in(0).reg();
903 const Register result = locs()->out(0).reg(); 903 const Register result = locs()->out(0).reg();
904 Label load, done; 904 __ LoadTaggedClassIdMayBeSmi(result, object);
905 __ tsti(object, kSmiTagMask);
906 __ b(&load, NE);
907 __ LoadImmediate(result, Smi::RawValue(kSmiCid), PP);
908 __ b(&done);
909 __ Bind(&load);
910 __ LoadClassId(result, object, PP);
911 __ SmiTag(result);
912 __ Bind(&done);
913 } 905 }
914 906
915 907
916 CompileType LoadIndexedInstr::ComputeType() const { 908 CompileType LoadIndexedInstr::ComputeType() const {
917 switch (class_id_) { 909 switch (class_id_) {
918 case kArrayCid: 910 case kArrayCid:
919 case kImmutableArrayCid: 911 case kImmutableArrayCid:
920 return CompileType::Dynamic(); 912 return CompileType::Dynamic();
921 913
922 case kTypedDataFloat32ArrayCid: 914 case kTypedDataFloat32ArrayCid:
(...skipping 4407 matching lines...) Expand 10 before | Expand all | Expand 10 after
5330 compiler->GenerateCall(token_pos(), 5322 compiler->GenerateCall(token_pos(),
5331 &label, 5323 &label,
5332 PcDescriptors::kOther, 5324 PcDescriptors::kOther,
5333 locs()); 5325 locs());
5334 __ Drop(ArgumentCount()); // Discard arguments. 5326 __ Drop(ArgumentCount()); // Discard arguments.
5335 } 5327 }
5336 5328
5337 } // namespace dart 5329 } // namespace dart
5338 5330
5339 #endif // defined TARGET_ARCH_ARM64 5331 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698