skia2/include/private/SkSLIRNode.h
John Stiles ffeb6f2339 Remove SkSL::String class.
The previous CLs have removed the last significant differences between
SkSL::String and std::string. This CL removes SkSL::String entirely and
replaces it with std::string throughout the code.

Apologies for the very long CL, but I have done my best to make it as
simple and reviewable as possible. The vast majority of changes are
simple replacement of `SkSL::String` with `std::string`. In the rare
spots where code is moved from one place to another, it is logically
unchanged.

Change-Id: I39563d2db45da229f17f4504dfd63e00bde7a96e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503339
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-03 14:59:16 +00:00

64 lines
1.4 KiB
C++

/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SKSL_IRNODE
#define SKSL_IRNODE
#include "include/private/SkSLString.h"
#include "include/private/SkTArray.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLModifiersPool.h"
#include "src/sksl/SkSLPool.h"
#include <algorithm>
#include <atomic>
#include <unordered_set>
#include <vector>
namespace SkSL {
class Expression;
class FunctionDeclaration;
class FunctionDefinition;
class Statement;
class Symbol;
class SymbolTable;
class Type;
class Variable;
class VariableReference;
enum class VariableRefKind : int8_t;
enum class VariableStorage : int8_t;
/**
* Represents a node in the intermediate representation (IR) tree. The IR is a fully-resolved
* version of the program (all types determined, everything validated), ready for code generation.
*/
class IRNode : public Poolable {
public:
virtual ~IRNode() {}
virtual std::string description() const = 0;
// No copy construction or assignment
IRNode(const IRNode&) = delete;
IRNode& operator=(const IRNode&) = delete;
// line of this element within the program being compiled, for error reporting purposes
int fLine;
protected:
IRNode(int line, int kind)
: fLine(line)
, fKind(kind) {}
int fKind;
};
} // namespace SkSL
#endif