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.
22 // The operand is marked.
25 // The operand is marked and the `@@iterator` method is on the stack.
28 // The operand is marked and the `next` method is on the stack.
32 } /* namespace js::frontend */
34 #endif /* frontend_SelfHostedIter_h */