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

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

Issue 1533383003: Remove instantiator argument in generated code for type tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix typo Created 4 years, 12 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
« no previous file with comments | « runtime/vm/intermediate_language.h ('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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 default: 338 default:
339 UNREACHABLE(); 339 UNREACHABLE();
340 break; 340 break;
341 } 341 }
342 } 342 }
343 } 343 }
344 344
345 345
346 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, 346 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone,
347 bool opt) const { 347 bool opt) const {
348 const intptr_t kNumInputs = 3; 348 const intptr_t kNumInputs = 2;
349 const intptr_t kNumTemps = 0; 349 const intptr_t kNumTemps = 0;
350 LocationSummary* summary = new(zone) LocationSummary( 350 LocationSummary* summary = new(zone) LocationSummary(
351 zone, kNumInputs, kNumTemps, LocationSummary::kCall); 351 zone, kNumInputs, kNumTemps, LocationSummary::kCall);
352 summary->set_in(0, Location::RegisterLocation(R0)); // Value. 352 summary->set_in(0, Location::RegisterLocation(R0)); // Value.
353 summary->set_in(1, Location::RegisterLocation(R2)); // Instantiator. 353 summary->set_in(1, Location::RegisterLocation(R1)); // Type arguments.
354 summary->set_in(2, Location::RegisterLocation(R1)); // Type arguments.
355 summary->set_out(0, Location::RegisterLocation(R0)); 354 summary->set_out(0, Location::RegisterLocation(R0));
356 return summary; 355 return summary;
357 } 356 }
358 357
359 358
360 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, 359 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone,
361 bool opt) const { 360 bool opt) const {
362 const intptr_t kNumInputs = 1; 361 const intptr_t kNumInputs = 1;
363 const intptr_t kNumTemps = 0; 362 const intptr_t kNumTemps = 0;
364 LocationSummary* locs = new(zone) LocationSummary( 363 LocationSummary* locs = new(zone) LocationSummary(
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 CanValueBeSmi()); 2267 CanValueBeSmi());
2269 } else { 2268 } else {
2270 __ StoreIntoObjectNoBarrier( 2269 __ StoreIntoObjectNoBarrier(
2271 temp, FieldAddress(temp, Field::static_value_offset()), value); 2270 temp, FieldAddress(temp, Field::static_value_offset()), value);
2272 } 2271 }
2273 } 2272 }
2274 2273
2275 2274
2276 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, 2275 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone,
2277 bool opt) const { 2276 bool opt) const {
2278 const intptr_t kNumInputs = 3; 2277 const intptr_t kNumInputs = 2;
2279 const intptr_t kNumTemps = 0; 2278 const intptr_t kNumTemps = 0;
2280 LocationSummary* summary = new(zone) LocationSummary( 2279 LocationSummary* summary = new(zone) LocationSummary(
2281 zone, kNumInputs, kNumTemps, LocationSummary::kCall); 2280 zone, kNumInputs, kNumTemps, LocationSummary::kCall);
2282 summary->set_in(0, Location::RegisterLocation(R0)); 2281 summary->set_in(0, Location::RegisterLocation(R0));
2283 summary->set_in(1, Location::RegisterLocation(R2)); 2282 summary->set_in(1, Location::RegisterLocation(R1));
2284 summary->set_in(2, Location::RegisterLocation(R1));
2285 summary->set_out(0, Location::RegisterLocation(R0)); 2283 summary->set_out(0, Location::RegisterLocation(R0));
2286 return summary; 2284 return summary;
2287 } 2285 }
2288 2286
2289 2287
2290 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2288 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2291 ASSERT(locs()->in(0).reg() == R0); // Value. 2289 ASSERT(locs()->in(0).reg() == R0); // Value.
2292 ASSERT(locs()->in(1).reg() == R2); // Instantiator. 2290 ASSERT(locs()->in(1).reg() == R1); // Instantiator type arguments.
2293 ASSERT(locs()->in(2).reg() == R1); // Instantiator type arguments.
2294 2291
2295 compiler->GenerateInstanceOf(token_pos(), 2292 compiler->GenerateInstanceOf(token_pos(),
2296 deopt_id(), 2293 deopt_id(),
2297 type(), 2294 type(),
2298 negate_result(), 2295 negate_result(),
2299 locs()); 2296 locs());
2300 ASSERT(locs()->out(0).reg() == R0); 2297 ASSERT(locs()->out(0).reg() == R0);
2301 } 2298 }
2302 2299
2303 2300
(...skipping 4559 matching lines...) Expand 10 before | Expand all | Expand 10 after
6863 1, 6860 1,
6864 locs()); 6861 locs());
6865 __ Drop(1); 6862 __ Drop(1);
6866 __ Pop(result); 6863 __ Pop(result);
6867 } 6864 }
6868 6865
6869 6866
6870 } // namespace dart 6867 } // namespace dart
6871 6868
6872 #endif // defined TARGET_ARCH_ARM 6869 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698