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

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

Issue 11090027: Address Florian's comments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/code_generator.cc ('k') | runtime/vm/object.h » ('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_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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 if (left.IsConstant() && right.IsConstant()) { 579 if (left.IsConstant() && right.IsConstant()) {
580 bool result = false; 580 bool result = false;
581 // One of them could be NULL (for equality only). 581 // One of them could be NULL (for equality only).
582 if (left.constant().IsNull() || right.constant().IsNull()) { 582 if (left.constant().IsNull() || right.constant().IsNull()) {
583 ASSERT((kind == Token::kEQ) || (kind == Token::kNE)); 583 ASSERT((kind == Token::kEQ) || (kind == Token::kNE));
584 result = left.constant().IsNull() && right.constant().IsNull(); 584 result = left.constant().IsNull() && right.constant().IsNull();
585 if (kind == Token::kNE) { 585 if (kind == Token::kNE) {
586 result = !result; 586 result = !result;
587 } 587 }
588 } else { 588 } else {
589 // TODO(vegorov): should be eliminated earlier by constant propagation. 589 // TODO(vegorov): should be eliminated earlier by constant propagation.
590 result = FlowGraphCompiler::EvaluateCondition( 590 result = FlowGraphCompiler::EvaluateCondition(
591 true_condition, 591 true_condition,
592 Smi::Cast(left.constant()).Value(), 592 Smi::Cast(left.constant()).Value(),
593 Smi::Cast(right.constant()).Value()); 593 Smi::Cast(right.constant()).Value());
594 } 594 }
595 595
596 if (branch != NULL) { 596 if (branch != NULL) {
597 branch->EmitBranchOnValue(compiler, result); 597 branch->EmitBranchOnValue(compiler, result);
598 } else { 598 } else {
599 __ LoadObject(locs.out().reg(), result ? compiler->bool_true() 599 __ LoadObject(locs.out().reg(), result ? compiler->bool_true()
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 2206
2207 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2207 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2208 UNIMPLEMENTED(); 2208 UNIMPLEMENTED();
2209 } 2209 }
2210 2210
2211 } // namespace dart 2211 } // namespace dart
2212 2212
2213 #undef __ 2213 #undef __
2214 2214
2215 #endif // defined TARGET_ARCH_X64 2215 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698