BUILD 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. ":stack",
  22. "//common:ostream",
  23. "//executable_semantics/ast:declaration",
  24. "//executable_semantics/ast:expression",
  25. "//executable_semantics/ast:statement",
  26. "//executable_semantics/common:arena",
  27. "//executable_semantics/common:error",
  28. "@llvm-project//llvm:Support",
  29. ],
  30. )
  31. cc_library(
  32. name = "address",
  33. hdrs = ["address.h"],
  34. deps = [
  35. ":field_path",
  36. "//common:ostream",
  37. "@llvm-project//llvm:Support",
  38. ],
  39. )
  40. cc_library(
  41. name = "dictionary",
  42. hdrs = ["dictionary.h"],
  43. deps = ["//executable_semantics/common:arena"],
  44. )
  45. cc_library(
  46. name = "exec_program",
  47. srcs = ["exec_program.cpp"],
  48. hdrs = ["exec_program.h"],
  49. deps = [
  50. ":interpreter",
  51. ":resolve_control_flow",
  52. ":type_checker",
  53. "//executable_semantics/ast",
  54. ],
  55. )
  56. cc_library(
  57. name = "field_path",
  58. hdrs = ["field_path.h"],
  59. deps = [
  60. "//common:ostream",
  61. "@llvm-project//llvm:Support",
  62. ],
  63. )
  64. cc_library(
  65. name = "heap",
  66. srcs = ["heap.cpp"],
  67. hdrs = ["heap.h"],
  68. deps = [
  69. ":action_and_value",
  70. ":address",
  71. "//common:ostream",
  72. "@llvm-project//llvm:Support",
  73. ],
  74. )
  75. cc_library(
  76. name = "interpreter",
  77. srcs = [
  78. "interpreter.cpp",
  79. ],
  80. hdrs = [
  81. "interpreter.h",
  82. ],
  83. deps = [
  84. ":action_and_value",
  85. ":address",
  86. ":heap",
  87. "//common:check",
  88. "//common:ostream",
  89. "//executable_semantics/ast:declaration",
  90. "//executable_semantics/ast:expression",
  91. "//executable_semantics/common:arena",
  92. "@llvm-project//llvm:Support",
  93. ],
  94. )
  95. cc_library(
  96. name = "resolve_control_flow",
  97. srcs = ["resolve_control_flow.cpp"],
  98. hdrs = ["resolve_control_flow.h"],
  99. deps = [
  100. "//common:check",
  101. "//executable_semantics/ast",
  102. "//executable_semantics/ast:declaration",
  103. "//executable_semantics/ast:statement",
  104. "@llvm-project//llvm:Support",
  105. ],
  106. )
  107. cc_library(
  108. name = "stack",
  109. hdrs = ["stack.h"],
  110. deps = ["//common:check"],
  111. )
  112. cc_library(
  113. name = "type_checker",
  114. srcs = ["type_checker.cpp"],
  115. hdrs = ["type_checker.h"],
  116. deps = [
  117. ":dictionary",
  118. ":interpreter",
  119. "//common:ostream",
  120. "//executable_semantics/ast:declaration",
  121. "//executable_semantics/ast:expression",
  122. "//executable_semantics/ast:statement",
  123. "//executable_semantics/common:arena",
  124. "@llvm-project//llvm:Support",
  125. ],
  126. )