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 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 return summary; | 2579 return summary; |
2580 } | 2580 } |
2581 | 2581 |
2582 | 2582 |
2583 class CheckStackOverflowSlowPath : public SlowPathCode { | 2583 class CheckStackOverflowSlowPath : public SlowPathCode { |
2584 public: | 2584 public: |
2585 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) | 2585 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
2586 : instruction_(instruction) { } | 2586 : instruction_(instruction) { } |
2587 | 2587 |
2588 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2588 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2589 if (FLAG_use_osr) { | 2589 if (FLAG_use_osr && osr_entry_label()->IsLinked()) { |
2590 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); | 2590 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); |
2591 Register temp = instruction_->locs()->temp(0).reg(); | 2591 Register temp = instruction_->locs()->temp(0).reg(); |
2592 __ Comment("CheckStackOverflowSlowPathOsr"); | 2592 __ Comment("CheckStackOverflowSlowPathOsr"); |
2593 __ Bind(osr_entry_label()); | 2593 __ Bind(osr_entry_label()); |
2594 __ LoadImmediate(temp, Immediate(flags_address), PP); | 2594 __ LoadImmediate(temp, Immediate(flags_address), PP); |
2595 __ movq(Address(temp, 0), Immediate(Isolate::kOsrRequest)); | 2595 __ movq(Address(temp, 0), Immediate(Isolate::kOsrRequest)); |
2596 } | 2596 } |
2597 __ Comment("CheckStackOverflowSlowPath"); | 2597 __ Comment("CheckStackOverflowSlowPath"); |
2598 __ Bind(entry_label()); | 2598 __ Bind(entry_label()); |
2599 compiler->SaveLiveRegisters(instruction_->locs()); | 2599 compiler->SaveLiveRegisters(instruction_->locs()); |
(...skipping 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6450 __ Drop(1); | 6450 __ Drop(1); |
6451 __ popq(result); | 6451 __ popq(result); |
6452 } | 6452 } |
6453 | 6453 |
6454 | 6454 |
6455 } // namespace dart | 6455 } // namespace dart |
6456 | 6456 |
6457 #undef __ | 6457 #undef __ |
6458 | 6458 |
6459 #endif // defined TARGET_ARCH_X64 | 6459 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |