Skip to content

Commit cc75c28

Browse files
guangwongoraluben
authored andcommitted
feat: merge alinode pgo feat
1 parent dadbde9 commit cc75c28

103 files changed

Lines changed: 15539 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ test-cov: all
329329
$(MAKE) cctest
330330
CI_SKIP_TESTS=$(COV_SKIP_TESTS) $(MAKE) jstest
331331

332+
.PHONY: test-pgo-js
333+
test-pgo-js: all
334+
ENABLE_NODE_LOG=YES $(PYTHON) tools/test.py --mode=release --flaky-tests=dontcare -J pgo
335+
332336
.PHONY: test-parallel
333337
test-parallel: all
334338
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) parallel

NOTICE

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
AIWWR-Node is developed by Alibaba and based on the Node.js project.
2+
Copyright (c) 2022, Alibaba Group.
3+
All changes licensed under MIT License.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to
7+
deal in the Software without restriction, including without limitation the
8+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9+
sell copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21+
IN THE SOFTWARE.
22+
23+
24+
The externally maintained libraries used by AIWWR-Node are:
25+
26+
- Cwalk, located at deps/cwalk, is licensed as follows:
27+
"""
28+
MIT License
29+
30+
Copyright (c) 2020 Leonard Iklé
31+
32+
Permission is hereby granted, free of charge, to any person obtaining a copy
33+
of this software and associated documentation files (the "Software"), to deal
34+
in the Software without restriction, including without limitation the rights
35+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36+
copies of the Software, and to permit persons to whom the Software is
37+
furnished to do so, subject to the following conditions:
38+
39+
The above copyright notice and this permission notice shall be included in all
40+
copies or substantial portions of the Software.
41+
42+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48+
SOFTWARE.
49+
"""

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,3 +807,10 @@ license text.
807807
[Strategic initiatives]: doc/contributing/strategic-initiatives.md
808808
[Technical values and prioritization]: doc/contributing/technical-values.md
809809
[Working Groups]: https://github.com/nodejs/TSC/blob/HEAD/WORKING_GROUPS.md
810+
811+
812+
## AIWWR-Node
813+
814+
AIWWR-Node is developed by Alibaba and based on the Node.js project.
815+
All changes licensed under the MIT License.
816+
See the NOTICE file for more information.

deps/cwalk/CMakeLists.txt

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
cmake_minimum_required(VERSION 3.9.2)
2+
3+
# set project name
4+
project(cwalk
5+
VERSION 1.2.5
6+
DESCRIPTION "A simple path library"
7+
LANGUAGES C)
8+
9+
# include utilities
10+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
11+
include(EnableWarnings)
12+
include(CTest)
13+
include(CreateTestList)
14+
include(CMakePackageConfigHelpers)
15+
16+
# configure requirements
17+
set(CMAKE_C_STANDARD 11)
18+
19+
# setup target and directory names
20+
set(INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include")
21+
set(SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src")
22+
set(TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
23+
24+
# enable coverage if requested
25+
if(ENABLE_COVERAGE)
26+
message("-- Coverage enabled")
27+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
28+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
29+
endif()
30+
31+
# enable sanitizer
32+
if(ENABLE_SANITIZER)
33+
message("-- Sanitizer enabled")
34+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fsanitize=${ENABLE_SANITIZER}")
35+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=${ENABLE_SANITIZER}")
36+
endif()
37+
38+
# add the main executable
39+
add_library(cwalk
40+
"${INCLUDE_DIRECTORY}/cwalk.h"
41+
"${SOURCE_DIRECTORY}/cwalk.c")
42+
enable_warnings(cwalk)
43+
target_include_directories(cwalk PUBLIC
44+
$<BUILD_INTERFACE:${INCLUDE_DIRECTORY}>
45+
$<INSTALL_INTERFACE:include>
46+
)
47+
set_target_properties(cwalk PROPERTIES PUBLIC_HEADER "${INCLUDE_DIRECTORY}/cwalk.h")
48+
set_target_properties(cwalk PROPERTIES DEFINE_SYMBOL CWK_EXPORTS)
49+
50+
# add shared library macro
51+
if(BUILD_SHARED_LIBS)
52+
target_compile_definitions(cwalk PUBLIC CWK_SHARED)
53+
endif()
54+
55+
# enable tests
56+
if(ENABLE_TESTS)
57+
message("-- Tests enabled")
58+
enable_testing()
59+
60+
create_test_list(DEFAULT cwalktest)
61+
create_test(DEFAULT absolute simple)
62+
create_test(DEFAULT absolute absolute_path)
63+
create_test(DEFAULT absolute unix_relative_base)
64+
create_test(DEFAULT absolute windows_relative_base)
65+
create_test(DEFAULT absolute mixed)
66+
create_test(DEFAULT absolute normalization)
67+
create_test(DEFAULT absolute too_far)
68+
create_test(DEFAULT absolute check)
69+
create_test(DEFAULT absolute buffer_reuse)
70+
create_test(DEFAULT basename simple)
71+
create_test(DEFAULT basename empty)
72+
create_test(DEFAULT basename trailing_separator)
73+
create_test(DEFAULT basename trailing_separators)
74+
create_test(DEFAULT basename no_separators)
75+
create_test(DEFAULT basename special_directories)
76+
create_test(DEFAULT basename root)
77+
create_test(DEFAULT basename windows)
78+
create_test(DEFAULT basename change_simple)
79+
create_test(DEFAULT basename change_empty_path)
80+
create_test(DEFAULT basename change_only_root)
81+
create_test(DEFAULT basename change_empty_basename)
82+
create_test(DEFAULT basename change_relative)
83+
create_test(DEFAULT basename change_trim)
84+
create_test(DEFAULT basename change_trim_only_root)
85+
create_test(DEFAULT dirname simple)
86+
create_test(DEFAULT dirname empty)
87+
create_test(DEFAULT dirname trailing_separator)
88+
create_test(DEFAULT dirname trailing_separators)
89+
create_test(DEFAULT dirname no_separators)
90+
create_test(DEFAULT dirname special_directories)
91+
create_test(DEFAULT dirname root)
92+
create_test(DEFAULT dirname three_segments)
93+
create_test(DEFAULT dirname relative)
94+
create_test(DEFAULT extension get_simple)
95+
create_test(DEFAULT extension get_without)
96+
create_test(DEFAULT extension get_first)
97+
create_test(DEFAULT extension get_last)
98+
create_test(DEFAULT extension get_multiple)
99+
create_test(DEFAULT extension check_simple)
100+
create_test(DEFAULT extension check_empty)
101+
create_test(DEFAULT extension check_without)
102+
create_test(DEFAULT extension change_simple)
103+
create_test(DEFAULT extension change_no_basename)
104+
create_test(DEFAULT extension change_no_extension)
105+
create_test(DEFAULT extension change_with_dot)
106+
create_test(DEFAULT extension change_overlap)
107+
create_test(DEFAULT extension change_overlap_long)
108+
create_test(DEFAULT extension change_hidden_file)
109+
create_test(DEFAULT extension change_with_trailing_slash)
110+
create_test(DEFAULT guess empty_string)
111+
create_test(DEFAULT guess windows_root)
112+
create_test(DEFAULT guess unix_root)
113+
create_test(DEFAULT guess windows_separator)
114+
create_test(DEFAULT guess unix_separator)
115+
create_test(DEFAULT guess hidden_file)
116+
create_test(DEFAULT guess extension)
117+
create_test(DEFAULT guess unguessable)
118+
create_test(DEFAULT intersection simple)
119+
create_test(DEFAULT intersection trailing_separator)
120+
create_test(DEFAULT intersection double_separator)
121+
create_test(DEFAULT intersection empty)
122+
create_test(DEFAULT intersection unequal_roots)
123+
create_test(DEFAULT intersection relative_absolute_mix)
124+
create_test(DEFAULT intersection same_roots)
125+
create_test(DEFAULT intersection one_root_only)
126+
create_test(DEFAULT intersection relative_base)
127+
create_test(DEFAULT intersection relative_other)
128+
create_test(DEFAULT intersection skipped_end)
129+
create_test(DEFAULT is_absolute absolute)
130+
create_test(DEFAULT is_absolute unc)
131+
create_test(DEFAULT is_absolute device_unc)
132+
create_test(DEFAULT is_absolute device_dot)
133+
create_test(DEFAULT is_absolute device_question_mark)
134+
create_test(DEFAULT is_absolute relative)
135+
create_test(DEFAULT is_absolute windows_backslash)
136+
create_test(DEFAULT is_absolute windows_slash)
137+
create_test(DEFAULT is_absolute unix_backslash)
138+
create_test(DEFAULT is_absolute unix_drive)
139+
create_test(DEFAULT is_absolute absolute_drive)
140+
create_test(DEFAULT is_absolute relative_drive)
141+
create_test(DEFAULT is_absolute relative_windows)
142+
create_test(DEFAULT is_relative absolute)
143+
create_test(DEFAULT is_relative unc)
144+
create_test(DEFAULT is_relative device_unc)
145+
create_test(DEFAULT is_relative device_dot)
146+
create_test(DEFAULT is_relative device_question_mark)
147+
create_test(DEFAULT is_relative relative)
148+
create_test(DEFAULT is_relative windows_backslash)
149+
create_test(DEFAULT is_relative windows_slash)
150+
create_test(DEFAULT is_relative unix_backslash)
151+
create_test(DEFAULT is_relative unix_drive)
152+
create_test(DEFAULT is_relative absolute_drive)
153+
create_test(DEFAULT is_relative relative_drive)
154+
create_test(DEFAULT is_relative relative_windows)
155+
create_test(DEFAULT join simple)
156+
create_test(DEFAULT join navigate_back)
157+
create_test(DEFAULT join empty)
158+
create_test(DEFAULT join two_absolute)
159+
create_test(DEFAULT join two_unc)
160+
create_test(DEFAULT join with_two_roots)
161+
create_test(DEFAULT join back_after_root)
162+
create_test(DEFAULT join relative_back_after_root)
163+
create_test(DEFAULT join multiple)
164+
create_test(DEFAULT normalize do_nothing)
165+
create_test(DEFAULT normalize navigate_back)
166+
create_test(DEFAULT normalize relative_too_far)
167+
create_test(DEFAULT normalize absolute_too_far)
168+
create_test(DEFAULT normalize terminated)
169+
create_test(DEFAULT normalize double_separator)
170+
create_test(DEFAULT normalize remove_current)
171+
create_test(DEFAULT normalize mixed)
172+
create_test(DEFAULT normalize overlap)
173+
create_test(DEFAULT normalize empty)
174+
create_test(DEFAULT normalize only_separators)
175+
create_test(DEFAULT normalize back_after_root)
176+
create_test(DEFAULT relative simple)
177+
create_test(DEFAULT relative relative)
178+
create_test(DEFAULT relative long_base)
179+
create_test(DEFAULT relative long_target)
180+
create_test(DEFAULT relative equal)
181+
create_test(DEFAULT relative base_skipped_end)
182+
create_test(DEFAULT relative target_skipped_end)
183+
create_test(DEFAULT relative base_div_skipped_end)
184+
create_test(DEFAULT relative target_div_skipped_end)
185+
create_test(DEFAULT relative skip_all)
186+
create_test(DEFAULT relative different_roots)
187+
create_test(DEFAULT relative relative_and_absolute)
188+
create_test(DEFAULT relative check)
189+
create_test(DEFAULT relative root_path_unix)
190+
create_test(DEFAULT relative root_path_windows)
191+
create_test(DEFAULT root absolute)
192+
create_test(DEFAULT root unc)
193+
create_test(DEFAULT root device_unc)
194+
create_test(DEFAULT root device_dot)
195+
create_test(DEFAULT root device_question_mark)
196+
create_test(DEFAULT root relative)
197+
create_test(DEFAULT root windows_backslash)
198+
create_test(DEFAULT root windows_slash)
199+
create_test(DEFAULT root unix_backslash)
200+
create_test(DEFAULT root unix_drive)
201+
create_test(DEFAULT root absolute_drive)
202+
create_test(DEFAULT root relative_drive)
203+
create_test(DEFAULT root relative_windows)
204+
create_test(DEFAULT root change_simple)
205+
create_test(DEFAULT root change_empty)
206+
create_test(DEFAULT root change_separators)
207+
create_test(DEFAULT root change_overlapping)
208+
create_test(DEFAULT root change_without_root)
209+
create_test(DEFAULT segment first)
210+
create_test(DEFAULT segment last)
211+
create_test(DEFAULT segment next)
212+
create_test(DEFAULT segment next_too_far)
213+
create_test(DEFAULT segment previous_absolute)
214+
create_test(DEFAULT segment previous_relative)
215+
create_test(DEFAULT segment previous_absolute_one_char_first)
216+
create_test(DEFAULT segment previous_relative_one_char_first)
217+
create_test(DEFAULT segment previous_too_far)
218+
create_test(DEFAULT segment previous_too_far_root)
219+
create_test(DEFAULT segment type)
220+
create_test(DEFAULT segment back_with_root)
221+
create_test(DEFAULT segment change_simple)
222+
create_test(DEFAULT segment change_first)
223+
create_test(DEFAULT segment change_last)
224+
create_test(DEFAULT segment change_trim)
225+
create_test(DEFAULT segment change_empty)
226+
create_test(DEFAULT segment change_with_separator)
227+
create_test(DEFAULT segment change_overlap)
228+
create_test(DEFAULT windows change_style)
229+
create_test(DEFAULT windows get_root)
230+
create_test(DEFAULT windows get_unc_root)
231+
create_test(DEFAULT windows get_root_separator)
232+
create_test(DEFAULT windows get_root_relative)
233+
create_test(DEFAULT windows intersection_case)
234+
create_test(DEFAULT windows root_backslash)
235+
create_test(DEFAULT windows root_empty)
236+
write_test_file(DEFAULT "${TEST_DIRECTORY}/tests.h")
237+
238+
add_executable(cwalktest
239+
"${TEST_DIRECTORY}/main.c"
240+
"${TEST_DIRECTORY}/absolute_test.c"
241+
"${TEST_DIRECTORY}/basename_test.c"
242+
"${TEST_DIRECTORY}/dirname_test.c"
243+
"${TEST_DIRECTORY}/extension_test.c"
244+
"${TEST_DIRECTORY}/guess_test.c"
245+
"${TEST_DIRECTORY}/intersection_test.c"
246+
"${TEST_DIRECTORY}/is_absolute_test.c"
247+
"${TEST_DIRECTORY}/is_relative_test.c"
248+
"${TEST_DIRECTORY}/join_test.c"
249+
"${TEST_DIRECTORY}/normalize_test.c"
250+
"${TEST_DIRECTORY}/relative_test.c"
251+
"${TEST_DIRECTORY}/root_test.c"
252+
"${TEST_DIRECTORY}/segment_test.c"
253+
"${TEST_DIRECTORY}/windows_test.c")
254+
enable_warnings(cwalktest)
255+
256+
target_link_libraries(cwalktest PRIVATE cwalk)
257+
endif()
258+
259+
write_basic_package_version_file("CwalkConfigVersion.cmake"
260+
VERSION ${cwalk_VERSION}
261+
COMPATIBILITY SameMajorVersion)
262+
263+
install(TARGETS cwalk
264+
EXPORT CwalkTargets
265+
RUNTIME DESTINATION bin
266+
LIBRARY DESTINATION lib
267+
ARCHIVE DESTINATION lib
268+
PUBLIC_HEADER DESTINATION include)
269+
270+
install(FILES
271+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/CwalkConfig.cmake"
272+
DESTINATION lib/cmake/cwalk)
273+
274+
install(EXPORT CwalkTargets
275+
FILE CwalkTargets.cmake
276+
DESTINATION lib/cmake/cwalk)

deps/cwalk/CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
All your contributions to **cwalk** are very welcome! **cwalk** is especially happy to
3+
receive contributions like:
4+
5+
* general **bugfixes**
6+
* simple **bug reports**
7+
* **proposing new features**
8+
* **questions** (there are no dumb questions)
9+
10+
## License
11+
**Any contributions you make will be under the MIT Software License.**
12+
13+
In short, when you submit code changes, your submissions are understood to be
14+
under the same MIT License that covers the project. Feel free to contact the
15+
maintainers if that's a concern.
16+
17+
## How to report a bug?
18+
You can just use the issue tracker to do so.
19+
20+
## How to propose a new feature?
21+
You can just use the issue tracker to do so.
22+
23+
## How to submit a bug fix?
24+
Just submit a pull-request! Try to make sure that the code style fits the
25+
surrounding code.
26+
27+
## How to submit a new feature?
28+
You probably want to create an issue first to discuss the change. All
29+
pull-requests will be considered though! Just try to make sure that the code
30+
style fits the surrounding code.

0 commit comments

Comments
 (0)