ByteCodeApi.h 1.0 KB

12345678910111213141516171819202122
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. HRESULT GenerateByteCode(__in ParseNodeProg *pnode, __in uint32 grfscr, __in Js::ScriptContext* scriptContext, __inout Js::ParseableFunctionInfo ** ppRootFunc,
  7. __in uint sourceIndex, __in bool forceNoNative, __in Parser* parser, __in CompileScriptException *pse, Js::ScopeInfo* parentScopeInfo = nullptr,
  8. Js::ScriptFunction ** functionRef = nullptr);
  9. //
  10. // Output for -Trace:ByteCode
  11. //
  12. #if DBG_DUMP
  13. #define TRACE_BYTECODE(fmt, ...) \
  14. if (Js::Configuration::Global.flags.Trace.IsEnabled(Js::ByteCodePhase)) \
  15. { \
  16. Output::Print(fmt, __VA_ARGS__); \
  17. }
  18. #else
  19. #define TRACE_BYTECODE(fmt, ...)
  20. #endif