| OLD | NEW |
| 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_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 "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 6227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6238 locs->set_out(0, Location::RequiresRegister()); | 6238 locs->set_out(0, Location::RequiresRegister()); |
| 6239 return locs; | 6239 return locs; |
| 6240 } | 6240 } |
| 6241 | 6241 |
| 6242 | 6242 |
| 6243 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 6243 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
| 6244 BranchLabels labels) { | 6244 BranchLabels labels) { |
| 6245 Location left = locs()->in(0); | 6245 Location left = locs()->in(0); |
| 6246 Location right = locs()->in(1); | 6246 Location right = locs()->in(1); |
| 6247 ASSERT(!left.IsConstant() || !right.IsConstant()); | 6247 ASSERT(!left.IsConstant() || !right.IsConstant()); |
| 6248 Condition true_condition; |
| 6248 if (left.IsConstant()) { | 6249 if (left.IsConstant()) { |
| 6249 compiler->EmitEqualityRegConstCompare(right.reg(), | 6250 true_condition = compiler->EmitEqualityRegConstCompare(right.reg(), |
| 6250 left.constant(), | 6251 left.constant(), |
| 6251 needs_number_check(), | 6252 needs_number_check(), |
| 6252 token_pos()); | 6253 token_pos()); |
| 6253 } else if (right.IsConstant()) { | 6254 } else if (right.IsConstant()) { |
| 6254 compiler->EmitEqualityRegConstCompare(left.reg(), | 6255 true_condition = compiler->EmitEqualityRegConstCompare(left.reg(), |
| 6255 right.constant(), | 6256 right.constant(), |
| 6256 needs_number_check(), | 6257 needs_number_check(), |
| 6257 token_pos()); | 6258 token_pos()); |
| 6258 } else { | 6259 } else { |
| 6259 compiler->EmitEqualityRegRegCompare(left.reg(), | 6260 true_condition = compiler->EmitEqualityRegRegCompare(left.reg(), |
| 6260 right.reg(), | 6261 right.reg(), |
| 6261 needs_number_check(), | 6262 needs_number_check(), |
| 6262 token_pos()); | 6263 token_pos()); |
| 6263 } | 6264 } |
| 6264 | 6265 if (kind() != Token::kEQ_STRICT) { |
| 6265 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQUAL : NOT_EQUAL; | 6266 ASSERT(kind() == Token::kNE_STRICT); |
| 6267 true_condition = NegateCondition(true_condition); |
| 6268 } |
| 6266 return true_condition; | 6269 return true_condition; |
| 6267 } | 6270 } |
| 6268 | 6271 |
| 6269 | 6272 |
| 6270 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6273 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 6271 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); | 6274 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| 6272 | 6275 |
| 6273 Label is_true, is_false; | 6276 Label is_true, is_false; |
| 6274 BranchLabels labels = { &is_true, &is_false, &is_false }; | 6277 BranchLabels labels = { &is_true, &is_false, &is_false }; |
| 6275 | 6278 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6399 __ movq(R10, Immediate(kInvalidObjectPointer)); | 6402 __ movq(R10, Immediate(kInvalidObjectPointer)); |
| 6400 __ movq(RBX, Immediate(kInvalidObjectPointer)); | 6403 __ movq(RBX, Immediate(kInvalidObjectPointer)); |
| 6401 #endif | 6404 #endif |
| 6402 } | 6405 } |
| 6403 | 6406 |
| 6404 } // namespace dart | 6407 } // namespace dart |
| 6405 | 6408 |
| 6406 #undef __ | 6409 #undef __ |
| 6407 | 6410 |
| 6408 #endif // defined TARGET_ARCH_X64 | 6411 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |