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

Side by Side Diff: courgette/adjustment_method.cc

Issue 118031: New adjustment method for Courgette.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « courgette/adjustment_method.h ('k') | courgette/adjustment_method_2.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "courgette/adjustment_method.h" 5 #include "courgette/adjustment_method.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 679
680 680
681 //////////////////////////////////////////////////////////////////////////////// 681 ////////////////////////////////////////////////////////////////////////////////
682 682
683 void AdjustmentMethod::Destroy() { delete this; } 683 void AdjustmentMethod::Destroy() { delete this; }
684 684
685 AdjustmentMethod* AdjustmentMethod::MakeNullAdjustmentMethod() { 685 AdjustmentMethod* AdjustmentMethod::MakeNullAdjustmentMethod() {
686 return new NullAdjustmentMethod(); 686 return new NullAdjustmentMethod();
687 } 687 }
688 688
689 AdjustmentMethod* AdjustmentMethod::MakeProductionAdjustmentMethod() { 689 AdjustmentMethod* AdjustmentMethod::MakeTrieAdjustmentMethod() {
690 return new GraphAdjuster(); 690 return new GraphAdjuster();
691 } 691 }
692 692
693 Status Adjust(const AssemblyProgram& model, AssemblyProgram* program) { 693 Status Adjust(const AssemblyProgram& model, AssemblyProgram* program) {
694 AdjustmentMethod* method = AdjustmentMethod::MakeProductionAdjustmentMethod(); 694 AdjustmentMethod* method = AdjustmentMethod::MakeProductionAdjustmentMethod();
695 bool ok = method->Adjust(model, program); 695 bool ok = method->Adjust(model, program);
696 method->Destroy(); 696 method->Destroy();
697 if (ok) 697 if (ok)
698 return C_OK; 698 return C_OK;
699 else 699 else
700 return C_ADJUSTMENT_FAILED; 700 return C_ADJUSTMENT_FAILED;
701 } 701 }
702 702
703 } // namespace courgette 703 } // namespace courgette
OLDNEW
« no previous file with comments | « courgette/adjustment_method.h ('k') | courgette/adjustment_method_2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698