Page MenuHomePhabricator

hokein (Haojian Wu)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 19 2015, 3:38 AM (353 w, 3 d)

Recent Activity

Yesterday

hokein added inline comments to D126536: [pseudo] Add grammar annotations support..
Fri, May 27, 6:40 AM · Restricted Project, Restricted Project
hokein added a comment to D126536: [pseudo] Add grammar annotations support..

This patch might cover too many things (at least we could split the guide/glr implementation bit), but want to give you an overview of the picture first.

Fri, May 27, 6:32 AM · Restricted Project, Restricted Project
hokein requested review of D126536: [pseudo] Add grammar annotations support..
Fri, May 27, 6:28 AM · Restricted Project, Restricted Project

Wed, May 25

hokein added a comment to D126397: [pseudo] Fix pseudo-gen usage when cross-compiling.

Thanks for the fix!

Wed, May 25, 11:38 AM · Restricted Project, Restricted Project
hokein committed rGa17fc7fd8650: Fix unused-variable warning, NFC. (authored by hokein).
Fix unused-variable warning, NFC.
Wed, May 25, 6:25 AM · Restricted Project, Restricted Project
hokein committed rGc673d67bc76b: [AST] Dont invalidate a ref-type var decl if it has no initializer. (authored by hokein).
[AST] Dont invalidate a ref-type var decl if it has no initializer.
Wed, May 25, 6:15 AM · Restricted Project, Restricted Project
hokein closed D122935: [AST] Dont invalidate a ref-type var decl if it has no initializer..
Wed, May 25, 6:15 AM · Restricted Project, Restricted Project
hokein accepted D126373: [pseudo-gen] Add -o flag, make --grammar required.

Thanks!

Wed, May 25, 5:55 AM · Restricted Project, Restricted Project
hokein committed rGf1df6515e3fe: [pseudo] Add missing dependency, fix shared library build. (authored by hokein).
[pseudo] Add missing dependency, fix shared library build.
Wed, May 25, 3:39 AM · Restricted Project, Restricted Project
hokein committed rGcd2292ef8245: [pseudo] A basic implementation of compiling cxx grammar at build time. (authored by hokein).
[pseudo] A basic implementation of compiling cxx grammar at build time.
Wed, May 25, 2:26 AM · Restricted Project, Restricted Project
hokein closed D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..
Wed, May 25, 2:26 AM · Restricted Project, Restricted Project

Tue, May 24

hokein added inline comments to D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..
Tue, May 24, 12:08 PM · Restricted Project, Restricted Project
hokein updated the diff for D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..

rebase, and emit string chunks rather than a long raw string literal (to make msvc happy)

Tue, May 24, 12:07 PM · Restricted Project, Restricted Project

Mon, May 23

hokein added inline comments to D125911: [pseudo] (trivial) bracket-matching.
Mon, May 23, 2:20 AM · Restricted Project, Restricted Project

Fri, May 20

hokein accepted D125911: [pseudo] (trivial) bracket-matching.

Thanks, this looks a good start version!

Fri, May 20, 1:46 PM · Restricted Project, Restricted Project
hokein committed rG5b0022a9df3f: [clangd] Support UnresolvedUsingTypeLoc AST node in FindTarget. (authored by hokein).
[clangd] Support UnresolvedUsingTypeLoc AST node in FindTarget.
Fri, May 20, 5:54 AM · Restricted Project, Restricted Project
hokein closed D125684: [clangd] Support UnresolvedUsingTypeLoc AST node in FindTarget..
Fri, May 20, 5:54 AM · Restricted Project, Restricted Project

Thu, May 19

hokein added a comment to D125311: [pseudo] Share the underly payload when stripping comments for a token stream.

This looks good, but if that's the idiom we should add it to cook() also.

cook is more tricky, it takes a TokenStream, and returns a new one with an allocator payload:

  • the input TokenStream doesn't have a payload, this is OK
  • the input TokenStream has a payload, but what if the type of payload is not an allocator?

Payload is opaque, it can be a pair of {new payload, inner payload}. e.g.

void TokenStream::addPayload(shared_ptr<void> P) {
  Payload = make_shared<pair<shared_ptr<void>, shared_ptr<void>>>(std::move(P), std::move(Payload));
}
Thu, May 19, 5:54 AM · Restricted Project, Restricted Project
hokein updated the diff for D125311: [pseudo] Share the underly payload when stripping comments for a token stream.

add addPayload method, and share payload in cook as well

Thu, May 19, 5:54 AM · Restricted Project, Restricted Project
hokein added a comment to D125863: [clangd] Dont mark terminating PP-directives as skipped.

sorry, I might be lack of the context, where is the user complaint? I'm not sure which cases are improved with this patch.

so the complaint was from an example with an active branch, eg:

#if 1
void foo();
#else
#endif

The user was complaining that #endif was inactive depending on first or second branch being active. Hence my initial thoughts were also around cases which had at least one "active" branch, but you're right this actually is confusing when there are no active branches.

Thu, May 19, 5:40 AM · Restricted Project, Restricted Project

Wed, May 18

hokein added inline comments to D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..
Wed, May 18, 2:18 PM · Restricted Project, Restricted Project
hokein updated the diff for D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..

format fix

Wed, May 18, 2:18 PM · Restricted Project, Restricted Project
hokein updated the diff for D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..

Address comments:

Wed, May 18, 2:16 PM · Restricted Project, Restricted Project
hokein added a comment to D125311: [pseudo] Share the underly payload when stripping comments for a token stream.

This looks good, but if that's the idiom we should add it to cook() also.

Wed, May 18, 12:59 PM · Restricted Project, Restricted Project
hokein added a comment to D125863: [clangd] Dont mark terminating PP-directives as skipped.

sorry, I might be lack of the context, where is the user complaint? I'm not sure which cases are improved with this patch.

Wed, May 18, 5:10 AM · Restricted Project, Restricted Project

Tue, May 17

hokein added inline comments to D125794: [pseudo] Remove unnecessary user-defined-string-literal rule..
Tue, May 17, 7:56 AM · Restricted Project, Restricted Project
hokein requested review of D125794: [pseudo] Remove unnecessary user-defined-string-literal rule..
Tue, May 17, 7:53 AM · Restricted Project, Restricted Project
hokein committed rG86bc6399a063: [pseudo] Add the missing ; terminal for module-declaration rule. (authored by hokein).
[pseudo] Add the missing ; terminal for module-declaration rule.
Tue, May 17, 6:16 AM · Restricted Project, Restricted Project

Mon, May 16

hokein requested review of D125684: [clangd] Support UnresolvedUsingTypeLoc AST node in FindTarget..
Mon, May 16, 6:03 AM · Restricted Project, Restricted Project
hokein committed rGacc80ea71bac: [AST] Cleanup on getting the underlying decl of using-shdow decl. (authored by hokein).
[AST] Cleanup on getting the underlying decl of using-shdow decl.
Mon, May 16, 4:58 AM · Restricted Project, Restricted Project
hokein closed D123422: [AST] Cleanup on getting the underlying decl of using-shdow decl..
Mon, May 16, 4:58 AM · Restricted Project, Restricted Project
hokein requested review of D125677: [pseudo] Remove the explicit Accept actions..
Mon, May 16, 3:12 AM · Restricted Project, Restricted Project
hokein committed rG1a65c491be71: [pseudo] Support parsing variant target symbols. (authored by hokein).
[pseudo] Support parsing variant target symbols.
Mon, May 16, 1:38 AM · Restricted Project, Restricted Project
hokein closed D125006: [pseudo] Support parsing variant target symbols..
Mon, May 16, 1:38 AM · Restricted Project, Restricted Project
hokein updated the diff for D125006: [pseudo] Support parsing variant target symbols..

move the findNonterminal to Grammar.

Mon, May 16, 1:33 AM · Restricted Project, Restricted Project
hokein added a comment to D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..

This is a revised version of D125231, based on our discussion. It has a narrow scope: only nonterminals of the grammar are compiled; and it mainly focuses on interfaces;

Mon, May 16, 1:05 AM · Restricted Project, Restricted Project
hokein requested review of D125667: [pseudo] A basic implementation of compiling cxx grammar at build time..
Mon, May 16, 1:02 AM · Restricted Project, Restricted Project

Thu, May 12

hokein requested review of D125481: [pseudo] NFC, bail out the parse loop if there is no active heads..
Thu, May 12, 10:41 AM · Restricted Project, Restricted Project
hokein requested review of D125479: [pseudo] Fix the incorrect parameters-and-qualifiers rule..
Thu, May 12, 10:34 AM · Restricted Project, Restricted Project

Wed, May 11

hokein added a comment to D125006: [pseudo] Support parsing variant target symbols..

Would including *every* nonterminal as a start symbol would blow the size up a bit?
This would eliminate some complexity in the interface.

Wed, May 11, 5:32 AM · Restricted Project, Restricted Project
hokein updated the diff for D125006: [pseudo] Support parsing variant target symbols..

add a comment in cxx.bnf explaining why not making all nonterminals as start symbol by default.

Wed, May 11, 5:32 AM · Restricted Project, Restricted Project

Tue, May 10

hokein added inline comments to D125006: [pseudo] Support parsing variant target symbols..
Tue, May 10, 1:18 PM · Restricted Project, Restricted Project
hokein updated the diff for D125006: [pseudo] Support parsing variant target symbols..
  • adress comments
  • rename TargetSymbol -> StartSymbol
  • don't use StartSymbol for "_", rename and update a few occurrences
  • move findNonterminal to Grammar.h since it is used in various places
Tue, May 10, 1:14 PM · Restricted Project, Restricted Project
hokein accepted D125312: [pseudo] benchmark cleanups. NFC.

Thanks!

Tue, May 10, 12:31 PM · Restricted Project, Restricted Project
hokein added a comment to D125311: [pseudo] Share the underly payload when stripping comments for a token stream.

Example: https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/pseudo/tool/ClangPseudo.cpp#L88

Tue, May 10, 5:55 AM · Restricted Project, Restricted Project
hokein requested review of D125311: [pseudo] Share the underly payload when stripping comments for a token stream.
Tue, May 10, 5:53 AM · Restricted Project, Restricted Project
hokein committed rGbe895d5768d5: [pseudo] Add benchmarks for pseudoparser. (authored by hokein).
[pseudo] Add benchmarks for pseudoparser.
Tue, May 10, 5:16 AM · Restricted Project, Restricted Project
hokein closed D125226: [pseudo] Add benchmarks for pseudoparser..
Tue, May 10, 5:16 AM · Restricted Project, Restricted Project
hokein added a comment to D125226: [pseudo] Add benchmarks for pseudoparser..
Tue, May 10, 5:12 AM · Restricted Project, Restricted Project
hokein updated the summary of D125226: [pseudo] Add benchmarks for pseudoparser..
Tue, May 10, 2:59 AM · Restricted Project, Restricted Project
hokein added inline comments to D125226: [pseudo] Add benchmarks for pseudoparser..
Tue, May 10, 2:58 AM · Restricted Project, Restricted Project
hokein updated the diff for D125226: [pseudo] Add benchmarks for pseudoparser..

address comments

Tue, May 10, 2:57 AM · Restricted Project, Restricted Project

Mon, May 9

hokein added a comment to D125231: [pseudo] Compile cxx grammar..

This is just a prototype, wanting some early feedback before making further progress:

  • compiling the generated Cxx.cpp is very slow (took minutes, mostly due to the LRTable::Actions);
  • layering (location of the generated header file) is not super clear;
Mon, May 9, 7:18 AM · Restricted Project, Restricted Project
hokein requested review of D125231: [pseudo] Compile cxx grammar..
Mon, May 9, 7:15 AM · Restricted Project, Restricted Project
hokein requested review of D125226: [pseudo] Add benchmarks for pseudoparser..
Mon, May 9, 6:07 AM · Restricted Project, Restricted Project
hokein accepted D125166: [clang-fuzzer] Add a tiny tool to generate a fuzzing dictionary for clang.
Mon, May 9, 12:25 AM · Restricted Project, Restricted Project

Fri, May 6

hokein accepted D125080: [FuzzMutate] Move LLVM module (de)serialization from FuzzerCLI -> IRMutator. NFC.
Fri, May 6, 2:41 AM · Restricted Project, Restricted Project
hokein accepted D125081: [FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR..

This looks a reasonable split to me!

Fri, May 6, 2:39 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Thu, May 5

hokein accepted D125049: [pseudo] Only expand UCNs for raw_identifiers.
Thu, May 5, 10:30 PM · Restricted Project, Restricted Project
hokein accepted D125037: [pseudo] Add fuzzer for the pseudoparser..

Nice!

Thu, May 5, 10:25 PM · Restricted Project, Restricted Project
hokein accepted D125059: [Lex] Don't assert when decoding invalid UCNs..
Thu, May 5, 10:19 PM · Restricted Project, Restricted Project, Restricted Project
hokein accepted D125040: [Support] Fix UB in BumpPtrAllocator when first allocation is zero..
Thu, May 5, 10:16 PM · Restricted Project, Restricted Project
hokein accepted D124955: [clang-tidy] Make header-guard check a little looser on comment whitespace.

I think "// FOO_BAR_H" in your message should be "// FOO_BAR_H" (two space).

Thu, May 5, 6:14 AM · Restricted Project, Restricted Project
hokein requested review of D125006: [pseudo] Support parsing variant target symbols..
Thu, May 5, 5:29 AM · Restricted Project, Restricted Project
hokein accepted D124974: [clang] Include clang config.h in LangStandards.cpp.

Thanks!

Thu, May 5, 12:33 AM · Restricted Project, Restricted Project

Tue, May 3

hokein accepted D123243: [pseudo] Strip directives from a token stream.

would be nice to land it in some of form.

Tue, May 3, 1:45 PM · Restricted Project, Restricted Project
hokein committed rGc4546091ed29: [pseudo] Use a real language option in the parser. (authored by hokein).
[pseudo] Use a real language option in the parser.
Tue, May 3, 1:25 PM · Restricted Project, Restricted Project
hokein closed D124831: [pseudo] Use a real language option in the parser..
Tue, May 3, 1:25 PM · Restricted Project, Restricted Project
hokein updated the diff for D124831: [pseudo] Use a real language option in the parser..

rebase

Tue, May 3, 1:12 PM · Restricted Project, Restricted Project
hokein committed rGed1b32791dbb: [pseudo] Print the GSS::Node details when the unittest fails, NFC. (authored by hokein).
[pseudo] Print the GSS::Node details when the unittest fails, NFC.
Tue, May 3, 1:07 PM · Restricted Project, Restricted Project
hokein committed rG9f38da258ea7: [pseudo] Implement the GLR parsing algorithm. (authored by hokein).
[pseudo] Implement the GLR parsing algorithm.
Tue, May 3, 11:28 AM · Restricted Project, Restricted Project
hokein added a reverting change for rGeac22d0754f7: [pseudo] Implement the GLR parsing algorithm.: rG860eabb3953a: Revert "[pseudo] Implement the GLR parsing algorithm.".
Tue, May 3, 6:55 AM · Restricted Project, Restricted Project
hokein committed rG860eabb3953a: Revert "[pseudo] Implement the GLR parsing algorithm." (authored by hokein).
Revert "[pseudo] Implement the GLR parsing algorithm."
Tue, May 3, 6:55 AM · Restricted Project, Restricted Project
hokein added a reverting change for D121150: [pseudo] Implement the GLR parsing algorithm.: rG860eabb3953a: Revert "[pseudo] Implement the GLR parsing algorithm.".
Tue, May 3, 6:55 AM · Restricted Project, Restricted Project, Restricted Project
hokein committed rGeac22d0754f7: [pseudo] Implement the GLR parsing algorithm. (authored by sammccall).
[pseudo] Implement the GLR parsing algorithm.
Tue, May 3, 6:43 AM · Restricted Project, Restricted Project
hokein closed D121150: [pseudo] Implement the GLR parsing algorithm..
Tue, May 3, 6:43 AM · Restricted Project, Restricted Project, Restricted Project
hokein updated the diff for D121150: [pseudo] Implement the GLR parsing algorithm..

fix a dangling reference of the source text in clang-pseudo.

Tue, May 3, 6:39 AM · Restricted Project, Restricted Project, Restricted Project
hokein added inline comments to D121150: [pseudo] Implement the GLR parsing algorithm..
Tue, May 3, 6:32 AM · Restricted Project, Restricted Project, Restricted Project
hokein retitled D121150: [pseudo] Implement the GLR parsing algorithm. from [pseudo][WIP] Implement a GLR parser. to [pseudo] Implement the GLR parsing algorithm. .
Tue, May 3, 6:27 AM · Restricted Project, Restricted Project, Restricted Project
hokein updated the diff for D121150: [pseudo] Implement the GLR parsing algorithm..

address remaining comments:

  • return GSS::node in the NewHeadCallback, rather the fields of GSS::Node;
  • remove the unncessary NewHeadResult structure in unittest;
Tue, May 3, 6:26 AM · Restricted Project, Restricted Project, Restricted Project
hokein committed rGb18abde8ada1: [pseudo] Simplify the forest dump, NFC. (authored by hokein).
[pseudo] Simplify the forest dump, NFC.
Tue, May 3, 5:15 AM · Restricted Project, Restricted Project
hokein closed D124827: [pseudo] Simplify the forest dump, NFC..
Tue, May 3, 5:15 AM · Restricted Project, Restricted Project
hokein requested review of D124831: [pseudo] Use a real language option in the parser..
Tue, May 3, 1:41 AM · Restricted Project, Restricted Project
hokein requested review of D124827: [pseudo] Simplify the forest dump, NFC..
Tue, May 3, 1:08 AM · Restricted Project, Restricted Project

Mon, May 2

hokein updated the diff for D121150: [pseudo] Implement the GLR parsing algorithm..

Fix the bad format from lint.

Mon, May 2, 12:47 PM · Restricted Project, Restricted Project, Restricted Project
hokein updated the diff for D121150: [pseudo] Implement the GLR parsing algorithm..
  • a derived version of D122408 and D121368;
  • refine the APIs, getting rid of the GLR parser, and providing fine-grained pieces to allow writing tests easier;
  • add unittests for the algorithm and a simple smoke lit test;
  • when we fail to parse the input, we return an opaque forest node rather than a nullptr;
  • rebase to the main branch;
Mon, May 2, 12:35 PM · Restricted Project, Restricted Project, Restricted Project

Apr 27 2022

hokein committed rG8052f4d22a12: [AST] Consider QualifiedTemplateName in TemplateName::getAsUsingDecl(). (authored by hokein).
[AST] Consider QualifiedTemplateName in TemplateName::getAsUsingDecl().
Apr 27 2022, 5:16 AM · Restricted Project, Restricted Project, Restricted Project
hokein closed D124437: [AST] Consider QualifiedTemplateName in TemplateName::getAsUsingDecl()..
Apr 27 2022, 5:16 AM · Restricted Project, Restricted Project, Restricted Project
hokein updated the diff for D124437: [AST] Consider QualifiedTemplateName in TemplateName::getAsUsingDecl()..

Fix the broken test.

Apr 27 2022, 4:45 AM · Restricted Project, Restricted Project, Restricted Project

Apr 26 2022

hokein committed rG910fb5d7e03a: [pseudo] NFC, fix some code-style naming violations. (authored by hokein).
[pseudo] NFC, fix some code-style naming violations.
Apr 26 2022, 1:51 AM · Restricted Project, Restricted Project
hokein committed rGd6f9000ecabe: [clang] Fix a constant evaluator crash on a NULL-type expr. (authored by hokein).
[clang] Fix a constant evaluator crash on a NULL-type expr.
Apr 26 2022, 1:23 AM · Restricted Project, Restricted Project
hokein closed D124384: [clang] Fix a constant evaluator crash on a NULL-type expr..
Apr 26 2022, 1:23 AM · Restricted Project, Restricted Project
hokein added a comment to D124384: [clang] Fix a constant evaluator crash on a NULL-type expr..

This is a reasonable immediate fix, but creating null-typed expressions that live *outside* the recoveryexpr seems scary, and likely to violate expected invariants elsewhere too...

Apr 26 2022, 1:07 AM · Restricted Project, Restricted Project
hokein requested review of D124437: [AST] Consider QualifiedTemplateName in TemplateName::getAsUsingDecl()..
Apr 26 2022, 12:36 AM · Restricted Project, Restricted Project, Restricted Project

Apr 25 2022

hokein requested review of D124384: [clang] Fix a constant evaluator crash on a NULL-type expr..
Apr 25 2022, 6:45 AM · Restricted Project, Restricted Project

Apr 22 2022

hokein committed rG864752cfeba4: [AST] QualifiedTemplateName::getTemplateDecl cleanup. (authored by hokein).
[AST] QualifiedTemplateName::getTemplateDecl cleanup.
Apr 22 2022, 5:29 AM · Restricted Project, Restricted Project
hokein closed D124238: [AST] QualifiedTemplateName::getTemplateDecl cleanup..
Apr 22 2022, 5:29 AM · Restricted Project, Restricted Project
hokein updated the diff for D124238: [AST] QualifiedTemplateName::getTemplateDecl cleanup..

address comments

Apr 22 2022, 5:28 AM · Restricted Project, Restricted Project
hokein requested review of D124238: [AST] QualifiedTemplateName::getTemplateDecl cleanup..
Apr 22 2022, 1:36 AM · Restricted Project, Restricted Project

Apr 21 2022

hokein committed rG84051d8226d5: [clangd] Fix a declare-constructor tweak crash on incomplete fields. (authored by hokein).
[clangd] Fix a declare-constructor tweak crash on incomplete fields.
Apr 21 2022, 10:52 AM · Restricted Project, Restricted Project