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

Unified Diff: courgette/adjustment_method_2.cc

Issue 2793153003: [Courgette] Refactor: Store Label Annotation in AssemblyProgram for patch generation. (Closed)
Patch Set: Rename *_label_annotation to *_label_annotations. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/adjustment_method.cc ('k') | courgette/adjustment_method_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/adjustment_method_2.cc
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index b5fbb7c610fabe2b8c08f3edabce4b6c957983f8..1e60c65f1cab166751d17b5f631f4e1b065209fb 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -15,7 +15,6 @@
#include <string>
#include <vector>
-#include "base/bind.h"
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -1254,15 +1253,10 @@ class Adjuster : public AdjustmentMethod {
bool is_model) {
label_info_maker_.ResetDebugLabel();
- AssemblyProgram::LabelHandler abs32_handler = base::Bind(
- &Adjuster::ReferenceLabel, base::Unretained(this), abs32, is_model);
- AssemblyProgram::LabelHandler rel32_handler = base::Bind(
- &Adjuster::ReferenceLabel, base::Unretained(this), rel32, is_model);
-
- program->HandleInstructionLabels({{ABS32, abs32_handler},
- {ABS64, abs32_handler},
- {REL32, rel32_handler},
- {REL32ARM, rel32_handler}});
+ for (Label* label : program->abs32_label_annotations())
+ ReferenceLabel(abs32, is_model, label);
+ for (Label* label : program->rel32_label_annotations())
+ ReferenceLabel(rel32, is_model, label);
// TODO(sra): we could simply append all the labels in index order to
// incorporate some costing for entropy (bigger deltas) that will be
« no previous file with comments | « courgette/adjustment_method.cc ('k') | courgette/adjustment_method_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698