Skip to content

Commit 3b5d8d5

Browse files
Merge branch 'master' into feat-optional-chaining
2 parents 05790ae + 13358c6 commit 3b5d8d5

Some content is hidden

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

47 files changed

+860
-163
lines changed

.github/ISSUE_TEMPLATE/01-bug.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Bug report
2+
description: Report a general bug in ChakraCore
3+
title: '[Bug]: '
4+
labels:
5+
- Bug
6+
body:
7+
- type: input
8+
attributes:
9+
label: ChakraCore Version
10+
description: Specify the version of ChakraCore you are using
11+
placeholder: Version / Commit id
12+
validations:
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Steps to reproduce
17+
description: Provide steps to reproduce the problem
18+
placeholder: Instructions used to build and execute / Project setup
19+
validations:
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: Proof of concept
24+
description: Your POC code
25+
render: js
26+
validations:
27+
required: true
28+
- type: textarea
29+
attributes:
30+
label: Exception or Error
31+
description: Provide error logs / console output
32+
render: text
33+
validations:
34+
required: true
35+
- type: textarea
36+
attributes:
37+
label: Additional Context
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build Issue
2+
description: Report a build issue
3+
title: '[Build]: '
4+
labels:
5+
- Build Break
6+
body:
7+
- type: input
8+
attributes:
9+
label: Operating System
10+
description: Specify the OS (with version) you are using
11+
placeholder: Name + Version
12+
validations:
13+
required: true
14+
- type: input
15+
attributes:
16+
label: Compiler
17+
description: Specify the compiler (with version) you are using
18+
placeholder: Name + Version
19+
validations:
20+
required: true
21+
- type: input
22+
attributes:
23+
label: ChakraCore Version
24+
description: Specify the version of ChakraCore you are using
25+
placeholder: Version / Commit id
26+
validations:
27+
required: true
28+
- type: textarea
29+
attributes:
30+
label: Compiler output
31+
render: shell
32+
validations:
33+
required: true
34+
- type: textarea
35+
attributes:
36+
label: Additional Context
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Api Bug
2+
description: Report a bug with the embedding api
3+
title: '[Api]: '
4+
labels:
5+
- APIs
6+
- Bug
7+
body:
8+
- type: input
9+
attributes:
10+
label: Operating System
11+
description: Specify the OS (with version) you are using
12+
placeholder: Name + Version
13+
validations:
14+
required: true
15+
- type: input
16+
attributes:
17+
label: ChakraCore Version
18+
description: Specify the version of ChakraCore you are using
19+
placeholder: Version / Commit id
20+
validations:
21+
required: true
22+
- type: textarea
23+
attributes:
24+
label: Steps to reproduce
25+
description: Please describe how your project is set-up
26+
validations:
27+
required: true
28+
- type: textarea
29+
attributes:
30+
label: Proof of concept
31+
description: Add some minimal poc that triggers the bug
32+
render: cpp
33+
validations:
34+
required: true
35+
- type: textarea
36+
attributes:
37+
label: Additional context
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Api Feature Request
2+
description: Propose a new feature to the embedding api
3+
title: '[Api]: '
4+
labels:
5+
- APIs
6+
- Feature Request
7+
body:
8+
- type: textarea
9+
attributes:
10+
label: Description
11+
description: A clear and concise description of the problem or missing capability
12+
validations:
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Describe the solution you'd like
17+
description: If you have a solution in mind, please describe it.
18+
- type: textarea
19+
attributes:
20+
label: Describe alternatives you've considered
21+
description: Have you considered any alternative solutions or workarounds?
22+
- type: textarea
23+
attributes:
24+
label: Additional context
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Implement tc39 proposal
2+
description: Request the implementation of a tc39 proposal
3+
title: '[Proposal]: '
4+
labels:
5+
- ECMAScript Spec
6+
- Feature Request
7+
body:
8+
- type: input
9+
attributes:
10+
label: Link to proposal
11+
placeholder: https://github.com/tc39/...
12+
validations:
13+
required: true
14+
- type: dropdown
15+
attributes:
16+
label: Proposal stage
17+
options:
18+
- Stage 4
19+
- Stage 3
20+
- Stage 2.7
21+
- Stage 2
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: Additional Context

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Discord
4+
url: https://discord.gg/dgRawPdNuC
5+
about: If you have any questions, feel free to join our Discord server.

CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ else(NOT CHAKRACORE_BUILD_SH)
3939
unset(LIBS_ONLY_BUILD_SH CACHE)
4040
set(CC_LIBS_ONLY_BUILD 1)
4141
endif()
42+
43+
if (CLANG_SANITIZE_SH)
44+
set(CLANG_SANITIZE ${CLANG_SANITIZE_SH})
45+
unset(CLANG_SANITIZE_SH CACHE)
46+
endif()
47+
4248
endif(NOT CHAKRACORE_BUILD_SH)
4349

4450
if(CC_USES_SYSTEM_ARCH_SH OR NOT CHAKRACORE_BUILD_SH)
@@ -573,12 +579,11 @@ endif()
573579
include_directories(SYSTEM /usr/local/include)
574580
include(pal/src/configure.cmake)
575581

576-
# this should be after `detect feature` to not to affect feature detection
577-
# Clang -fsanitize.
578-
if (CLANG_SANITIZE_SH)
582+
# Clang sanitizer support, this should be after `detect feature` to not to
583+
# affect feature detection
584+
if (CLANG_SANITIZE)
579585
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${CLANG_SANITIZE_SH}")
580586
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fsanitize=${CLANG_SANITIZE_SH}")
581-
unset(CLANG_SANITIZE_SH CACHE) # don't cache
582587
endif()
583588

584589
add_subdirectory (pal)

azure-pipelines.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------------------------------
2-
# Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
2+
# Copyright (c) ChakraCore Project Contributors. All rights reserved.
33
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44
#-------------------------------------------------------------------------------------------------------
55

@@ -32,17 +32,32 @@ jobs:
3232
strategy:
3333
maxParallel: 6
3434
matrix:
35+
Linux.Debug:
36+
image_name: 'ubuntu-22.04'
37+
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
38+
build_type: 'Debug'
39+
libtype_flag: ''
3540
Linux.NoJit:
36-
image_name: 'ubuntu-20.04'
41+
image_name: 'ubuntu-22.04'
3742
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
3843
build_type: 'Debug'
3944
libtype_flag: '-DDISABLE_JIT=ON'
4045
Linux.ReleaseWithDebug:
41-
image_name: 'ubuntu-20.04'
46+
image_name: 'ubuntu-22.04'
4247
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
4348
build_type: 'RelWithDebInfo'
4449
libtype_flag: ''
4550
Linux.Release:
51+
image_name: 'ubuntu-22.04'
52+
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
53+
build_type: 'Release'
54+
libtype_flag: ''
55+
Ubuntu20.ReleaseWithDebug:
56+
image_name: 'ubuntu-20.04'
57+
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
58+
build_type: 'RelWithDebInfo'
59+
libtype_flag: ''
60+
Ubuntu20.Release:
4661
image_name: 'ubuntu-20.04'
4762
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
4863
build_type: 'Release'
@@ -87,6 +102,9 @@ jobs:
87102
ninja
88103
displayName: 'Build'
89104
105+
- publish: $(System.DefaultWorkingDirectory)/build/bin
106+
artifact: $(Agent.JobName)
107+
90108
- script: |
91109
cd build
92110
ninja check
@@ -104,62 +122,71 @@ jobs:
104122
special_build: ''
105123
do_test: true
106124
test_tags: ''
125+
build_outdir_suffix: ''
107126
x86.Test:
108127
image_name: 'windows-2022'
109128
build_type: 'test'
110129
target: 'x86'
111130
special_build: ''
112131
do_test: true
113132
test_tags: '--include-slow'
133+
build_outdir_suffix: ''
114134
x86.NoJit:
115135
image_name: 'windows-2022'
116136
build_type: 'debug'
117137
target: 'x86'
118138
special_build: '"/p:BuildJIT=false"'
119139
do_test: true
120140
test_tags: '-disablejit'
141+
build_outdir_suffix: '.NoJIT'
121142
x86.Release:
122143
image_name: 'windows-2022'
123144
build_type: 'release'
124145
target: 'x86'
125146
special_build: ''
126147
do_test: false
127148
test_tags: ''
149+
build_outdir_suffix: ''
128150
x64.Debug:
129151
image_name: 'windows-2022'
130152
build_type: 'debug'
131153
target: 'x64'
132154
special_build: ''
133155
do_test: true
134156
test_tags: ''
157+
build_outdir_suffix: ''
135158
x64.Test:
136159
image_name: 'windows-2022'
137160
build_type: 'test'
138161
target: 'x64'
139162
special_build: ''
140163
do_test: true
141164
test_tags: '--include-slow'
165+
build_outdir_suffix: ''
142166
x64.Release:
143167
image_name: 'windows-2022'
144168
build_type: 'release'
145169
target: 'x64'
146170
special_build: ''
147171
do_test: false
148172
test_tags: ''
173+
build_outdir_suffix: ''
149174
win19.x86.Release:
150175
image_name: 'windows-2019'
151176
build_type: 'release'
152177
target: 'x86'
153178
special_build: ''
154179
do_test: false
155180
test_tags: ''
181+
build_outdir_suffix: ''
156182
win19.x64.Release:
157183
image_name: 'windows-2019'
158184
build_type: 'release'
159185
target: 'x64'
160186
special_build: ''
161187
do_test: false
162188
test_tags: ''
189+
build_outdir_suffix: ''
163190
pool:
164191
vmImage: $(image_name)
165192

@@ -171,6 +198,9 @@ jobs:
171198
BUILD: $(build_type)
172199
SPECIAL: $(special_build)
173200

201+
- publish: $(System.DefaultWorkingDirectory)/Build/VcBuild$(build_outdir_suffix)/bin
202+
artifact: $(Agent.JobName)
203+
174204
- script: test\ci.testone.cmd %TARGET% %BUILD% %TEST_TAGS%
175205
displayName: 'Test'
176206
condition: eq(variables['do_test'], true)

bin/NativeTests/stdafx.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56

@@ -25,11 +26,16 @@
2526

2627
#define DebugOnly(x) x
2728

29+
#if !defined(CHAKRACORE_STRINGIZE)
30+
#define CHAKRACORE_STRINGIZE_IMPL(x) #x
31+
#define CHAKRACORE_STRINGIZE(x) CHAKRACORE_STRINGIZE_IMPL(x)
32+
#endif
33+
2834
#define AssertMsg(exp, comment) \
2935
do { \
3036
if (!(exp)) \
3137
{ \
32-
fprintf(stderr, "ASSERTION (%s, line %d) %s %s\n", __FILE__, __LINE__, _STRINGIZE(exp), comment); \
38+
fprintf(stderr, "ASSERTION (%s, line %d) %s %s\n", __FILE__, __LINE__, CHAKRACORE_STRINGIZE(exp), comment); \
3339
fflush(stderr); \
3440
DebugBreak(); \
3541
} \

bin/ch/stdafx.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3-
// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
44
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
55
//-------------------------------------------------------------------------------------------------------
66
#pragma once
@@ -57,16 +57,16 @@
5757

5858
#if defined(DBG)
5959

60-
#define _STRINGIZE_(x) #x
61-
#if !defined(_STRINGIZE)
62-
#define _STRINGIZE(x) _STRINGIZE_(x)
60+
#if !defined(CHAKRACORE_STRINGIZE)
61+
#define CHAKRACORE_STRINGIZE_IMPL(x) #x
62+
#define CHAKRACORE_STRINGIZE(x) CHAKRACORE_STRINGIZE_IMPL(x)
6363
#endif
6464

6565
#define AssertMsg(exp, comment) \
6666
do { \
6767
if (!(exp)) \
6868
{ \
69-
fprintf(stderr, "ASSERTION (%s, line %d) %s %s\n", __FILE__, __LINE__, _STRINGIZE(exp), comment); \
69+
fprintf(stderr, "ASSERTION (%s, line %d) %s %s\n", __FILE__, __LINE__, CHAKRACORE_STRINGIZE(exp), comment); \
7070
fflush(stderr); \
7171
DebugBreak(); \
7272
} \

0 commit comments

Comments
 (0)