| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 | 330 |
| 331 | 331 |
| 332 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler, | 332 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler, |
| 333 intptr_t deopt_id, | 333 intptr_t deopt_id, |
| 334 intptr_t token_pos, | 334 intptr_t token_pos, |
| 335 Token::Kind kind, | 335 Token::Kind kind, |
| 336 LocationSummary* locs, | 336 LocationSummary* locs, |
| 337 const ICData& original_ic_data) { | 337 const ICData& original_ic_data) { |
| 338 if (!compiler->is_optimizing()) { | 338 if (!compiler->is_optimizing()) { |
| 339 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 339 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 340 deopt_id, | 340 deopt_id, |
| 341 token_pos); | 341 token_pos); |
| 342 } | 342 } |
| 343 const int kNumberOfArguments = 2; | 343 const int kNumberOfArguments = 2; |
| 344 const Array& kNoArgumentNames = Array::Handle(); | 344 const Array& kNoArgumentNames = Array::Handle(); |
| 345 const int kNumArgumentsChecked = 2; | 345 const int kNumArgumentsChecked = 2; |
| 346 | 346 |
| 347 const Immediate& raw_null = | 347 const Immediate& raw_null = |
| 348 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 348 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 349 Label check_identity; | 349 Label check_identity; |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 Array::Handle(), // No named arguments. | 966 Array::Handle(), // No named arguments. |
| 967 deopt, // Deoptimize target. | 967 deopt, // Deoptimize target. |
| 968 deopt_id(), | 968 deopt_id(), |
| 969 token_pos(), | 969 token_pos(), |
| 970 locs()); | 970 locs()); |
| 971 return; | 971 return; |
| 972 } | 972 } |
| 973 const String& function_name = | 973 const String& function_name = |
| 974 String::ZoneHandle(Symbols::New(Token::Str(kind()))); | 974 String::ZoneHandle(Symbols::New(Token::Str(kind()))); |
| 975 if (!compiler->is_optimizing()) { | 975 if (!compiler->is_optimizing()) { |
| 976 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 976 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 977 deopt_id(), | 977 deopt_id(), |
| 978 token_pos()); | 978 token_pos()); |
| 979 } | 979 } |
| 980 const intptr_t kNumArguments = 2; | 980 const intptr_t kNumArguments = 2; |
| 981 const intptr_t kNumArgsChecked = 2; // Type-feedback. | 981 const intptr_t kNumArgsChecked = 2; // Type-feedback. |
| 982 ICData& relational_ic_data = ICData::ZoneHandle(ic_data()->raw()); | 982 ICData& relational_ic_data = ICData::ZoneHandle(ic_data()->raw()); |
| 983 if (compiler->is_optimizing() && FLAG_propagate_ic_data) { | 983 if (compiler->is_optimizing() && FLAG_propagate_ic_data) { |
| 984 ASSERT(!ic_data()->IsNull()); | 984 ASSERT(!ic_data()->IsNull()); |
| 985 if (ic_data()->NumberOfChecks() == 0) { | 985 if (ic_data()->NumberOfChecks() == 0) { |
| 986 // IC call for reoptimization populates original ICData. | 986 // IC call for reoptimization populates original ICData. |
| (...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3436 | 3436 |
| 3437 LocationSummary* GotoInstr::MakeLocationSummary() const { | 3437 LocationSummary* GotoInstr::MakeLocationSummary() const { |
| 3438 return new LocationSummary(0, 0, LocationSummary::kNoCall); | 3438 return new LocationSummary(0, 0, LocationSummary::kNoCall); |
| 3439 } | 3439 } |
| 3440 | 3440 |
| 3441 | 3441 |
| 3442 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3442 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3443 // Add deoptimization descriptor for deoptimizing instructions | 3443 // Add deoptimization descriptor for deoptimizing instructions |
| 3444 // that may be inserted before this instruction. | 3444 // that may be inserted before this instruction. |
| 3445 if (!compiler->is_optimizing()) { | 3445 if (!compiler->is_optimizing()) { |
| 3446 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 3446 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 3447 GetDeoptId(), | 3447 GetDeoptId(), |
| 3448 0); // No token position. | 3448 0); // No token position. |
| 3449 } | 3449 } |
| 3450 | 3450 |
| 3451 if (HasParallelMove()) { | 3451 if (HasParallelMove()) { |
| 3452 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 3452 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 3453 } | 3453 } |
| 3454 | 3454 |
| 3455 // We can fall through if the successor is the next block in the list. | 3455 // We can fall through if the successor is the next block in the list. |
| 3456 // Otherwise, we need a jump. | 3456 // Otherwise, we need a jump. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3720 PcDescriptors::kOther, | 3720 PcDescriptors::kOther, |
| 3721 locs()); | 3721 locs()); |
| 3722 __ Drop(2); // Discard type arguments and receiver. | 3722 __ Drop(2); // Discard type arguments and receiver. |
| 3723 } | 3723 } |
| 3724 | 3724 |
| 3725 } // namespace dart | 3725 } // namespace dart |
| 3726 | 3726 |
| 3727 #undef __ | 3727 #undef __ |
| 3728 | 3728 |
| 3729 #endif // defined TARGET_ARCH_IA32 | 3729 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |