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

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

Issue 798643003: Pass condition result explicitly. Do not imply the existence of a status (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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') | 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) 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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after
5455 locs->set_out(0, Location::RequiresRegister()); 5455 locs->set_out(0, Location::RequiresRegister());
5456 return locs; 5456 return locs;
5457 } 5457 }
5458 5458
5459 5459
5460 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, 5460 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
5461 BranchLabels labels) { 5461 BranchLabels labels) {
5462 Location left = locs()->in(0); 5462 Location left = locs()->in(0);
5463 Location right = locs()->in(1); 5463 Location right = locs()->in(1);
5464 ASSERT(!left.IsConstant() || !right.IsConstant()); 5464 ASSERT(!left.IsConstant() || !right.IsConstant());
5465 Condition true_condition;
5465 if (left.IsConstant()) { 5466 if (left.IsConstant()) {
5466 compiler->EmitEqualityRegConstCompare(right.reg(), 5467 true_condition = compiler->EmitEqualityRegConstCompare(right.reg(),
5467 left.constant(), 5468 left.constant(),
5468 needs_number_check(), 5469 needs_number_check(),
5469 token_pos()); 5470 token_pos());
5470 } else if (right.IsConstant()) { 5471 } else if (right.IsConstant()) {
5471 compiler->EmitEqualityRegConstCompare(left.reg(), 5472 true_condition = compiler->EmitEqualityRegConstCompare(left.reg(),
5472 right.constant(), 5473 right.constant(),
5473 needs_number_check(), 5474 needs_number_check(),
5474 token_pos()); 5475 token_pos());
5475 } else { 5476 } else {
5476 compiler->EmitEqualityRegRegCompare(left.reg(), 5477 true_condition = compiler->EmitEqualityRegRegCompare(left.reg(),
5477 right.reg(), 5478 right.reg(),
5478 needs_number_check(), 5479 needs_number_check(),
5479 token_pos()); 5480 token_pos());
5480 } 5481 }
5481 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQ : NE; 5482 if (kind() != Token::kEQ_STRICT) {
5483 ASSERT(kind() == Token::kNE_STRICT);
5484 true_condition = NegateCondition(true_condition);
5485 }
5482 return true_condition; 5486 return true_condition;
5483 } 5487 }
5484 5488
5485 5489
5486 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5490 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5487 __ TraceSimMsg("StrictCompareInstr"); 5491 __ TraceSimMsg("StrictCompareInstr");
5488 __ Comment("StrictCompareInstr"); 5492 __ Comment("StrictCompareInstr");
5489 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); 5493 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT);
5490 5494
5491 Label is_true, is_false; 5495 Label is_true, is_false;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
5565 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 5569 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
5566 #if defined(DEBUG) 5570 #if defined(DEBUG)
5567 __ LoadImmediate(S4, kInvalidObjectPointer); 5571 __ LoadImmediate(S4, kInvalidObjectPointer);
5568 __ LoadImmediate(S5, kInvalidObjectPointer); 5572 __ LoadImmediate(S5, kInvalidObjectPointer);
5569 #endif 5573 #endif
5570 } 5574 }
5571 5575
5572 } // namespace dart 5576 } // namespace dart
5573 5577
5574 #endif // defined TARGET_ARCH_MIPS 5578 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698