This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_foo_args | |
| # Here are our possible comma-separated values. | |
| set choices happy green dragon | |
| # Get what the user has typed so far as the token under the cursor. | |
| # For example, this might be "--stuff=abc,def" | |
| set token (commandline -ct) | |
| # We don't know if the user used a space or = separator. | |
| # Split about =, and take the last part. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <mutex> | |
| static void hello() {} | |
| int main(void) | |
| { | |
| std::once_flag just_once{}; | |
| std::call_once(just_once, hello); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern "C" int pthread_once(int *, void()); | |
| int a(int *c, void __func()) { return pthread_once(c, __func); } | |
| namespace b { | |
| struct A { | |
| int e; | |
| }; | |
| extern "C" void __once_proxy(); | |
| template < typename f > void d(A &c, f ) { a(&c.e, __once_proxy); } | |
| } | |
| void h(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern "C" void pthread_once(int *, void()); | |
| namespace std | |
| { | |
| extern __thread void (*__once_call)(); | |
| extern "C" void __once_proxy(); | |
| }; // namespace std | |
| static void noop() {} | |
| using voidfunc = void (*)(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <mutex> | |
| static void hello() {} | |
| int main(void) | |
| { | |
| std::once_flag just_once{}; | |
| std::call_once(just_once, hello); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <assert.h> | |
| #include <fcntl.h> | |
| #include <limits.h> | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <sys/types.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <spawn.h> | |
| #include <sys/wait.h> | |
| static void show_sigmask(const char *when) { | |
| sigset_t sigs; | |
| sigemptyset(&sigs); | |
| int err = sigprocmask(SIG_SETMASK, 0, &sigs); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* POSIX spawn interface. Linux version. | |
| Copyright (C) 2016-2019 Free Software Foundation, Inc. | |
| This file is part of the GNU C Library. | |
| The GNU C Library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) any later version. | |
| The GNU C Library is distributed in the hope that it will be useful, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Copyright (c) Facebook, Inc. and its affiliates. | |
| * | |
| * This source code is licensed under the MIT license found in the | |
| * LICENSE file in the root directory of this source tree. | |
| */ | |
| // RUN: %hermes -target=HBC -O %s | %FileCheck --match-full-lines %s | |
| // RUN: %hermes -target=HBC -O -emit-binary -out %t.hbc %s && %hermes %t.hbc | %FileCheck --match-full-lines %s | |
| "use strict"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| "__DARWIN_C_LEVEL" = __DARWIN_C_LEVEL |