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

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

Issue 2781553004: Teach treeshaker about new cached functions and classes. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « runtime/vm/object_store.cc ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/precompiler.h" 5 #include "vm/precompiler.h"
6 6
7 #include "vm/aot_optimizer.h" 7 #include "vm/aot_optimizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/branch_optimizer.h" 10 #include "vm/branch_optimizer.h"
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 DropFields(); 475 DropFields();
476 TraceTypesFromRetainedClasses(); 476 TraceTypesFromRetainedClasses();
477 DropTypes(); 477 DropTypes();
478 DropTypeArguments(); 478 DropTypeArguments();
479 479
480 // Clear these before dropping classes as they may hold onto otherwise 480 // Clear these before dropping classes as they may hold onto otherwise
481 // dead instances of classes we will remove or otherwise unused symbols. 481 // dead instances of classes we will remove or otherwise unused symbols.
482 DropScriptData(); 482 DropScriptData();
483 I->object_store()->set_unique_dynamic_targets(Array::null_array()); 483 I->object_store()->set_unique_dynamic_targets(Array::null_array());
484 Class& null_class = Class::Handle(Z); 484 Class& null_class = Class::Handle(Z);
485 Function& null_function = Function::Handle(Z);
485 I->object_store()->set_future_class(null_class); 486 I->object_store()->set_future_class(null_class);
486 I->object_store()->set_completer_class(null_class); 487 I->object_store()->set_completer_class(null_class);
487 I->object_store()->set_stream_iterator_class(null_class); 488 I->object_store()->set_stream_iterator_class(null_class);
488 I->object_store()->set_symbol_class(null_class); 489 I->object_store()->set_symbol_class(null_class);
489 I->object_store()->set_compiletime_error_class(null_class); 490 I->object_store()->set_compiletime_error_class(null_class);
491 I->object_store()->set_simple_instance_of_function(null_function);
492 I->object_store()->set_simple_instance_of_true_function(null_function);
493 I->object_store()->set_simple_instance_of_false_function(null_function);
494 I->object_store()->set_async_set_thread_stack_trace(null_function);
495 I->object_store()->set_async_star_move_next_helper(null_function);
496 I->object_store()->set_complete_on_async_return(null_function);
497 I->object_store()->set_async_star_stream_controller(null_class);
490 } 498 }
491 DropClasses(); 499 DropClasses();
492 DropLibraries(); 500 DropLibraries();
493 501
494 BindStaticCalls(); 502 BindStaticCalls();
495 SwitchICCalls(); 503 SwitchICCalls();
496 504
497 ShareMegamorphicBuckets(); 505 ShareMegamorphicBuckets();
498 DedupStackMaps(); 506 DedupStackMaps();
499 DedupCodeSourceMaps(); 507 DedupCodeSourceMaps();
(...skipping 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after
3557 3565
3558 ASSERT(FLAG_precompiled_mode); 3566 ASSERT(FLAG_precompiled_mode);
3559 const bool optimized = function.IsOptimizable(); // False for natives. 3567 const bool optimized = function.IsOptimizable(); // False for natives.
3560 DartPrecompilationPipeline pipeline(zone, field_type_map); 3568 DartPrecompilationPipeline pipeline(zone, field_type_map);
3561 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3569 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3562 } 3570 }
3563 3571
3564 #endif // DART_PRECOMPILER 3572 #endif // DART_PRECOMPILER
3565 3573
3566 } // namespace dart 3574 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698