summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/BytecodeEmitter.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-05-29 16:01:50 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-05-29 16:01:50 -0400
commit363bfeb2c06e5f57136ebdab8da1ebeba0591520 (patch)
tree3fbaf59efc6807c48a69fabe229be712c0d25af6 /js/src/frontend/BytecodeEmitter.h
parentd197e65f448d0dfbb5de7ff5d09a1aceaf7620f6 (diff)
parent23115528859e518813214b35c36232da0c1c7b5f (diff)
downloadUXP-363bfeb2c06e5f57136ebdab8da1ebeba0591520.tar
UXP-363bfeb2c06e5f57136ebdab8da1ebeba0591520.tar.gz
UXP-363bfeb2c06e5f57136ebdab8da1ebeba0591520.tar.lz
UXP-363bfeb2c06e5f57136ebdab8da1ebeba0591520.tar.xz
UXP-363bfeb2c06e5f57136ebdab8da1ebeba0591520.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'js/src/frontend/BytecodeEmitter.h')
-rw-r--r--js/src/frontend/BytecodeEmitter.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/src/frontend/BytecodeEmitter.h b/js/src/frontend/BytecodeEmitter.h
index 32668a34c..814fa11d4 100644
--- a/js/src/frontend/BytecodeEmitter.h
+++ b/js/src/frontend/BytecodeEmitter.h
@@ -109,10 +109,12 @@ struct CGYieldOffsetList {
void finish(YieldOffsetArray& array, uint32_t prologueLength);
};
-// Use zero inline elements because these go on the stack and affect how many
-// nested functions are possible.
-typedef Vector<jsbytecode, 0> BytecodeVector;
-typedef Vector<jssrcnote, 0> SrcNotesVector;
+static size_t MaxBytecodeLength = INT32_MAX;
+static size_t MaxSrcNotesLength = INT32_MAX;
+
+// Have a few inline elements to avoid heap allocation for tiny sequences.
+typedef Vector<jsbytecode, 256> BytecodeVector;
+typedef Vector<jssrcnote, 64> SrcNotesVector;
// Linked list of jump instructions that need to be patched. The linked list is
// stored in the bytes of the incomplete bytecode that will be patched, so no