BUILD 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. package(default_visibility = ["//executable_semantics:__pkg__"])
  5. # These currently have to be a single build rule because of a dependency cycle
  6. # in printing.
  7. cc_library(
  8. name = "action_frame_and_value",
  9. srcs = [
  10. "action.cpp",
  11. "frame.cpp",
  12. "value.cpp",
  13. ],
  14. hdrs = [
  15. "action.h",
  16. "frame.h",
  17. "value.h",
  18. ],
  19. deps = [
  20. ":address",
  21. ":dictionary",
  22. ":field_path",
  23. ":stack",
  24. "//common:ostream",
  25. "//executable_semantics/ast:declaration",
  26. "//executable_semantics/ast:expression",
  27. "//executable_semantics/ast:statement",
  28. "//executable_semantics/common:arena",
  29. "//executable_semantics/common:error",
  30. "@llvm-project//llvm:Support",
  31. ],
  32. )
  33. cc_library(
  34. name = "address",
  35. hdrs = ["address.h"],
  36. deps = [
  37. ":field_path",
  38. "//common:ostream",
  39. "@llvm-project//llvm:Support",
  40. ],
  41. )
  42. cc_library(
  43. name = "dictionary",
  44. hdrs = ["dictionary.h"],
  45. deps = ["//executable_semantics/common:arena"],
  46. )
  47. cc_library(
  48. name = "exec_program",
  49. srcs = ["exec_program.cpp"],
  50. hdrs = ["exec_program.h"],
  51. deps = [
  52. ":interpreter",
  53. ":type_checker",
  54. "//executable_semantics/ast",
  55. ],
  56. )
  57. cc_library(
  58. name = "field_path",
  59. hdrs = ["field_path.h"],
  60. deps = [
  61. "//common:ostream",
  62. "@llvm-project//llvm:Support",
  63. ],
  64. )
  65. cc_library(
  66. name = "heap",
  67. srcs = ["heap.cpp"],
  68. hdrs = ["heap.h"],
  69. deps = [
  70. ":action_frame_and_value",
  71. ":address",
  72. "//common:ostream",
  73. "@llvm-project//llvm:Support",
  74. ],
  75. )
  76. cc_library(
  77. name = "interpreter",
  78. srcs = [
  79. "interpreter.cpp",
  80. ],
  81. hdrs = [
  82. "interpreter.h",
  83. ],
  84. deps = [
  85. ":action_frame_and_value",
  86. ":address",
  87. ":heap",
  88. "//common:check",
  89. "//common:ostream",
  90. "//executable_semantics/ast:declaration",
  91. "//executable_semantics/ast:expression",
  92. "//executable_semantics/common:arena",
  93. "@llvm-project//llvm:Support",
  94. ],
  95. )
  96. cc_library(
  97. name = "stack",
  98. hdrs = ["stack.h"],
  99. deps = ["//common:check"],
  100. )
  101. cc_library(
  102. name = "type_checker",
  103. srcs = ["type_checker.cpp"],
  104. hdrs = ["type_checker.h"],
  105. deps = [
  106. ":dictionary",
  107. ":interpreter",
  108. "//common:ostream",
  109. "//executable_semantics/ast:declaration",
  110. "//executable_semantics/ast:expression",
  111. "//executable_semantics/ast:statement",
  112. "//executable_semantics/common:arena",
  113. "@llvm-project//llvm:Support",
  114. ],
  115. )