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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_ia32.cc ('k') | no next file » | 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 LocationSummary* LoadVMFieldComp::MakeLocationSummary() const { 1117 LocationSummary* LoadVMFieldComp::MakeLocationSummary() const {
1118 return LocationSummary::Make(1, 1118 return LocationSummary::Make(1,
1119 Location::RequiresRegister(), 1119 Location::RequiresRegister(),
1120 LocationSummary::kNoCall); 1120 LocationSummary::kNoCall);
1121 } 1121 }
1122 1122
1123 1123
1124 void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { 1124 void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
1125 Register instance_reg = locs()->in(0).reg(); 1125 Register instance_reg = locs()->in(0).reg();
1126 Register result_reg = locs()->out().reg(); 1126 Register result_reg = locs()->out().reg();
1127 if (HasICData()) {
1128 ASSERT(original() != NULL);
1129 Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
1130 kDeoptInstanceGetterSameTarget);
1131 // Smis do not have instance fields (Smi class is always first).
1132 // Use 'result' as temporary register.
1133 ASSERT(result_reg != instance_reg);
1134 ASSERT(ic_data() != NULL);
1135 compiler->EmitClassChecksNoSmi(*ic_data(), instance_reg, result_reg, deopt);
1136 }
1137 1127
1138 __ movq(result_reg, FieldAddress(instance_reg, offset_in_bytes())); 1128 __ movq(result_reg, FieldAddress(instance_reg, offset_in_bytes()));
1139 } 1129 }
1140 1130
1141 1131
1142 LocationSummary* InstantiateTypeArgumentsComp::MakeLocationSummary() const { 1132 LocationSummary* InstantiateTypeArgumentsComp::MakeLocationSummary() const {
1143 const intptr_t kNumInputs = 1; 1133 const intptr_t kNumInputs = 1;
1144 const intptr_t kNumTemps = 0; 1134 const intptr_t kNumTemps = 0;
1145 LocationSummary* locs = 1135 LocationSummary* locs =
1146 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 1136 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 } 2223 }
2234 __ j(ABOVE_EQUAL, deopt); 2224 __ j(ABOVE_EQUAL, deopt);
2235 } 2225 }
2236 2226
2237 2227
2238 } // namespace dart 2228 } // namespace dart
2239 2229
2240 #undef __ 2230 #undef __
2241 2231
2242 #endif // defined TARGET_ARCH_X64 2232 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698