Sami Vaarala
fcf8ce714d
Integer field for refzero_free_running
This is a hot flag so it's better as an integer field rather than a flag
in a heap bitfield.
8 years ago
Sami Vaarala
12f3d51db5
Minor cleanups for explicit scope objects
* Rework 'with' statement object environment setup.
* Checked allocation.
8 years ago
Sami Vaarala
3d58e1eb82
More warning fixes (MSVC /W4)
8 years ago
Sami Vaarala
9b5f86315d
Fix compile warnings for lazy charlen
8 years ago
Sami Vaarala
bdf7806c53
Checked object allocs, voluntary GC check tweak
8 years ago
Sami Vaarala
183cd7baa5
Improve voluntary GC check a bit
Better asm output at least on x64.
8 years ago
Sami Vaarala
57f10cef40
Remove refzero voluntary GC entirely
The free operations will decrement the voluntary GC counter which is then
checked on any allocation going forward.
8 years ago
Sami Vaarala
3d8678beae
Simplify DUK_OP_DECLVAR flags
8 years ago
Sami Vaarala
2f48d5f10e
Minimal fix for global/eval redeclare bug
8 years ago
Sami Vaarala
718c3990ae
Keep fastint status in duk_to_(u)int()
Previously a fastint lost its fastint status in duk_to_(u)int() coercion
which caused a _Varmap index to be a non-fastint for a redeclared global
variable. This further caused an assertion error.
8 years ago
Sami Vaarala
771f7fc1f5
Debug print fastints with a 'F' suffix
8 years ago
Sami Vaarala
25e376eb3a
Refuse recursive mark-and-sweep
8 years ago
Sami Vaarala
eaac8a1c36
Skip voluntary mark-and-sweep if already running
8 years ago
Sami Vaarala
417bf9ce84
Add explicit duk_{hdecenv,hobjenv} structures
8 years ago
Sami Vaarala
204399eabb
Mark executor interrupt DUK_COLD
8 years ago
Sami Vaarala
9d541578f4
Make duk_hstring charlen lazy
8 years ago
Sami Vaarala
041bdb8fcc
Small optimization of heap queueing code
8 years ago
Sami Vaarala
1a8c1b9493
Fix broken assert in duk_bi_string.c
8 years ago
Sami Vaarala
e3c5e97409
Fix duk_bi_string.c unused variable warning
8 years ago
Sami Vaarala
cd835575ff
Add String.prototype.includes()
8 years ago
Sami Vaarala
45427f19c8
Use ROM string hash lookup in intern check
8 years ago
Sami Vaarala
0bafeca05e
Add String.prototype.{startsWith,endsWith}
8 years ago
Sami Vaarala
64d6a324f2
Keep finalize_list up-to-date during its walk
8 years ago
Sami Vaarala
3af1862119
Fix ROM object incref with slow refcount default
8 years ago
Sami Vaarala
df192263cc
Expand duk_push_heapptr() pointer asserts
8 years ago
Sami Vaarala
02500e4161
Fix a few incorrect refzero finalizer asserts
8 years ago
Sami Vaarala
c6be26cc94
duk_api_stack.c likely/unlikely attributes
8 years ago
Sami Vaarala
3ca687a9c0
Make resize operations cold/unlikely
The actual resize events (call stack, etc) shouldn't be inlined because they
affect code locality and are very rarely triggered.
8 years ago
Sami Vaarala
58cf113c5e
Add likely/unlike to alloc failures
8 years ago
Sami Vaarala
7da48d5d68
Avoid DUK_UNREF() for volatile argument
8 years ago
Sami Vaarala
3b96bba923
Add cold attribute to error functions
8 years ago
Sami Vaarala
c8eb5926e5
Add ((hot)) attribute to bytecode executor
8 years ago
Sami Vaarala
2b9ae97652
Fix TextEncoder use of final_len
The variable was uninitialized for a string input of length zero.
8 years ago
Romero B. de S. Malaquias
99b144ffc3
Avoiding conditional directives that split parts of statements
8 years ago
Sami Vaarala
2a49a15e0e
Improve object hash part algorithm performance
Make the hash algorithm simpler by using a bit mask rather than a modulus for
probing the hash.
Make the hash part load factor lower than before to reduce clustering. Low
memory environments disable hash part support anyway, so this doesn't impact
them.
8 years ago
Sami Vaarala
93be1cf71e
Fix typedarray .set() argument validation
8 years ago
Sami Vaarala
56d76e4f88
Rewrite string table algorithm
* Replace the two alternative algorithms with a single one which works for
both desktop and low memory cases.
* Basic algorithm is a hash table with size 2^N, hash mask is simply
(size - 1), e.g. if size is 0x100, mask is 0xFF. duk_hstring has a 'next'
pointer (single linked list) for chaining strings mapping to the same
slot.
8 years ago
Sami Vaarala
d5c5ab69c3
Faster arridx handling with no duk_hstring->arridx
8 years ago
Sami Vaarala
cbedc19842
Another fix for duk_hstring arridx overflow
8 years ago
Sami Vaarala
56adaa6322
Fix duk_hstring arridx check overflow
8 years ago
Sami Vaarala
080df630dd
Fix incorrect DUK_UNREACHABLE() for executor EXP
8 years ago
Sami Vaarala
4adfff84b7
Fix String.prototype.repeat() copy_size handling
copy_size was computed incorrectly when DUK_USE_PREFER_SIZE is false.
The bug caused memory unsafe behavior.
8 years ago
Sami Vaarala
64c7d96c6f
Add JSON.stringify() fastpath for plain buffer
8 years ago
Sami Vaarala
498aaf5340
Remove unused internal ArrayBuffer helper
8 years ago
Sami Vaarala
6120d4ece4
Add a 'global' binding
8 years ago
Sami Vaarala
e17d563be3
Autospawn ArrayBuffer for .buffer where possible
8 years ago
Sami Vaarala
b16f6aef17
Bump DUK_VERSION to 2.0.99
8 years ago
Sami Vaarala
b75a921b25
Bump DUK_VERSION for 2.0.0 release
8 years ago
Sami Vaarala
15ded1b6f0
Fix incorrect dash assert in regexp
8 years ago
Sami Vaarala
236683f646
Conditional built-ins, DUK_USE_GLOBAL_BUILTIN
8 years ago