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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | 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_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 "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after
2578 return summary; 2578 return summary;
2579 } 2579 }
2580 2580
2581 2581
2582 class CheckStackOverflowSlowPath : public SlowPathCode { 2582 class CheckStackOverflowSlowPath : public SlowPathCode {
2583 public: 2583 public:
2584 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) 2584 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction)
2585 : instruction_(instruction) { } 2585 : instruction_(instruction) { }
2586 2586
2587 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { 2587 virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
2588 if (FLAG_use_osr) { 2588 if (FLAG_use_osr && osr_entry_label()->IsLinked()) {
2589 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); 2589 uword flags_address = Isolate::Current()->stack_overflow_flags_address();
2590 __ Comment("CheckStackOverflowSlowPathOsr"); 2590 __ Comment("CheckStackOverflowSlowPathOsr");
2591 __ Bind(osr_entry_label()); 2591 __ Bind(osr_entry_label());
2592 __ movl(Address::Absolute(flags_address), 2592 __ movl(Address::Absolute(flags_address),
2593 Immediate(Isolate::kOsrRequest)); 2593 Immediate(Isolate::kOsrRequest));
2594 } 2594 }
2595 __ Comment("CheckStackOverflowSlowPath"); 2595 __ Comment("CheckStackOverflowSlowPath");
2596 __ Bind(entry_label()); 2596 __ Bind(entry_label());
2597 compiler->SaveLiveRegisters(instruction_->locs()); 2597 compiler->SaveLiveRegisters(instruction_->locs());
2598 // pending_deoptimization_env_ is needed to generate a runtime call that 2598 // pending_deoptimization_env_ is needed to generate a runtime call that
(...skipping 4285 matching lines...) Expand 10 before | Expand all | Expand 10 after
6884 __ Drop(1); 6884 __ Drop(1);
6885 __ popl(result); 6885 __ popl(result);
6886 } 6886 }
6887 6887
6888 6888
6889 } // namespace dart 6889 } // namespace dart
6890 6890
6891 #undef __ 6891 #undef __
6892 6892
6893 #endif // defined TARGET_ARCH_IA32 6893 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698