OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 5953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5964 | 5964 |
5965 | 5965 |
5966 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 5966 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
5967 BranchLabels labels) { | 5967 BranchLabels labels) { |
5968 Location left = locs()->in(0); | 5968 Location left = locs()->in(0); |
5969 Location right = locs()->in(1); | 5969 Location right = locs()->in(1); |
5970 ASSERT(!left.IsConstant() || !right.IsConstant()); | 5970 ASSERT(!left.IsConstant() || !right.IsConstant()); |
5971 Condition true_condition; | 5971 Condition true_condition; |
5972 if (left.IsConstant()) { | 5972 if (left.IsConstant()) { |
5973 true_condition = compiler->EmitEqualityRegConstCompare( | 5973 true_condition = compiler->EmitEqualityRegConstCompare( |
5974 right.reg(), left.constant(), needs_number_check(), token_pos()); | 5974 right.reg(), left.constant(), needs_number_check(), token_pos(), |
| 5975 deopt_id_); |
5975 } else if (right.IsConstant()) { | 5976 } else if (right.IsConstant()) { |
5976 true_condition = compiler->EmitEqualityRegConstCompare( | 5977 true_condition = compiler->EmitEqualityRegConstCompare( |
5977 left.reg(), right.constant(), needs_number_check(), token_pos()); | 5978 left.reg(), right.constant(), needs_number_check(), token_pos(), |
| 5979 deopt_id_); |
5978 } else { | 5980 } else { |
5979 true_condition = compiler->EmitEqualityRegRegCompare( | 5981 true_condition = compiler->EmitEqualityRegRegCompare( |
5980 left.reg(), right.reg(), needs_number_check(), token_pos()); | 5982 left.reg(), right.reg(), needs_number_check(), token_pos(), deopt_id_); |
5981 } | 5983 } |
5982 if (kind() != Token::kEQ_STRICT) { | 5984 if (kind() != Token::kEQ_STRICT) { |
5983 ASSERT(kind() == Token::kNE_STRICT); | 5985 ASSERT(kind() == Token::kNE_STRICT); |
5984 true_condition = NegateCondition(true_condition); | 5986 true_condition = NegateCondition(true_condition); |
5985 } | 5987 } |
5986 return true_condition; | 5988 return true_condition; |
5987 } | 5989 } |
5988 | 5990 |
5989 | 5991 |
5990 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5992 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6048 compiler->GenerateCall(token_pos(), stub_entry, RawPcDescriptors::kOther, | 6050 compiler->GenerateCall(token_pos(), stub_entry, RawPcDescriptors::kOther, |
6049 locs()); | 6051 locs()); |
6050 compiler->AddStubCallTarget(stub); | 6052 compiler->AddStubCallTarget(stub); |
6051 __ Drop(ArgumentCount()); // Discard arguments. | 6053 __ Drop(ArgumentCount()); // Discard arguments. |
6052 } | 6054 } |
6053 | 6055 |
6054 | 6056 |
6055 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6057 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6056 ASSERT(!compiler->is_optimizing()); | 6058 ASSERT(!compiler->is_optimizing()); |
6057 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); | 6059 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); |
6058 compiler->AddCurrentDescriptor(stub_kind_, Thread::kNoDeoptId, token_pos()); | 6060 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); |
6059 compiler->RecordSafepoint(locs()); | 6061 compiler->RecordSafepoint(locs()); |
6060 } | 6062 } |
6061 | 6063 |
6062 | 6064 |
6063 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary(Zone* zone, | 6065 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary(Zone* zone, |
6064 bool opt) const { | 6066 bool opt) const { |
6065 const intptr_t kNumInputs = 1; | 6067 const intptr_t kNumInputs = 1; |
6066 const intptr_t kNumTemps = 0; | 6068 const intptr_t kNumTemps = 0; |
6067 LocationSummary* locs = new (zone) | 6069 LocationSummary* locs = new (zone) |
6068 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 6070 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 11 matching lines...) Expand all Loading... |
6080 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 6082 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
6081 kGrowRegExpStackRuntimeEntry, 1, locs()); | 6083 kGrowRegExpStackRuntimeEntry, 1, locs()); |
6082 __ Drop(1); | 6084 __ Drop(1); |
6083 __ Pop(result); | 6085 __ Pop(result); |
6084 } | 6086 } |
6085 | 6087 |
6086 | 6088 |
6087 } // namespace dart | 6089 } // namespace dart |
6088 | 6090 |
6089 #endif // defined TARGET_ARCH_ARM64 | 6091 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |