mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:51:12 +01:00
Move ExecProgram to interpreter/ (#802)
Seems to make sense since it's the only interpreter/ dependency in syntax/ right now, so this feels like untangling deps. Fixes #371
This commit is contained in:
@@ -10,6 +10,7 @@ cc_binary(
|
||||
srcs = ["main.cpp"],
|
||||
deps = [
|
||||
"//executable_semantics/common:tracing_flag",
|
||||
"//executable_semantics/interpreter:exec_program",
|
||||
"//executable_semantics/syntax",
|
||||
"@llvm-project//llvm:Support",
|
||||
],
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Exceptions. See /LICENSE for license information.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
package(default_visibility = ["//executable_semantics:__subpackages__"])
|
||||
package(default_visibility = ["//executable_semantics:__pkg__"])
|
||||
|
||||
cc_library(
|
||||
name = "action",
|
||||
@@ -36,6 +36,16 @@ cc_library(
|
||||
deps = ["//executable_semantics/common:arena"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "exec_program",
|
||||
srcs = ["exec_program.cpp"],
|
||||
hdrs = ["exec_program.h"],
|
||||
deps = [
|
||||
":interpreter",
|
||||
":type_checker",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "field_path",
|
||||
hdrs = ["field_path.h"],
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#include "executable_semantics/syntax/syntax_helpers.h"
|
||||
#include "executable_semantics/interpreter/exec_program.h"
|
||||
|
||||
#include "common/check.h"
|
||||
#include "common/ostream.h"
|
||||
+3
-3
@@ -6,8 +6,8 @@
|
||||
// statement. The intent is to minimize the amount of C++ in the .ypp file, to
|
||||
// improve ease of maintenance.
|
||||
|
||||
#ifndef EXECUTABLE_SEMANTICS_EXEC_H_
|
||||
#define EXECUTABLE_SEMANTICS_EXEC_H_
|
||||
#ifndef EXECUTABLE_SEMANTICS_INTERPRETER_EXEC_PROGRAM_H_
|
||||
#define EXECUTABLE_SEMANTICS_INTERPRETER_EXEC_PROGRAM_H_
|
||||
|
||||
#include <list>
|
||||
|
||||
@@ -21,4 +21,4 @@ void ExecProgram(std::list<Ptr<const Declaration>> fs);
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
#endif // EXECUTABLE_SEMANTICS_EXEC_H_
|
||||
#endif // EXECUTABLE_SEMANTICS_INTERPRETER_EXEC_PROGRAM_H_
|
||||
@@ -7,8 +7,8 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "executable_semantics/common/tracing_flag.h"
|
||||
#include "executable_semantics/interpreter/exec_program.h"
|
||||
#include "executable_semantics/syntax/parse.h"
|
||||
#include "executable_semantics/syntax/syntax_helpers.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/InitLLVM.h"
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# Exceptions. See /LICENSE for license information.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
package(default_visibility = ["//executable_semantics:__pkg__"])
|
||||
|
||||
load("@mypy_integration//:mypy.bzl", "mypy_test")
|
||||
|
||||
package(default_visibility = ["//executable_semantics:__pkg__"])
|
||||
|
||||
cc_library(
|
||||
name = "bison_wrap",
|
||||
hdrs = ["bison_wrap.h"],
|
||||
@@ -22,8 +22,6 @@ cc_library(
|
||||
"parse_and_lex_context.h",
|
||||
"parser.cpp",
|
||||
"parser.h",
|
||||
"syntax_helpers.cpp",
|
||||
"syntax_helpers.h",
|
||||
],
|
||||
hdrs = [
|
||||
"parse.h",
|
||||
@@ -45,8 +43,6 @@ cc_library(
|
||||
"//executable_semantics/common:arena",
|
||||
"//executable_semantics/common:error",
|
||||
"//executable_semantics/common:tracing_flag",
|
||||
"//executable_semantics/interpreter",
|
||||
"//executable_semantics/interpreter:type_checker",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
|
||||
#include "common/check.h"
|
||||
#include "executable_semantics/syntax/parse_and_lex_context.h"
|
||||
#include "executable_semantics/syntax/syntax_helpers.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
} // %code top
|
||||
|
||||
|
||||
Reference in New Issue
Block a user