Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / js / src / frontend / SelfHostedIter.h
blob72a8ba90175cedc4cd3404af1cd49934ae312c7b
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef frontend_SelfHostedIter_h
8 #define frontend_SelfHostedIter_h
10 namespace js::frontend {
12 // `for-of`, `for-await-of`, and spread operations are allowed on
13 // self-hosted JS code only when the operand is explicitly marked with
14 // `allowContentIter()`.
16 // This value is effectful only when emitting self-hosted JS code.
17 enum class SelfHostedIter {
18 // The operand is not marked.
19 // Also means "don't care" for non-self-hosted JS case.
20 Deny,
22 // The operand is marked.
23 AllowContent,
25 // The operand is marked and the `@@iterator` method is on the stack.
26 AllowContentWith,
28 // The operand is marked and the `next` method is on the stack.
29 AllowContentWithNext,
32 } /* namespace js::frontend */
34 #endif /* frontend_SelfHostedIter_h */