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

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

Issue 383443002: Removes branches from LoadTaggedClassIdMayBeSmi. (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_ia32.cc ('k') | runtime/vm/stub_code_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) 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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 928 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
929 Register object = locs()->in(0).reg(); 929 Register object = locs()->in(0).reg();
930 Register result = locs()->out(0).reg(); 930 Register result = locs()->out(0).reg();
931 __ movl(result, FieldAddress(object, offset())); 931 __ movl(result, FieldAddress(object, offset()));
932 } 932 }
933 933
934 934
935 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Isolate* isolate, 935 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Isolate* isolate,
936 bool opt) const { 936 bool opt) const {
937 const intptr_t kNumInputs = 1; 937 const intptr_t kNumInputs = 1;
938 return LocationSummary::Make(isolate, 938 const intptr_t kNumTemps = 1;
939 kNumInputs, 939 LocationSummary* summary = new(isolate) LocationSummary(
940 Location::RequiresRegister(), 940 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
941 LocationSummary::kNoCall); 941 summary->set_in(0, Location::RequiresRegister());
942 summary->set_out(0, Location::RequiresRegister());
943 summary->set_temp(0, Location::RequiresRegister());
944 return summary;
942 } 945 }
943 946
944 947
945 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 948 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
946 Register object = locs()->in(0).reg(); 949 Register object = locs()->in(0).reg();
947 Register result = locs()->out(0).reg(); 950 Register result = locs()->out(0).reg();
948 __ LoadTaggedClassIdMayBeSmi(result, object); 951 Register tmp = locs()->temp(0).reg();
952 __ LoadTaggedClassIdMayBeSmi(result, object, tmp);
949 } 953 }
950 954
951 955
952 CompileType LoadIndexedInstr::ComputeType() const { 956 CompileType LoadIndexedInstr::ComputeType() const {
953 switch (class_id_) { 957 switch (class_id_) {
954 case kArrayCid: 958 case kArrayCid:
955 case kImmutableArrayCid: 959 case kImmutableArrayCid:
956 return CompileType::Dynamic(); 960 return CompileType::Dynamic();
957 961
958 case kTypedDataFloat32ArrayCid: 962 case kTypedDataFloat32ArrayCid:
(...skipping 5400 matching lines...) Expand 10 before | Expand all | Expand 10 after
6359 __ movl(EDX, Immediate(kInvalidObjectPointer)); 6363 __ movl(EDX, Immediate(kInvalidObjectPointer));
6360 __ movl(EDX, Immediate(kInvalidObjectPointer)); 6364 __ movl(EDX, Immediate(kInvalidObjectPointer));
6361 #endif 6365 #endif
6362 } 6366 }
6363 6367
6364 } // namespace dart 6368 } // namespace dart
6365 6369
6366 #undef __ 6370 #undef __
6367 6371
6368 #endif // defined TARGET_ARCH_IA32 6372 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698