// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "courgette/adjustment_method.h" #include #include #include #include #include #include #include #include #include "base/logging.h" #include "base/memory/raw_ptr.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" #include "courgette/assembly_program.h" #include "courgette/courgette.h" #include "courgette/encoded_program.h" namespace courgette { //////////////////////////////////////////////////////////////////////////////// class NullAdjustmentMethod : public AdjustmentMethod { bool Adjust(const AssemblyProgram& model, AssemblyProgram* program) { return true; } }; //////////////////////////////////////////////////////////////////////////////// // The purpose of adjustment is to assign indexes to Labels of a program 'p' to // make the sequence of indexes similar to a 'model' program 'm'. Labels // themselves don't have enough information to do this job, so we work with a // LabelInfo surrogate for each label. // class LabelInfo { public: raw_ptr