зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1726123 - Part 3: Add separate header for CompletionKind enum. r=arai
`CompletionKind` is only used within the engine, so we can move it out of "jsapi.h" into a separate header. This allows us to remove more "jsapi.h" includes. Differential Revision: https://phabricator.services.mozilla.com/D122841
This commit is contained in:
Родитель
8e15915289
Коммит
b2e3b5a596
|
@ -23,6 +23,7 @@
|
|||
#include "vm/ArrayObject.h"
|
||||
#include "vm/AsyncFunction.h"
|
||||
#include "vm/AsyncIteration.h"
|
||||
#include "vm/CompletionKind.h"
|
||||
#include "vm/ErrorObject.h"
|
||||
#include "vm/GeneratorObject.h"
|
||||
#include "vm/Iteration.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "js/Promise.h"
|
||||
|
||||
#include "jsapi.h" // js::CompletionKind
|
||||
#include "jstypes.h" // JS_PUBLIC_API
|
||||
|
||||
#include "js/CallArgs.h" // JS::CallArgs
|
||||
|
@ -26,6 +25,8 @@ class AsyncFunctionGeneratorObject;
|
|||
class AsyncGeneratorObject;
|
||||
class PromiseObject;
|
||||
|
||||
enum class CompletionKind;
|
||||
|
||||
// Promise.prototype.then.
|
||||
extern bool Promise_then(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
#include "util/StringBuffer.h" // StringBuffer
|
||||
#include "vm/AsyncFunctionResolveKind.h" // AsyncFunctionResolveKind
|
||||
#include "vm/BytecodeUtil.h" // JOF_*, IsArgOp, IsLocalOp, SET_UINT24, SET_ICINDEX, BytecodeFallsThrough, BytecodeIsJumpTarget
|
||||
#include "vm/CompletionKind.h" // CompletionKind
|
||||
#include "vm/FunctionPrefixKind.h" // FunctionPrefixKind
|
||||
#include "vm/GeneratorObject.h" // AbstractGeneratorObject
|
||||
#include "vm/JSAtom.h" // JSAtom
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
#include <stddef.h> // ptrdiff_t
|
||||
#include <stdint.h> // uint16_t, uint32_t
|
||||
|
||||
#include "jsapi.h" // CompletionKind
|
||||
|
||||
#include "frontend/AbstractScopePtr.h" // ScopeIndex
|
||||
#include "frontend/BCEParserHandle.h" // BCEParserHandle
|
||||
#include "frontend/BytecodeControlStructures.h" // NestableControl
|
||||
|
@ -48,6 +46,7 @@
|
|||
#include "vm/BuiltinObjectKind.h" // BuiltinObjectKind
|
||||
#include "vm/BytecodeUtil.h" // JSOp
|
||||
#include "vm/CheckIsObjectKind.h" // CheckIsObjectKind
|
||||
#include "vm/CompletionKind.h" // CompletionKind
|
||||
#include "vm/FunctionPrefixKind.h" // FunctionPrefixKind
|
||||
#include "vm/GeneratorResumeKind.h" // GeneratorResumeKind
|
||||
#include "vm/JSFunction.h" // JSFunction
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
|
||||
#include "frontend/ForOfLoopControl.h"
|
||||
|
||||
#include "jsapi.h" // CompletionKind
|
||||
|
||||
#include "frontend/BytecodeEmitter.h" // BytecodeEmitter
|
||||
#include "frontend/EmitterScope.h" // EmitterScope
|
||||
#include "frontend/IfEmitter.h" // InternalIfEmitter
|
||||
#include "vm/CompletionKind.h" // CompletionKind
|
||||
#include "vm/JSScript.h" // TryNoteKind::ForOfIterClose
|
||||
#include "vm/Opcodes.h" // JSOp
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@
|
|||
|
||||
#include <stdint.h> // int32_t, uint32_t
|
||||
|
||||
#include "jsapi.h" // CompletionKind
|
||||
|
||||
#include "frontend/BytecodeControlStructures.h" // NestableControl, LoopControl
|
||||
#include "frontend/BytecodeOffset.h" // BytecodeOffset
|
||||
#include "frontend/IteratorKind.h" // IteratorKind
|
||||
#include "frontend/TryEmitter.h" // TryEmitter
|
||||
#include "vm/CompletionKind.h" // CompletionKind
|
||||
|
||||
namespace js {
|
||||
namespace frontend {
|
||||
|
|
|
@ -1524,12 +1524,6 @@ extern JS_PUBLIC_API void NoteIntentionalCrash();
|
|||
|
||||
} /* namespace js */
|
||||
|
||||
namespace js {
|
||||
|
||||
enum class CompletionKind { Normal, Return, Throw };
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
#ifdef DEBUG
|
||||
namespace JS {
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "builtin/Promise.h" // js::AsyncFromSyncIteratorMethod, js::AsyncGeneratorEnqueue
|
||||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_*
|
||||
#include "js/PropertySpec.h"
|
||||
#include "vm/CompletionKind.h"
|
||||
#include "vm/FunctionFlags.h" // js::FunctionFlags
|
||||
#include "vm/GeneratorObject.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
|
|
|
@ -282,6 +282,7 @@
|
|||
namespace js {
|
||||
|
||||
class AsyncGeneratorObject;
|
||||
enum class CompletionKind;
|
||||
|
||||
extern const JSClass AsyncGeneratorFunctionClass;
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: set ts=8 sts=2 et sw=2 tw=80:
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef vm_CompletionKind_h
|
||||
#define vm_CompletionKind_h
|
||||
|
||||
namespace js {
|
||||
|
||||
enum class CompletionKind { Normal, Return, Throw };
|
||||
|
||||
} // namespace js
|
||||
|
||||
#endif // vm_CompletionKind_h
|
Загрузка…
Ссылка в новой задаче