mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1254164 - Make aliasedBodyLevelLexicalBegin a uint32. r=Waldo, a=lizzard
This commit is contained in:
parent
3dadaea877
commit
fb146a9a7c
6
js/src/jit-test/tests/parser/bug-1254164.js
Normal file
6
js/src/jit-test/tests/parser/bug-1254164.js
Normal file
@ -0,0 +1,6 @@
|
||||
// |jit-test| slow;
|
||||
|
||||
var s = '';
|
||||
for (var i = 0; i < 70000; i++)
|
||||
s += 'function x' + i + '() { x' + i + '(); }\n';
|
||||
eval("(function() { " + s + " })();");
|
@ -131,7 +131,10 @@ Bindings::initWithTemporaryStorage(ExclusiveContext* cx, MutableHandle<Bindings>
|
||||
// any time, such accesses are mediated by DebugScopeProxy (see
|
||||
// DebugScopeProxy::handleUnaliasedAccess).
|
||||
uint32_t nslots = CallObject::RESERVED_SLOTS;
|
||||
uint32_t aliasedBodyLevelLexicalBegin = UINT16_MAX;
|
||||
|
||||
// Unless there are aliased body-level lexical bindings at all, set the
|
||||
// begin index to an impossible slot number.
|
||||
uint32_t aliasedBodyLevelLexicalBegin = LOCALNO_LIMIT;
|
||||
for (BindingIter bi(self); bi; bi++) {
|
||||
if (bi->aliased()) {
|
||||
// Per ES6, lexical bindings cannot be accessed until
|
||||
|
@ -228,8 +228,8 @@ class Bindings
|
||||
uint16_t numArgs_;
|
||||
uint16_t numBlockScoped_;
|
||||
uint16_t numBodyLevelLexicals_;
|
||||
uint16_t aliasedBodyLevelLexicalBegin_;
|
||||
uint16_t numUnaliasedBodyLevelLexicals_;
|
||||
uint32_t aliasedBodyLevelLexicalBegin_;
|
||||
uint32_t numVars_;
|
||||
uint32_t numUnaliasedVars_;
|
||||
|
||||
@ -356,6 +356,10 @@ class Bindings
|
||||
void trace(JSTracer* trc);
|
||||
};
|
||||
|
||||
// If this fails, add/remove padding within Bindings.
|
||||
static_assert(sizeof(Bindings) % js::gc::CellSize == 0,
|
||||
"Size of Bindings must be an integral multiple of js::gc::CellSize");
|
||||
|
||||
template <class Outer>
|
||||
class BindingsOperations
|
||||
{
|
||||
@ -438,7 +442,7 @@ class MutableBindingsOperations : public BindingsOperations<Outer>
|
||||
void setNumUnaliasedBodyLevelLexicals(uint16_t num) {
|
||||
bindings().numUnaliasedBodyLevelLexicals_ = num;
|
||||
}
|
||||
void setAliasedBodyLevelLexicalBegin(uint16_t offset) {
|
||||
void setAliasedBodyLevelLexicalBegin(uint32_t offset) {
|
||||
bindings().aliasedBodyLevelLexicalBegin_ = offset;
|
||||
}
|
||||
uint8_t* switchToScriptStorage(Binding* permanentStorage) {
|
||||
|
Loading…
Reference in New Issue
Block a user