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

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

Issue 11780005: Allow optimized code when debugger is active (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ASSERT(func_reg == EDX); 66 ASSERT(func_reg == EDX);
67 compiler->GenerateCall(0, // no token position. 67 compiler->GenerateCall(0, // no token position.
68 &StubCode::OptimizeFunctionLabel(), 68 &StubCode::OptimizeFunctionLabel(),
69 PcDescriptors::kOther, 69 PcDescriptors::kOther,
70 locs()); 70 locs());
71 __ Bind(&done); 71 __ Bind(&done);
72 } 72 }
73 } else { 73 } else {
74 __ LoadObject(func_reg, function); 74 __ LoadObject(func_reg, function);
75 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); 75 __ incl(FieldAddress(func_reg, Function::usage_counter_offset()));
76 if (FlowGraphCompiler::CanOptimize() && 76 if (compiler->CanOptimizeFunction() &&
77 compiler->parsed_function().function().is_optimizable()) { 77 compiler->parsed_function().function().is_optimizable()) {
78 // Do not optimize if usage count must be reported. 78 // Do not optimize if usage count must be reported.
79 __ cmpl(FieldAddress(func_reg, Function::usage_counter_offset()), 79 __ cmpl(FieldAddress(func_reg, Function::usage_counter_offset()),
80 Immediate(FLAG_optimization_counter_threshold)); 80 Immediate(FLAG_optimization_counter_threshold));
81 Label not_yet_hot; 81 Label not_yet_hot;
82 __ j(LESS, &not_yet_hot, Assembler::kNearJump); 82 __ j(LESS, &not_yet_hot, Assembler::kNearJump);
83 // Equal (or greater), optimize. 83 // Equal (or greater), optimize.
84 // The stub call preserves result register (EAX). 84 // The stub call preserves result register (EAX).
85 ASSERT(func_reg == EDX); 85 ASSERT(func_reg == EDX);
86 compiler->GenerateCall(0, // no token position. 86 compiler->GenerateCall(0, // no token position.
(...skipping 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after
2814 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. 2814 __ pcmpeqq(XMM0, XMM0); // Generate all 1's.
2815 __ pxor(value, XMM0); 2815 __ pxor(value, XMM0);
2816 } 2816 }
2817 2817
2818 2818
2819 } // namespace dart 2819 } // namespace dart
2820 2820
2821 #undef __ 2821 #undef __
2822 2822
2823 #endif // defined TARGET_ARCH_X64 2823 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698