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

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

Issue 10356051: First steps toward a two stages new compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/flow_graph_builder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/code_generator.h" 8 #include "vm/code_generator.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 // collection and counting stub. 649 // collection and counting stub.
650 const Function& function = 650 const Function& function =
651 Function::ZoneHandle(parsed_function_.function().raw()); 651 Function::ZoneHandle(parsed_function_.function().raw());
652 __ LoadObject(EBX, function); 652 __ LoadObject(EBX, function);
653 __ incl(FieldAddress(EBX, Function::usage_counter_offset())); 653 __ incl(FieldAddress(EBX, Function::usage_counter_offset()));
654 if (CodeGenerator::CanOptimize()) { 654 if (CodeGenerator::CanOptimize()) {
655 // Do not optimize if usage count must be reported. 655 // Do not optimize if usage count must be reported.
656 __ cmpl(FieldAddress(EBX, Function::usage_counter_offset()), 656 __ cmpl(FieldAddress(EBX, Function::usage_counter_offset()),
657 Immediate(FLAG_optimization_counter_threshold)); 657 Immediate(FLAG_optimization_counter_threshold));
658 Label not_yet_hot; 658 Label not_yet_hot;
659 __ j(LESS_EQUAL, &not_yet_hot); 659 __ j(LESS_EQUAL, &not_yet_hot, Assembler::kNearJump);
660 __ pushl(EAX); // Preserve result. 660 __ pushl(EAX); // Preserve result.
661 __ pushl(EBX); // Argument for runtime: function to optimize. 661 __ pushl(EBX); // Argument for runtime: function to optimize.
662 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry); 662 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
663 __ popl(EBX); // Remove argument. 663 __ popl(EBX); // Remove argument.
664 __ popl(EAX); // Restore result. 664 __ popl(EAX); // Restore result.
665 __ Bind(&not_yet_hot); 665 __ Bind(&not_yet_hot);
666 } 666 }
667 } 667 }
668 if (FLAG_trace_functions) { 668 if (FLAG_trace_functions) {
669 const Function& function = 669 const Function& function =
(...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 const Error& error = Error::Handle( 2954 const Error& error = Error::Handle(
2955 Parser::FormatError(script, token_index, "Error", format, args)); 2955 Parser::FormatError(script, token_index, "Error", format, args));
2956 va_end(args); 2956 va_end(args);
2957 Isolate::Current()->long_jump_base()->Jump(1, error); 2957 Isolate::Current()->long_jump_base()->Jump(1, error);
2958 UNREACHABLE(); 2958 UNREACHABLE();
2959 } 2959 }
2960 2960
2961 } // namespace dart 2961 } // namespace dart
2962 2962
2963 #endif // defined TARGET_ARCH_IA32 2963 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698