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

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

Issue 540303002: Fix xcode build for real. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « no previous file | 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) 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_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 } 1344 }
1345 1345
1346 1346
1347 ParallelMoveResolver::ScratchFpuRegisterScope::~ScratchFpuRegisterScope() { 1347 ParallelMoveResolver::ScratchFpuRegisterScope::~ScratchFpuRegisterScope() {
1348 if (spilled_) { 1348 if (spilled_) {
1349 resolver_->RestoreFpuScratch(reg_); 1349 resolver_->RestoreFpuScratch(reg_);
1350 } 1350 }
1351 } 1351 }
1352 1352
1353 1353
1354 static inline intptr_t MaskBit(Register reg) {
1355 return reg != kNoRegister ? 1 << reg : 0;
Vyacheslav Egorov (Google) 2014/09/05 11:29:45 (1 << reg) (reg != kNoRegister)
1356 }
1357
1358
1354 ParallelMoveResolver::ScratchRegisterScope::ScratchRegisterScope( 1359 ParallelMoveResolver::ScratchRegisterScope::ScratchRegisterScope(
1355 ParallelMoveResolver* resolver, Register blocked) 1360 ParallelMoveResolver* resolver, Register blocked)
1356 : resolver_(resolver), 1361 : resolver_(resolver),
1357 reg_(kNoRegister), 1362 reg_(kNoRegister),
1358 spilled_(false) { 1363 spilled_(false) {
1359 uword blocked_mask = ((blocked > kNoRegister) ? 1 << blocked : 0) 1364 uword blocked_mask = MaskBit(blocked)
1360 | 1 << CTX 1365 | MaskBit(CTX)
1361 | 1 << SPREG 1366 | MaskBit(SPREG)
1362 | 1 << FPREG 1367 | MaskBit(FPREG)
1363 | ((TMP > kNoRegister) ? 1 << TMP : 0) 1368 | MaskBit(TMP)
1364 | ((TMP2 > kNoRegister) ? 1 << TMP2 : 0) 1369 | MaskBit(TMP2)
1365 | ((PP > kNoRegister) ? 1 << PP : 0); 1370 | MaskBit(PP);
1366 reg_ = static_cast<Register>( 1371 reg_ = static_cast<Register>(
1367 resolver_->AllocateScratchRegister(Location::kRegister, 1372 resolver_->AllocateScratchRegister(Location::kRegister,
1368 blocked_mask, 1373 blocked_mask,
1369 kFirstFreeCpuRegister, 1374 kFirstFreeCpuRegister,
1370 kLastFreeCpuRegister, 1375 kLastFreeCpuRegister,
1371 &spilled_)); 1376 &spilled_));
1372 1377
1373 if (spilled_) { 1378 if (spilled_) {
1374 resolver->SpillScratch(reg_); 1379 resolver->SpillScratch(reg_);
1375 } 1380 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 threshold = FLAG_optimization_counter_scale * basic_blocks + 1464 threshold = FLAG_optimization_counter_scale * basic_blocks +
1460 FLAG_min_optimization_counter_threshold; 1465 FLAG_min_optimization_counter_threshold;
1461 if (threshold > FLAG_optimization_counter_threshold) { 1466 if (threshold > FLAG_optimization_counter_threshold) {
1462 threshold = FLAG_optimization_counter_threshold; 1467 threshold = FLAG_optimization_counter_threshold;
1463 } 1468 }
1464 } 1469 }
1465 return threshold; 1470 return threshold;
1466 } 1471 }
1467 1472
1468 } // namespace dart 1473 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698