Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change tuple indexing #4186

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
0babda5
docs: add a note on setting up `clangd`
brymer-meneses Jul 15, 2024
db6b327
docs: add a note on setting up `clangd`
brymer-meneses Jul 15, 2024
8aa7919
apply suggestions
brymer-meneses Jul 24, 2024
67b6fd3
forgot a semicolon
brymer-meneses Jul 24, 2024
d2f8972
Compute specific constant values. (#4128)
zygoloid Jul 15, 2024
e946c68
Build an evaluation block for the definition region of a generic. (#4…
zygoloid Jul 16, 2024
ccf1275
Rebuild the type of constants during evaluation. (#4138)
zygoloid Jul 16, 2024
d2c1ae1
Add basic output of where memory is stored after a compile. (#4136)
jonmeow Jul 16, 2024
dc64f41
Do not query interface's self_param_id unless defined when importing …
gysddn Jul 16, 2024
0ca907f
Substitute into generic class and interface definitions when we requi…
zygoloid Jul 17, 2024
e0a8d38
Enable the more effective version of `-Wnon-virtual-dtor`. (#4142)
chandlerc Jul 17, 2024
9689e8d
Directly use TCMalloc rather than the system malloc on Linux. (#4133)
chandlerc Jul 17, 2024
f7b1793
Mark some leaf classes `final` to suppress `-Wnon-virtual-dtor`. (#4141)
zygoloid Jul 17, 2024
b296b1d
Use verbose formatting of instructions on crash messages. (#4125)
jonmeow Jul 17, 2024
0dd2294
Change TypeId to be a thin wrapper around ConstantId. (#4140)
zygoloid Jul 17, 2024
74b52e4
Move `GetTypeInInstance` from `Check` to `SemIR`. (#4144)
zygoloid Jul 17, 2024
950e614
Basic testing for generic methods using `Self`. (#4143)
zygoloid Jul 17, 2024
f14a639
Reserve memory for the identifiers hashtable. (#4107)
chandlerc Jul 18, 2024
edf8d8e
Abbreviate instruction as inst in formatter. (#4146)
jonmeow Jul 18, 2024
ff8c302
Try some crash recovery in autoupdate threads. (#4147)
jonmeow Jul 18, 2024
842f226
Remove irregular digit placement check from NumericLiteral. (#4150)
jonmeow Jul 19, 2024
bad5230
Rename BindNameInfo to EntityName (#4090)
geoffromer Jul 19, 2024
ad15a59
Remove declaration of function deleted in #4150. (#4151)
zygoloid Jul 22, 2024
f83be0f
Remove already-done no_prelude todo. (#4148)
jonmeow Jul 22, 2024
2ccab8d
Use the package/library name in ImportIRId formatting. (#4154)
jonmeow Jul 22, 2024
daf818b
Implement syntactic merge checks for parameters. (#4149)
jonmeow Jul 23, 2024
83840c4
Rebuild all constants in the eval block. (#4155)
zygoloid Jul 23, 2024
fc9b02f
Remove overeager CHECK. (#4159)
zygoloid Jul 23, 2024
bd7e739
Convert `EvalContext` into a class. (#4160)
zygoloid Jul 24, 2024
1ca3a1d
Add a mention of our nightly builds to our `README.md`. (#4158)
chandlerc Jul 24, 2024
e62c509
Improve namespace handling in imports. (#4153)
jonmeow Jul 24, 2024
a4501ad
Support for calling non-generic methods in a specific class. (#4156)
zygoloid Jul 24, 2024
45d2adf
When reentering an interface scope, reintroduce the `Self` parameter.…
zygoloid Jul 24, 2024
0285842
Move common entity fields to a 'base' struct. (#4161)
jonmeow Jul 24, 2024
67a26f3
Rename "generic instance" to "specific" throughout the toolchain. (#4…
zygoloid Jul 25, 2024
bd793e5
fix: `clangd: -32001: invalid AST` (#4164)
brymer-meneses Jul 25, 2024
e0f5e68
Remove caching of return slot usage. (#4163)
zygoloid Jul 25, 2024
59aa658
Improve notes on MODULE.bazel.lock changes (#4167)
jonmeow Jul 25, 2024
b09343b
Only produce a name scope for a namespace when not merged (#4168)
jonmeow Jul 25, 2024
a71d033
Move definition of member of Function to function.cpp where it belong…
zygoloid Jul 25, 2024
5b96d7e
Refactor `ReturnTypeInfo` and `InitRepr`. (#4169)
zygoloid Jul 25, 2024
e8545fa
Add initial parsing for 'extern library' (#4173)
jonmeow Jul 26, 2024
123cbc2
Refactor some commonality in formatter. (#4171)
jonmeow Jul 26, 2024
e231a56
Refactor some check-phase postorder iterator use. (#4175)
jonmeow Jul 27, 2024
657f16b
Temporarily disable tcmalloc due to compiler-explorer crash (#4177)
jonmeow Jul 29, 2024
08b1fd8
Fix incorrect `value_id` and location in imported `BindSymbolicName`.…
zygoloid Jul 31, 2024
b54e1a2
Separate subtree size information from parse nodes. (#4174)
jonmeow Jul 31, 2024
65fc345
Import support for generics and specifics (#4179)
zygoloid Jul 31, 2024
5700d1d
When importing symbolic constants and types, also import the associat…
zygoloid Aug 1, 2024
11e3c77
Remove supurfluous/confusing {} around a temporary (#4183)
dwblaikie Aug 1, 2024
32f3191
Initial rough support for deducing generic arguments in a call to a g…
zygoloid Aug 2, 2024
da45ace
change tuple indexing
brymer-meneses Aug 3, 2024
3ec9382
remove unused header
brymer-meneses Aug 3, 2024
07c96f4
update forgotten tests
brymer-meneses Aug 3, 2024
53e7902
Update toolchain/check/handle_name.cpp
brymer-meneses Aug 6, 2024
8626e5d
Update toolchain/check/handle_name.cpp
brymer-meneses Aug 6, 2024
1332dd2
Update toolchain/check/member_access.cpp
brymer-meneses Aug 6, 2024
c5884f3
Update toolchain/parse/handle_period.cpp
brymer-meneses Aug 6, 2024
8bd014d
Update toolchain/check/member_access.cpp
brymer-meneses Aug 6, 2024
e83f6cf
Update toolchain/lower/testdata/index/tuple_return_value_access.carbon
brymer-meneses Aug 6, 2024
2575124
handle tuple indexing of paren expressions
brymer-meneses Aug 6, 2024
3dcaff0
update tests
brymer-meneses Aug 6, 2024
d4ebcb4
add `fail_non_tuple_index.carbon`
brymer-meneses Aug 6, 2024
f9247c3
add comment to `PerformTupleIndex`
brymer-meneses Aug 8, 2024
a52081b
add missing comments
brymer-meneses Aug 8, 2024
ab7d674
refactor toolchain/check/member_access.cpp
brymer-meneses Aug 8, 2024
eae1ba0
move `IntLiteral`
brymer-meneses Aug 8, 2024
c2e773d
Update toolchain/check/member_access.cpp
brymer-meneses Aug 8, 2024
28e9114
apply suggestion
brymer-meneses Aug 8, 2024
a8a4c6a
apply suggestion
brymer-meneses Aug 14, 2024
91ceae5
consolidate `tuples/fail_non_tuple_index.carbon` with `tuples/index/f…
brymer-meneses Aug 14, 2024
ec26bec
Update toolchain/lower/testdata/index/array_element_access.carbon
brymer-meneses Aug 14, 2024
e54d9e1
apply test changes
brymer-meneses Aug 14, 2024
4209a32
add tuple negative indexing
brymer-meneses Aug 14, 2024
ad13f30
testdata changes
brymer-meneses Aug 14, 2024
56ec41f
testdata changes
brymer-meneses Aug 14, 2024
91d3545
testdata changes
brymer-meneses Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ build --action_env=LANG=en_US.UTF-8
build --enable_platform_specific_config
build:linux --define=pfm=1

# Enable TCMalloc on Linux as well.
# TODO: tcmalloc needs to support compiler-explorer; see:
# https://github.com/carbon-language/carbon-lang/issues/4176
# build:linux --custom_malloc=@tcmalloc//tcmalloc

# Allow users to override any of the flags desired by importing a user-specific
# RC file here if present.
try-import %workspace%/user.bazelrc
7 changes: 7 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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

CompileFlags:
# Workaround for https://github.com/clangd/clangd/issues/1582
Remove: [-march=*]
46 changes: 38 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,33 @@

"""Bazel modules.

If `MODULE.bazel.lock` changes locally, it means the host platform hasn't yet
been added to the lock file. Running `bazel mod deps` provides a canonical
update to `MODULE.bazel.lock`; create a PR with those changes in order to
include the host platform.

Platforms tested with GitHub actions are kept up-to-date. Other platforms may
fall out of sync on dependency changes, and should be updated with a PR the same
way a platform is added.
`MODULE.bazel.lock` may change locally when `bazel` is exexcuted. This means one
of:

1. `MODULE.bazel` is changing.
- Running `bazel mod deps` provides a canonical update to
`MODULE.bazel.lock`; include the changes.
- GitHub test actions may also identify platform-specific lockfile
updates.
2. The `bazel` version doesn't match the version used to generate the
`MODULE.bazel.lock`.
- Bazel releases can change the lock file contents.
- We use Bazelisk in order to keep everyone using the same version:
https://bazel.build/install/bazelisk
- Developers are encouraged to alias `bazel` to `bazelisk` for
ease-of-use; some setups, like Homebrew, will include that with a
`bazelisk` install.
- Contribution tools documentation includes `bazelisk` setup:
https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/contribution_tools.md
- Make sure `bazelisk --version` (or `bazel --version`) matches the
version in `.bazeliskrc`.
3. The host platform hasn't yet been added to the lock file.
- Platforms tested with GitHub actions are kept up-to-date. Other
platforms may fall out of sync due to `bazel` or dependency changes,
and should be updated with a PR the same way a platform is added.
- Running `bazel mod deps` provides a canonical update to
`MODULE.bazel.lock`; create a PR with those changes in order to include
the host platform.
"""

module(name = "carbon")
Expand Down Expand Up @@ -43,6 +62,17 @@ archive_override(
urls = ["https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-{0}.tar.gz".format(libpfm_version)],
)

# The registry has a snapshot, but upstream is active and not regularly marking
# releases. We start with the BCR snapshot to avoid a miss and then override it
# with a more recent commit.
bazel_dep(name = "tcmalloc", version = "0.0.0-20240411-5ed309d", dev_dependency = True)
git_override(
module_name = "tcmalloc",
# HEAD as of 2024-07-14.
commit = "923df94c922e0cd2d0512c1662d374f63c2c0c96",
remote = "https://github.com/google/tcmalloc.git",
)

bazel_dep(name = "rules_bison", version = "0.2.2")
bazel_dep(name = "rules_flex", version = "0.2.1")
bazel_dep(name = "rules_m4", version = "0.2.3")
Expand Down
126 changes: 125 additions & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading