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

Side by Side Diff: courgette/adjustment_method_2.cc

Issue 6597038: Implementation of an STL compatible allocator for Courgette on Windows.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 Solve(abs32_trace_, abs32_model_end); 1245 Solve(abs32_trace_, abs32_model_end);
1246 Solve(rel32_trace_, rel32_model_end); 1246 Solve(rel32_trace_, rel32_model_end);
1247 prog_->AssignRemainingIndexes(); 1247 prog_->AssignRemainingIndexes();
1248 return true; 1248 return true;
1249 } 1249 }
1250 1250
1251 private: 1251 private:
1252 void CollectTraces(const AssemblyProgram* program, Trace* abs32, Trace* rel32, 1252 void CollectTraces(const AssemblyProgram* program, Trace* abs32, Trace* rel32,
1253 bool is_model) { 1253 bool is_model) {
1254 label_info_maker_.ResetDebugLabel(); 1254 label_info_maker_.ResetDebugLabel();
1255 const std::vector<Instruction*>& instructions = program->instructions(); 1255 const InstructionVector& instructions = program->instructions();
1256 for (size_t i = 0; i < instructions.size(); ++i) { 1256 for (size_t i = 0; i < instructions.size(); ++i) {
1257 Instruction* instruction = instructions.at(i); 1257 Instruction* instruction = instructions.at(i);
1258 if (Label* label = program->InstructionAbs32Label(instruction)) 1258 if (Label* label = program->InstructionAbs32Label(instruction))
1259 ReferenceLabel(abs32, label, is_model); 1259 ReferenceLabel(abs32, label, is_model);
1260 if (Label* label = program->InstructionRel32Label(instruction)) 1260 if (Label* label = program->InstructionRel32Label(instruction))
1261 ReferenceLabel(rel32, label, is_model); 1261 ReferenceLabel(rel32, label, is_model);
1262 } 1262 }
1263 // TODO(sra): we could simply append all the labels in index order to 1263 // TODO(sra): we could simply append all the labels in index order to
1264 // incorporate some costing for entropy (bigger deltas) that will be 1264 // incorporate some costing for entropy (bigger deltas) that will be
1265 // introduced into the label address table by non-monotonic ordering. This 1265 // introduced into the label address table by non-monotonic ordering. This
(...skipping 26 matching lines...) Expand all
1292 1292
1293 //////////////////////////////////////////////////////////////////////////////// 1293 ////////////////////////////////////////////////////////////////////////////////
1294 1294
1295 } // namespace adjustment_method_2 1295 } // namespace adjustment_method_2
1296 1296
1297 AdjustmentMethod* AdjustmentMethod::MakeShingleAdjustmentMethod() { 1297 AdjustmentMethod* AdjustmentMethod::MakeShingleAdjustmentMethod() {
1298 return new adjustment_method_2::Adjuster(); 1298 return new adjustment_method_2::Adjuster();
1299 } 1299 }
1300 1300
1301 } // namespace courgette 1301 } // namespace courgette
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698