diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-02-07 09:20:45 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:59:11 +0000 |
commit | acd9771544811c8dca28575b7d546abbb0271fbb (patch) | |
tree | d156b782afdc21ff31a9a6035c7088a43ff51505 /src/qml/compiler/qv4jsir_p.h | |
parent | 7fa8393aac00d6c18048099fd6c4fb77e9ff739a (diff) |
Add a method to determine whether an ArgLocal requires a write barrier
Change-Id: I0d585797849dc22f22e5173b8da94fecf8952c97
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4jsir_p.h')
-rw-r--r-- | src/qml/compiler/qv4jsir_p.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h index da2c350393..8ddeb71f69 100644 --- a/src/qml/compiler/qv4jsir_p.h +++ b/src/qml/compiler/qv4jsir_p.h @@ -1358,6 +1358,16 @@ struct Function { !hasTry && !hasWith && !isNamedExpression && !usesArgumentsObject && !hasDirectEval; } + bool argLocalRequiresWriteBarrier(ArgLocal *al) const { + uint scope = al->scope; + const IR::Function *f = this; + while (scope) { + f = f->outer; + --scope; + } + return !f->canUseSimpleCall(); + } + private: BasicBlock *getOrCreateBasicBlock(int index); void setStatementCount(int cnt); |