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

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

Issue 10389023: Fixed compilation time measurement, restructure some code. (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 | « runtime/vm/opt_code_generator_ia32.h ('k') | runtime/vm/stub_code_ia32_test.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/opt_code_generator.h" 8 #include "vm/opt_code_generator.h"
9 9
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 GrowableArray<const LocalVariable*> locals_; 234 GrowableArray<const LocalVariable*> locals_;
235 235
236 DISALLOW_COPY_AND_ASSIGN(ClassesForLocals); 236 DISALLOW_COPY_AND_ASSIGN(ClassesForLocals);
237 }; 237 };
238 238
239 239
240 OptimizingCodeGenerator::OptimizingCodeGenerator( 240 OptimizingCodeGenerator::OptimizingCodeGenerator(
241 Assembler* assembler, const ParsedFunction& parsed_function) 241 Assembler* assembler, const ParsedFunction& parsed_function)
242 : CodeGenerator(assembler, parsed_function), 242 : CodeGenerator(assembler, parsed_function),
243 deoptimization_blobs_(4), 243 deoptimization_blobs_(4),
244 classes_for_locals_(new ClassesForLocals()), 244 classes_for_locals_(NULL),
245 smi_class_(Class::ZoneHandle(Isolate::Current()->object_store() 245 smi_class_(Class::ZoneHandle(Isolate::Current()->object_store()
246 ->smi_class())), 246 ->smi_class())),
247 double_class_(Class::ZoneHandle(Isolate::Current()->object_store() 247 double_class_(Class::ZoneHandle(Isolate::Current()->object_store()
248 ->double_class())), 248 ->double_class())),
249 growable_object_array_class_(Class::ZoneHandle(Isolate::Current() 249 growable_object_array_class_(Class::ZoneHandle(Isolate::Current()
250 ->object_store()->growable_object_array_class())) { 250 ->object_store()->growable_object_array_class())) {
251 ASSERT(parsed_function.function().is_optimizable()); 251 ASSERT(parsed_function.function().is_optimizable());
252 } 252 }
253 253
254 254
255 void OptimizingCodeGenerator::InitGenerator() {
256 CodeGenerator::InitGenerator();
257 classes_for_locals_ = new ClassesForLocals();
258 }
259
260
255 DeoptimizationBlob* 261 DeoptimizationBlob*
256 OptimizingCodeGenerator::AddDeoptimizationBlob(AstNode* node, 262 OptimizingCodeGenerator::AddDeoptimizationBlob(AstNode* node,
257 DeoptReasonId reason_id) { 263 DeoptReasonId reason_id) {
258 DeoptimizationBlob* d = new DeoptimizationBlob(node, reason_id); 264 DeoptimizationBlob* d = new DeoptimizationBlob(node, reason_id);
259 deoptimization_blobs_.Add(d); 265 deoptimization_blobs_.Add(d);
260 return d; 266 return d;
261 } 267 }
262 268
263 269
264 DeoptimizationBlob* 270 DeoptimizationBlob*
(...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 } 2919 }
2914 } 2920 }
2915 // TODO(srdjan): Implement unary kSUB (negate) Mint. 2921 // TODO(srdjan): Implement unary kSUB (negate) Mint.
2916 CodeGenerator::VisitUnaryOpNode(node); 2922 CodeGenerator::VisitUnaryOpNode(node);
2917 } 2923 }
2918 2924
2919 2925
2920 } // namespace dart 2926 } // namespace dart
2921 2927
2922 #endif // defined TARGET_ARCH_IA32 2928 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/opt_code_generator_ia32.h ('k') | runtime/vm/stub_code_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698