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

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

Issue 10917005: Add explicit class checks: LoadVMField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: removed now unused helper Created 8 years, 3 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.h ('k') | runtime/vm/intermediate_language_x64.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 LocationSummary* LoadVMFieldComp::MakeLocationSummary() const { 1097 LocationSummary* LoadVMFieldComp::MakeLocationSummary() const {
1098 return LocationSummary::Make(1, 1098 return LocationSummary::Make(1,
1099 Location::RequiresRegister(), 1099 Location::RequiresRegister(),
1100 LocationSummary::kNoCall); 1100 LocationSummary::kNoCall);
1101 } 1101 }
1102 1102
1103 1103
1104 void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { 1104 void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
1105 Register instance_reg = locs()->in(0).reg(); 1105 Register instance_reg = locs()->in(0).reg();
1106 Register result_reg = locs()->out().reg(); 1106 Register result_reg = locs()->out().reg();
1107 if (HasICData()) {
1108 ASSERT(original() != NULL);
1109 Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
1110 kDeoptInstanceGetterSameTarget);
1111 // Smis do not have instance fields (Smi class is always first).
1112 // Use 'result' as temporary register.
1113 ASSERT(result_reg != instance_reg);
1114 ASSERT(ic_data() != NULL);
1115 compiler->EmitClassChecksNoSmi(*ic_data(), instance_reg, result_reg, deopt);
1116 }
1117 1107
1118 __ movl(result_reg, FieldAddress(instance_reg, offset_in_bytes())); 1108 __ movl(result_reg, FieldAddress(instance_reg, offset_in_bytes()));
1119 } 1109 }
1120 1110
1121 1111
1122 LocationSummary* InstantiateTypeArgumentsComp::MakeLocationSummary() const { 1112 LocationSummary* InstantiateTypeArgumentsComp::MakeLocationSummary() const {
1123 const intptr_t kNumInputs = 1; 1113 const intptr_t kNumInputs = 1;
1124 const intptr_t kNumTemps = 1; 1114 const intptr_t kNumTemps = 1;
1125 LocationSummary* locs = 1115 LocationSummary* locs =
1126 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 1116 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 } 2211 }
2222 __ j(ABOVE_EQUAL, deopt); 2212 __ j(ABOVE_EQUAL, deopt);
2223 } 2213 }
2224 2214
2225 2215
2226 } // namespace dart 2216 } // namespace dart
2227 2217
2228 #undef __ 2218 #undef __
2229 2219
2230 #endif // defined TARGET_ARCH_X64 2220 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698