Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
9474ca44
Commit
9474ca44
authored
Aug 27, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix problems.
parent
7693365a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
16 deletions
+23
-16
capnp.c++
c++/src/capnp/compiler/capnp.c++
+3
-0
evolution-test.c++
c++/src/capnp/compiler/evolution-test.c++
+19
-15
exception.c++
c++/src/kj/exception.c++
+1
-1
No files found.
c++/src/capnp/compiler/capnp.c++
View file @
9474ca44
...
...
@@ -570,6 +570,7 @@ public:
}
context
.
exit
();
KJ_CLANG_KNOWS_THIS_IS_UNREACHABLE_BUT_GCC_DOESNT
;
}
private
:
...
...
@@ -690,6 +691,7 @@ public:
output
.
flush
();
context
.
exit
();
KJ_CLANG_KNOWS_THIS_IS_UNREACHABLE_BUT_GCC_DOESNT
;
}
kj
::
MainBuilder
::
Validity
evalConst
(
kj
::
StringPtr
type
)
{
...
...
@@ -724,6 +726,7 @@ public:
}
else
{
return
"no such type"
;
}
KJ_CLANG_KNOWS_THIS_IS_UNREACHABLE_BUT_GCC_DOESNT
;
}
private
:
...
...
c++/src/capnp/compiler/evolution-test.c++
View file @
9474ca44
...
...
@@ -739,18 +739,7 @@ bool checkChange(ParsedFile::Reader file1, ParsedFile::Reader file2, ChangeKind
}
}
kj
::
MainBuilder
::
Validity
doTest
(
uint
seed
)
{
srand
(
seed
);
{
kj
::
String
text
=
kj
::
str
(
"Randomly testing backwards-compatibility scenarios...
\n
"
"seed = "
,
seed
,
" <- PLEASE RECORD THIS NUMBER IF THE TEST FAILS
\n
"
);
kj
::
FdOutputStream
(
STDOUT_FILENO
).
write
(
text
.
begin
(),
text
.
size
());
}
KJ_CONTEXT
(
seed
,
"PLEASE REPORT THIS FAILURE AND INCLUDE THE SEED"
);
void
doTest
()
{
auto
builder
=
kj
::
heap
<
MallocMessageBuilder
>
();
{
...
...
@@ -840,8 +829,6 @@ kj::MainBuilder::Validity doTest(uint seed) {
builder
=
kj
::
mv
(
newBuilder
);
}
}
return
true
;
}
class
EvolutionTestMain
{
...
...
@@ -855,7 +842,7 @@ public:
"and verifies that they do actually remain compatible."
)
.
addOptionWithArg
({
"seed"
},
KJ_BIND_METHOD
(
*
this
,
setSeed
),
"<num>"
,
"Set random number seed to <num>. By default, time() is used."
)
.
callAfterParsing
(
[
this
]()
{
return
doTest
(
seed
);
}
)
.
callAfterParsing
(
KJ_BIND_METHOD
(
*
this
,
run
)
)
.
build
();
}
...
...
@@ -869,6 +856,23 @@ public:
}
}
kj
::
MainBuilder
::
Validity
run
()
{
srand
(
seed
);
{
kj
::
String
text
=
kj
::
str
(
"Randomly testing backwards-compatibility scenarios...
\n
"
"seed = "
,
seed
,
" <- PLEASE RECORD THIS NUMBER IF THE TEST FAILS
\n
"
);
kj
::
FdOutputStream
(
STDOUT_FILENO
).
write
(
text
.
begin
(),
text
.
size
());
}
KJ_CONTEXT
(
seed
,
"PLEASE REPORT THIS FAILURE AND INCLUDE THE SEED"
);
doTest
();
return
true
;
}
private
:
kj
::
ProcessContext
&
context
;
uint
seed
=
time
(
nullptr
);
...
...
c++/src/kj/exception.c++
View file @
9474ca44
...
...
@@ -292,7 +292,7 @@ inline RepeatChar KJ_STRINGIFY(RepeatChar value) { return value; }
ExceptionCallback
::
ExceptionCallback
()
:
next
(
getExceptionCallback
())
{
char
stackVar
;
ptrdiff_t
offset
=
reinterpret_cast
<
char
*>
(
this
)
-
&
stackVar
;
KJ_ASSERT
(
offset
<
4096
&&
offset
>
-
409
6
,
KJ_ASSERT
(
offset
<
65536
&&
offset
>
-
6553
6
,
"ExceptionCallback must be allocated on the stack."
);
threadLocalCallback
=
this
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment