BUILD 5.0 KB

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