Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 1088963003: Emit OSR check stub only if needed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698