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

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

Issue 392343002: Cleanup of class id loading sequences. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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/flow_graph_compiler_x64.cc ('k') | runtime/vm/stub_code_arm.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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 return LocationSummary::Make(isolate, 900 return LocationSummary::Make(isolate,
901 kNumInputs, 901 kNumInputs,
902 Location::RequiresRegister(), 902 Location::RequiresRegister(),
903 LocationSummary::kNoCall); 903 LocationSummary::kNoCall);
904 } 904 }
905 905
906 906
907 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 907 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
908 const Register object = locs()->in(0).reg(); 908 const Register object = locs()->in(0).reg();
909 const Register result = locs()->out(0).reg(); 909 const Register result = locs()->out(0).reg();
910 __ LoadTaggedClassIdMayBeSmi(result, object); 910 static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos;
911
912 __ LoadImmediate(TMP, reinterpret_cast<int64_t>(&kSmiCidSource) + 1, PP);
913 __ tsti(object, kSmiTagMask);
914 __ csel(TMP, TMP, object, EQ);
915 __ LoadClassId(result, TMP, PP);
916 __ SmiTag(result);
911 } 917 }
912 918
913 919
914 CompileType LoadIndexedInstr::ComputeType() const { 920 CompileType LoadIndexedInstr::ComputeType() const {
915 switch (class_id_) { 921 switch (class_id_) {
916 case kArrayCid: 922 case kArrayCid:
917 case kImmutableArrayCid: 923 case kImmutableArrayCid:
918 return CompileType::Dynamic(); 924 return CompileType::Dynamic();
919 925
920 case kTypedDataFloat32ArrayCid: 926 case kTypedDataFloat32ArrayCid:
(...skipping 4589 matching lines...) Expand 10 before | Expand all | Expand 10 after
5510 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 5516 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
5511 #if defined(DEBUG) 5517 #if defined(DEBUG)
5512 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); 5518 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP);
5513 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); 5519 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP);
5514 #endif 5520 #endif
5515 } 5521 }
5516 5522
5517 } // namespace dart 5523 } // namespace dart
5518 5524
5519 #endif // defined TARGET_ARCH_ARM64 5525 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698