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

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
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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 return LocationSummary::Make(isolate, 1048 return LocationSummary::Make(isolate,
1049 kNumInputs, 1049 kNumInputs,
1050 Location::RequiresRegister(), 1050 Location::RequiresRegister(),
1051 LocationSummary::kNoCall); 1051 LocationSummary::kNoCall);
1052 } 1052 }
1053 1053
1054 1054
1055 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1055 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1056 const Register object = locs()->in(0).reg(); 1056 const Register object = locs()->in(0).reg();
1057 const Register result = locs()->out(0).reg(); 1057 const Register result = locs()->out(0).reg();
1058 Label load, done; 1058 __ LoadTaggedClassIdMayBeSmi(result, object);
1059 __ tst(object, Operand(kSmiTagMask));
1060 __ b(&load, NE);
1061 __ LoadImmediate(result, Smi::RawValue(kSmiCid));
1062 __ b(&done);
1063 __ Bind(&load);
1064 __ LoadClassId(result, object);
1065 __ SmiTag(result);
1066 __ Bind(&done);
1067 } 1059 }
1068 1060
1069 1061
1070 CompileType LoadIndexedInstr::ComputeType() const { 1062 CompileType LoadIndexedInstr::ComputeType() const {
1071 switch (class_id_) { 1063 switch (class_id_) {
1072 case kArrayCid: 1064 case kArrayCid:
1073 case kImmutableArrayCid: 1065 case kImmutableArrayCid:
1074 return CompileType::Dynamic(); 1066 return CompileType::Dynamic();
1075 1067
1076 case kTypedDataFloat32ArrayCid: 1068 case kTypedDataFloat32ArrayCid:
(...skipping 5280 matching lines...) Expand 10 before | Expand all | Expand 10 after
6357 compiler->GenerateCall(token_pos(), 6349 compiler->GenerateCall(token_pos(),
6358 &label, 6350 &label,
6359 PcDescriptors::kOther, 6351 PcDescriptors::kOther,
6360 locs()); 6352 locs());
6361 __ Drop(ArgumentCount()); // Discard arguments. 6353 __ Drop(ArgumentCount()); // Discard arguments.
6362 } 6354 }
6363 6355
6364 } // namespace dart 6356 } // namespace dart
6365 6357
6366 #endif // defined TARGET_ARCH_ARM 6358 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698