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

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

Issue 10665038: Remove old code generator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 Register temp = locs()->temp(0).reg(); 57 Register temp = locs()->temp(0).reg();
58 ASSERT(result == EAX); 58 ASSERT(result == EAX);
59 if (!compiler->is_optimizing()) { 59 if (!compiler->is_optimizing()) {
60 // Count only in unoptimized code. 60 // Count only in unoptimized code.
61 // TODO(srdjan): Replace the counting code with a type feedback 61 // TODO(srdjan): Replace the counting code with a type feedback
62 // collection and counting stub. 62 // collection and counting stub.
63 const Function& function = 63 const Function& function =
64 Function::ZoneHandle(compiler->parsed_function().function().raw()); 64 Function::ZoneHandle(compiler->parsed_function().function().raw());
65 __ LoadObject(temp, function); 65 __ LoadObject(temp, function);
66 __ incl(FieldAddress(temp, Function::usage_counter_offset())); 66 __ incl(FieldAddress(temp, Function::usage_counter_offset()));
67 if (CodeGenerator::CanOptimize()) { 67 if (FlowGraphCompiler::CanOptimize()) {
68 // Do not optimize if usage count must be reported. 68 // Do not optimize if usage count must be reported.
69 __ cmpl(FieldAddress(temp, Function::usage_counter_offset()), 69 __ cmpl(FieldAddress(temp, Function::usage_counter_offset()),
70 Immediate(FLAG_optimization_counter_threshold)); 70 Immediate(FLAG_optimization_counter_threshold));
71 Label not_yet_hot; 71 Label not_yet_hot;
72 __ j(LESS_EQUAL, &not_yet_hot, Assembler::kNearJump); 72 __ j(LESS_EQUAL, &not_yet_hot, Assembler::kNearJump);
73 __ pushl(result); // Preserve result. 73 __ pushl(result); // Preserve result.
74 __ pushl(temp); // Argument for runtime: function to optimize. 74 __ pushl(temp); // Argument for runtime: function to optimize.
75 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry); 75 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
76 __ popl(temp); // Remove argument. 76 __ popl(temp); // Remove argument.
77 __ popl(result); // Restore result. 77 __ popl(result); // Restore result.
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 instance_call()->argument_names()); 1966 instance_call()->argument_names());
1967 } 1967 }
1968 __ Bind(&done); 1968 __ Bind(&done);
1969 } 1969 }
1970 1970
1971 } // namespace dart 1971 } // namespace dart
1972 1972
1973 #undef __ 1973 #undef __
1974 1974
1975 #endif // defined TARGET_ARCH_X64 1975 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698