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

Side by Side Diff: runtime/vm/intermediate_language_arm.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/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm64.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/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 return LocationSummary::Make(isolate, 1046 return LocationSummary::Make(isolate,
1047 kNumInputs, 1047 kNumInputs,
1048 Location::RequiresRegister(), 1048 Location::RequiresRegister(),
1049 LocationSummary::kNoCall); 1049 LocationSummary::kNoCall);
1050 } 1050 }
1051 1051
1052 1052
1053 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1053 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1054 const Register object = locs()->in(0).reg(); 1054 const Register object = locs()->in(0).reg();
1055 const Register result = locs()->out(0).reg(); 1055 const Register result = locs()->out(0).reg();
1056 __ tst(object, Operand(kSmiTagMask)); 1056 __ LoadTaggedClassIdMayBeSmi(result, object);
1057 __ LoadImmediate(result, Smi::RawValue(kSmiCid), EQ);
1058 __ LoadClassId(result, object, NE);
1059 __ SmiTag(result, NE);
1060 } 1057 }
1061 1058
1062 1059
1063 CompileType LoadIndexedInstr::ComputeType() const { 1060 CompileType LoadIndexedInstr::ComputeType() const {
1064 switch (class_id_) { 1061 switch (class_id_) {
1065 case kArrayCid: 1062 case kArrayCid:
1066 case kImmutableArrayCid: 1063 case kImmutableArrayCid:
1067 return CompileType::Dynamic(); 1064 return CompileType::Dynamic();
1068 1065
1069 case kTypedDataFloat32ArrayCid: 1066 case kTypedDataFloat32ArrayCid:
(...skipping 5280 matching lines...) Expand 10 before | Expand all | Expand 10 after
6350 compiler->GenerateCall(token_pos(), 6347 compiler->GenerateCall(token_pos(),
6351 &label, 6348 &label,
6352 PcDescriptors::kOther, 6349 PcDescriptors::kOther,
6353 locs()); 6350 locs());
6354 __ Drop(ArgumentCount()); // Discard arguments. 6351 __ Drop(ArgumentCount()); // Discard arguments.
6355 } 6352 }
6356 6353
6357 } // namespace dart 6354 } // namespace dart
6358 6355
6359 #endif // defined TARGET_ARCH_ARM 6356 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698