BUILD 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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_and_value",
  9. srcs = [
  10. "action.cpp",
  11. "value.cpp",
  12. ],
  13. hdrs = [
  14. "action.h",
  15. "value.h",
  16. ],
  17. deps = [
  18. ":address",
  19. ":dictionary",
  20. ":field_path",
  21. ":heap_allocation_interface",
  22. ":stack",
  23. "//common:check",
  24. "//common:ostream",
  25. "//executable_semantics/ast:declaration",
  26. "//executable_semantics/ast:expression",
  27. "//executable_semantics/ast:pattern",
  28. "//executable_semantics/ast:statement",
  29. "//executable_semantics/common:arena",
  30. "//executable_semantics/common:error",
  31. "//executable_semantics/common:nonnull",
  32. "@llvm-project//llvm:Support",
  33. ],
  34. )
  35. cc_library(
  36. name = "action_stack",
  37. srcs = ["action_stack.cpp"],
  38. hdrs = ["action_stack.h"],
  39. deps = [
  40. ":action_and_value",
  41. ":stack",
  42. "//common:ostream",
  43. "//executable_semantics/ast:statement",
  44. "@llvm-project//llvm:Support",
  45. ],
  46. )
  47. cc_library(
  48. name = "address",
  49. hdrs = ["address.h"],
  50. deps = [
  51. ":field_path",
  52. "//common:ostream",
  53. "@llvm-project//llvm:Support",
  54. ],
  55. )
  56. cc_library(
  57. name = "dictionary",
  58. hdrs = ["dictionary.h"],
  59. deps = ["//executable_semantics/common:arena"],
  60. )
  61. cc_library(
  62. name = "exec_program",
  63. srcs = ["exec_program.cpp"],
  64. hdrs = ["exec_program.h"],
  65. deps = [
  66. ":interpreter",
  67. ":resolve_control_flow",
  68. ":resolve_names",
  69. ":type_checker",
  70. "//common:check",
  71. "//common:ostream",
  72. "//executable_semantics/ast",
  73. "//executable_semantics/common:arena",
  74. ],
  75. )
  76. cc_library(
  77. name = "field_path",
  78. hdrs = ["field_path.h"],
  79. deps = [
  80. "//common:ostream",
  81. "//executable_semantics/ast",
  82. "//executable_semantics/ast:static_scope",
  83. "@llvm-project//llvm:Support",
  84. ],
  85. )
  86. cc_library(
  87. name = "heap",
  88. srcs = ["heap.cpp"],
  89. hdrs = ["heap.h"],
  90. deps = [
  91. ":action_and_value",
  92. ":address",
  93. ":heap_allocation_interface",
  94. "//common:ostream",
  95. "//executable_semantics/ast:source_location",
  96. "//executable_semantics/common:error",
  97. "//executable_semantics/common:nonnull",
  98. "@llvm-project//llvm:Support",
  99. ],
  100. )
  101. cc_library(
  102. name = "heap_allocation_interface",
  103. hdrs = ["heap_allocation_interface.h"],
  104. deps = [
  105. ":address",
  106. "//executable_semantics/common:arena",
  107. "//executable_semantics/common:nonnull",
  108. ],
  109. )
  110. cc_library(
  111. name = "interpreter",
  112. srcs = [
  113. "interpreter.cpp",
  114. ],
  115. hdrs = [
  116. "interpreter.h",
  117. ],
  118. deps = [
  119. ":action_and_value",
  120. ":action_stack",
  121. ":address",
  122. ":heap",
  123. ":stack",
  124. "//common:check",
  125. "//common:ostream",
  126. "//executable_semantics/ast",
  127. "//executable_semantics/ast:declaration",
  128. "//executable_semantics/ast:expression",
  129. "//executable_semantics/ast:pattern",
  130. "//executable_semantics/common:arena",
  131. "//executable_semantics/common:error",
  132. "@llvm-project//llvm:Support",
  133. ],
  134. )
  135. cc_library(
  136. name = "resolve_control_flow",
  137. srcs = ["resolve_control_flow.cpp"],
  138. hdrs = ["resolve_control_flow.h"],
  139. deps = [
  140. "//common:check",
  141. "//executable_semantics/ast",
  142. "//executable_semantics/ast:declaration",
  143. "//executable_semantics/ast:return_term",
  144. "//executable_semantics/ast:statement",
  145. "//executable_semantics/common:error",
  146. "//executable_semantics/common:nonnull",
  147. "@llvm-project//llvm:Support",
  148. ],
  149. )
  150. cc_library(
  151. name = "resolve_names",
  152. srcs = ["resolve_names.cpp"],
  153. hdrs = ["resolve_names.h"],
  154. deps = [
  155. "//common:check",
  156. "//executable_semantics/ast",
  157. "//executable_semantics/ast:declaration",
  158. "//executable_semantics/ast:expression",
  159. "//executable_semantics/ast:pattern",
  160. "//executable_semantics/ast:return_term",
  161. "//executable_semantics/ast:statement",
  162. "//executable_semantics/ast:static_scope",
  163. "//executable_semantics/common:arena",
  164. "@llvm-project//llvm:Support",
  165. ],
  166. )
  167. cc_library(
  168. name = "stack",
  169. hdrs = ["stack.h"],
  170. deps = ["//common:check"],
  171. )
  172. cc_library(
  173. name = "type_checker",
  174. srcs = [
  175. "impl_scope.cpp",
  176. "type_checker.cpp",
  177. ],
  178. hdrs = [
  179. "impl_scope.h",
  180. "type_checker.h",
  181. ],
  182. deps = [
  183. ":action_and_value",
  184. ":dictionary",
  185. ":interpreter",
  186. "//common:ostream",
  187. "//executable_semantics/ast",
  188. "//executable_semantics/ast:declaration",
  189. "//executable_semantics/ast:expression",
  190. "//executable_semantics/ast:statement",
  191. "//executable_semantics/common:arena",
  192. "//executable_semantics/common:error",
  193. "//executable_semantics/common:nonnull",
  194. "@llvm-project//llvm:Support",
  195. ],
  196. )