Files
carbon-lang/executable_semantics/interpreter/BUILD
T
Geoff RomerandJon Meow d5124256a2 Split interpreter into smaller modules (#662)
- Move Heap and Frame/Scope to their own headers.
- Move some functions to more appropriate headers (e.g. CopyValue -> value.h).
- Define a separate Bazel rule for each header/cpp pair.
- Modify PrintValue to not print the frames of a ContinuationValue. This was necessary to break a dependency cycle between PrintValue, PrintFrame, and Action::Print.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2021-07-19 13:51:35 -07:00

116 lines
2.3 KiB
Python

# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@rules_cc//cc:defs.bzl", "cc_library")
package(default_visibility = ["//executable_semantics:__subpackages__"])
cc_library(
name = "action",
srcs = ["action.cpp"],
hdrs = ["action.h"],
deps = [
":containers",
":value",
"//executable_semantics/ast:expression",
"//executable_semantics/ast:function_definition",
"//executable_semantics/ast:statement",
],
)
cc_library(
name = "address",
hdrs = ["address.h"],
deps = [
":field_path",
],
)
cc_library(
name = "containers",
srcs = [
"list_node.h",
],
hdrs = [
"dictionary.h",
"stack.h",
],
deps = ["//common:check"],
)
cc_library(
name = "field_path",
hdrs = ["field_path.h"],
)
cc_library(
name = "frame",
srcs = ["frame.cpp"],
hdrs = ["frame.h"],
deps = [
":action",
":address",
":containers",
],
)
cc_library(
name = "heap",
srcs = ["heap.cpp"],
hdrs = ["heap.h"],
deps = [
":address",
":value",
],
)
cc_library(
name = "interpreter",
srcs = [
"interpreter.cpp",
],
hdrs = [
"interpreter.h",
],
deps = [
":action",
":address",
":containers",
":frame",
":heap",
":value",
"//common:check",
"//executable_semantics:tracing_flag",
"//executable_semantics/ast:declaration",
"//executable_semantics/ast:expression",
"//executable_semantics/ast:function_definition",
],
)
cc_library(
name = "typecheck",
srcs = ["typecheck.cpp"],
hdrs = ["typecheck.h"],
deps = [
":containers",
":interpreter",
"//executable_semantics:tracing_flag",
"//executable_semantics/ast:expression",
"//executable_semantics/ast:function_definition",
"//executable_semantics/ast:statement",
],
)
cc_library(
name = "value",
srcs = ["value.cpp"],
hdrs = ["value.h"],
deps = [
":address",
":containers",
":field_path",
"//executable_semantics/ast:statement",
],
)