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

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

Issue 10665038: Remove old code generator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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_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 "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 == RAX); 58 ASSERT(result == RAX);
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 __ incq(FieldAddress(temp, Function::usage_counter_offset())); 66 __ incq(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 __ pushq(result); // Preserve result. 73 __ pushq(result); // Preserve result.
74 __ pushq(temp); // Argument for runtime: function to optimize. 74 __ pushq(temp); // Argument for runtime: function to optimize.
75 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry); 75 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
76 __ popq(temp); // Remove argument. 76 __ popq(temp); // Remove argument.
77 __ popq(result); // Restore result. 77 __ popq(result); // Restore result.
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 instance_call()->argument_names()); 1971 instance_call()->argument_names());
1972 } 1972 }
1973 __ Bind(&done); 1973 __ Bind(&done);
1974 } 1974 }
1975 1975
1976 } // namespace dart 1976 } // namespace dart
1977 1977
1978 #undef __ 1978 #undef __
1979 1979
1980 #endif // defined TARGET_ARCH_X64 1980 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698