John Keiser
751696d7eb
Move implementation selection to implementations.h
2021-03-09 09:10:08 -08:00
John Keiser
985dfab2c4
Don't use TARGET unless the target options are *not* specified
...
This eliminates the possibility of inlining target failures for ondemand
Also makes it so we always compile common architectures needed by simdjson.cpp in simdjson.h, since amalgamation has no way to reason about whether to include / exclude it.
2021-03-08 13:49:09 -08:00
John Keiser
633161fe86
Don't include target flags if the compiler already has them on
2021-03-08 13:48:58 -08:00
John Keiser
f51d50399c
Only include builtin implementation from header
2021-03-08 13:48:53 -08:00
John Keiser
cf4e538536
Separate builtin implementation from "all implementations"
2021-03-06 13:08:42 -08:00
John Keiser
ec5ba79447
Add base.h to allow src/ to pick and choose includes
2021-03-05 11:48:34 -08:00
John Keiser
bad582c2d3
Add value.raw_json_token()
2021-03-05 09:07:41 -08:00
John Keiser
f55893807a
Merge pull request #1473 from simdjson/jkeiser/promise-padded
...
Support user-provided buffers in On Demand
2021-03-04 20:56:34 -08:00
Daniel Lemire
dc2f767171
Ensuring that stage 1's json_block and cie are never copied and using explicit constructors (issue 1475) ( #1478 )
2021-03-04 07:59:36 -05:00
John Keiser
f0e92e3bdd
Pass "capacity" straight to iterate, support std::string
2021-03-03 12:51:00 -08:00
John Keiser
3db1a214ce
Support user-provided buffers via promise_padded
2021-03-03 12:50:56 -08:00
John Keiser
665514692a
Remove UTF-8 from source code
2021-03-03 12:10:59 -08:00
John Keiser
9944db6d73
Move json_type to ondemand to prevent target mismatch inline errors
2021-03-02 18:31:17 -08:00
John Keiser
2ed24666b5
Add value.type()
2021-03-02 17:02:50 -08:00
John Keiser
29fe1866ef
Move dom / implementations include into their own spots
2021-03-02 09:53:28 -08:00
Daniel Lemire
4811c8036b
Update the tape description and the dump_tape function ( #1465 )
...
* Would fix issue 1446
* Trimming spaces.
2021-03-01 18:47:11 -05:00
rychale
9d22372cc9
Make dom::document_stream::iterator copyable and default-constructible by holding pointer to document_stream instead of ref ( #1463 )
...
Co-authored-by: Alexey Rychkov <arychkov@defytrading.com>
2021-03-01 14:40:51 -05:00
Daniel Lemire
9577c54999
Provide the CMake install the necessarily information (and flags) to hand Windows DLL and add Windows installation tests ( #1457 )
...
* This gives the CMake install the necessarily information (and flags) to know
whether we have a Windows DLL and in such cases how to handle the linkage.
2021-02-26 16:17:05 -05:00
Daniel Lemire
ef1e256fa7
Workaround for SIMDJSON_ASSUME "side-effect" warning under some compilers. ( #1456 )
2021-02-25 08:50:57 -05:00
Daniel Lemire
ad37651726
Guarding undefined templates with a static_assert. ( #1454 )
...
* Guarding undefined templates with a static_assert.
* Fixing comments.
* Undeprecating (or whatever you want to call it).
2021-02-22 16:54:47 -05:00
John Keiser
cdb607f202
Add comments on confusing "simdjson_unused"
2021-02-22 09:39:09 -08:00
John Keiser
bcab8d3abf
Check for end object/array at top level
...
This avoids a very unlikely buffer overrun that can occur in a particular kind of invalid JSON:
- the document is invalid with an unclosed top level array or object
- the last thing in the document is a number that ends at EOF
- the padding is filled entirely with numeric digits
2021-02-22 09:35:21 -08:00
John Keiser
9d747642fe
Merge pull request #1452 from simdjson/jkeiser/safe-iter-fix
...
Fix bug reporting out of order iteration
2021-02-22 09:34:49 -08:00
John Keiser
a755203aee
Update value_iterator-inl.h
2021-02-22 09:34:20 -08:00
John Keiser
814726e5d4
Merge pull request #1432 from simdjson/jkeiser/safe-lookup
...
Alert user when they use object indexing incorrectly
2021-02-22 09:31:59 -08:00
John Keiser
c4a312e6c3
Fix strict overflow warning
2021-02-21 14:06:58 -08:00
Daniel Lemire
81609393f1
Fixing issue 1449. ( #1451 )
2021-02-21 16:33:05 -05:00
John Keiser
0634958329
Don't emit out of order iteration error for empty array
2021-02-21 11:43:36 -08:00
John Keiser
b352b903e7
Fix bug where iterators didn't always report errors
2021-02-21 11:43:36 -08:00
John Keiser
3076de0405
Use SIMDJSON_DEVELOPMENT_CHECKS instead of SIMDJSON_PRODUCTION
...
Don't enable in retail
2021-02-20 11:46:01 -08:00
Daniel Lemire
610b3ad302
Adds Visual Studio 2017 to CI (for real) and adapt our build/tests ( #1444 )
2021-02-15 19:49:12 -05:00
Daniel Lemire
4c63a929bc
This makes it possible to a have document instance (DOM) that is separate from the parser if you would like. ( #1430 )
...
* This makes it possible to a have document instance that is separate from the parser if you would like.
2021-02-10 14:44:53 -05:00
John Keiser
df7201ba42
Fix Windows assume error
2021-02-06 11:06:53 -08:00
John Keiser
14315ec5cd
Default SIMDJSON_PRODUCTION to OFF for bare header usage
2021-02-06 11:06:37 -08:00
John Keiser
0f10fc9ad9
Fix Windows _assume warning
2021-02-05 18:53:39 -08:00
John Keiser
ce678fd986
Fix GCC 7 strict-overflow warning
2021-02-05 18:53:31 -08:00
John Keiser
9d693da852
Only set container depth when a container iteration starts
2021-02-05 17:20:24 -08:00
John Keiser
22742b6bd6
Make max_depth() a simple check
2021-02-05 17:11:03 -08:00
John Keiser
3801ea7777
Disable all OUT_OF_ORDER_ITERATION checks when SIMDJSON_API_USAGE_CHECKS
...
is off
2021-02-05 16:39:44 -08:00
John Keiser
c7935ceed1
Put parser capacity / max_depth back into parser
2021-02-05 16:39:36 -08:00
John Keiser
ea119a5679
Start parsing at depth 1 instead of using descend_to for it
2021-02-05 16:39:34 -08:00
John Keiser
0d1c99a6ad
Allow object lookup safety to be disabled
...
Use cmake -DSIMDJSON_API_USAGE_CHECKS=OFF ..
2021-02-05 10:18:01 -08:00
John Keiser
e4626d233c
Descend into fields at the value position, not the key
2021-02-05 10:18:01 -08:00
John Keiser
9934f65987
Store start index of each depth for safety
2021-02-05 10:17:28 -08:00
John Keiser
b2de2dfd1b
Merge pull request #1416 from simdjson/jkeiser/safe-iterators-2
...
Add safety checks for out of order array/object iteration+indexing
2021-02-05 09:47:03 -08:00
John Keiser
3f2639a655
Merge pull request #1414 from simdjson/jkeiser/array-assert
...
Fix #1409 (assert when trying to get one value as multiple types)
2021-02-05 09:45:49 -08:00
Daniel Lemire
96536239c2
Deleting the function. ( #1428 )
2021-02-02 09:48:01 -05:00
Daniel Lemire
0e18453e34
Potential optimizations applied to jkeiser/array-assert ( #1421 )
...
* Some tuning.
* Using table lookups...
2021-02-01 12:39:10 -05:00
Daniel Lemire
777202e1f1
Why would you use a reference when looping? ( #1422 )
...
* Why would you use a reference?
* I missed a few cases.
2021-02-01 12:30:36 -05:00
Daniel Lemire
6f61ed1477
It appears that Qt uses macros for common terms like slots, signals and so forth. ( #1425 )
2021-02-01 11:31:29 -05:00