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/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 6602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6613 | 6613 |
6614 | 6614 |
6615 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 6615 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
6616 BranchLabels labels) { | 6616 BranchLabels labels) { |
6617 Location left = locs()->in(0); | 6617 Location left = locs()->in(0); |
6618 Location right = locs()->in(1); | 6618 Location right = locs()->in(1); |
6619 ASSERT(!left.IsConstant() || !right.IsConstant()); | 6619 ASSERT(!left.IsConstant() || !right.IsConstant()); |
6620 Condition true_condition; | 6620 Condition true_condition; |
6621 if (left.IsConstant()) { | 6621 if (left.IsConstant()) { |
6622 true_condition = compiler->EmitEqualityRegConstCompare( | 6622 true_condition = compiler->EmitEqualityRegConstCompare( |
6623 right.reg(), left.constant(), needs_number_check(), token_pos()); | 6623 right.reg(), left.constant(), needs_number_check(), token_pos(), |
| 6624 deopt_id_); |
6624 } else if (right.IsConstant()) { | 6625 } else if (right.IsConstant()) { |
6625 true_condition = compiler->EmitEqualityRegConstCompare( | 6626 true_condition = compiler->EmitEqualityRegConstCompare( |
6626 left.reg(), right.constant(), needs_number_check(), token_pos()); | 6627 left.reg(), right.constant(), needs_number_check(), token_pos(), |
| 6628 deopt_id_); |
6627 } else { | 6629 } else { |
6628 true_condition = compiler->EmitEqualityRegRegCompare( | 6630 true_condition = compiler->EmitEqualityRegRegCompare( |
6629 left.reg(), right.reg(), needs_number_check(), token_pos()); | 6631 left.reg(), right.reg(), needs_number_check(), token_pos(), deopt_id_); |
6630 } | 6632 } |
6631 if (kind() != Token::kEQ_STRICT) { | 6633 if (kind() != Token::kEQ_STRICT) { |
6632 ASSERT(kind() == Token::kNE_STRICT); | 6634 ASSERT(kind() == Token::kNE_STRICT); |
6633 true_condition = NegateCondition(true_condition); | 6635 true_condition = NegateCondition(true_condition); |
6634 } | 6636 } |
6635 return true_condition; | 6637 return true_condition; |
6636 } | 6638 } |
6637 | 6639 |
6638 | 6640 |
6639 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6641 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6745 compiler->GenerateCall(token_pos(), stub_entry, RawPcDescriptors::kOther, | 6747 compiler->GenerateCall(token_pos(), stub_entry, RawPcDescriptors::kOther, |
6746 locs()); | 6748 locs()); |
6747 compiler->AddStubCallTarget(stub); | 6749 compiler->AddStubCallTarget(stub); |
6748 __ Drop(ArgumentCount()); // Discard arguments. | 6750 __ Drop(ArgumentCount()); // Discard arguments. |
6749 } | 6751 } |
6750 | 6752 |
6751 | 6753 |
6752 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6754 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6753 ASSERT(!compiler->is_optimizing()); | 6755 ASSERT(!compiler->is_optimizing()); |
6754 __ CallPatchable(*StubCode::DebugStepCheck_entry()); | 6756 __ CallPatchable(*StubCode::DebugStepCheck_entry()); |
6755 compiler->AddCurrentDescriptor(stub_kind_, Thread::kNoDeoptId, token_pos()); | 6757 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); |
6756 compiler->RecordSafepoint(locs()); | 6758 compiler->RecordSafepoint(locs()); |
6757 } | 6759 } |
6758 | 6760 |
6759 | 6761 |
6760 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary(Zone* zone, | 6762 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary(Zone* zone, |
6761 bool opt) const { | 6763 bool opt) const { |
6762 const intptr_t kNumInputs = 1; | 6764 const intptr_t kNumInputs = 1; |
6763 const intptr_t kNumTemps = 0; | 6765 const intptr_t kNumTemps = 0; |
6764 LocationSummary* locs = new (zone) | 6766 LocationSummary* locs = new (zone) |
6765 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 6767 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 13 matching lines...) Expand all Loading... |
6779 __ Drop(1); | 6781 __ Drop(1); |
6780 __ popq(result); | 6782 __ popq(result); |
6781 } | 6783 } |
6782 | 6784 |
6783 | 6785 |
6784 } // namespace dart | 6786 } // namespace dart |
6785 | 6787 |
6786 #undef __ | 6788 #undef __ |
6787 | 6789 |
6788 #endif // defined TARGET_ARCH_X64 | 6790 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |