V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
stack-frame-info.h
1 // Copyright 2018 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_OBJECTS_STACK_FRAME_INFO_H_
6 #define V8_OBJECTS_STACK_FRAME_INFO_H_
7 
8 #include "src/objects.h"
9 
10 // Has to be the last include (doesn't have include guards):
11 #include "src/objects/object-macros.h"
12 
13 namespace v8 {
14 namespace internal {
15 
17  public:
18  DECL_INT_ACCESSORS(line_number)
19  DECL_INT_ACCESSORS(column_number)
20  DECL_INT_ACCESSORS(script_id)
21  DECL_ACCESSORS(script_name, Object)
22  DECL_ACCESSORS(script_name_or_source_url, Object)
23  DECL_ACCESSORS(function_name, Object)
24  DECL_BOOLEAN_ACCESSORS(is_eval)
25  DECL_BOOLEAN_ACCESSORS(is_constructor)
26  DECL_BOOLEAN_ACCESSORS(is_wasm)
27  DECL_INT_ACCESSORS(flag)
28  DECL_INT_ACCESSORS(id)
29 
30  DECL_CAST(StackFrameInfo)
31 
32  // Dispatched behavior.
33  DECL_PRINTER(StackFrameInfo)
34  DECL_VERIFIER(StackFrameInfo)
35 
36  // Layout description.
37 #define STACK_FRAME_INFO_FIELDS(V) \
38  V(kLineNumberIndex, kTaggedSize) \
39  V(kColumnNumberIndex, kTaggedSize) \
40  V(kScriptIdIndex, kTaggedSize) \
41  V(kScriptNameIndex, kTaggedSize) \
42  V(kScriptNameOrSourceUrlIndex, kTaggedSize) \
43  V(kFunctionNameIndex, kTaggedSize) \
44  V(kFlagIndex, kTaggedSize) \
45  V(kIdIndex, kTaggedSize) \
46  /* Total size. */ \
47  V(kSize, 0)
48 
49  DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, STACK_FRAME_INFO_FIELDS)
50 #undef STACK_FRAME_INFO_FIELDS
51 
52  private:
53  // Bit position in the flag, from least significant bit position.
54  static const int kIsEvalBit = 0;
55  static const int kIsConstructorBit = 1;
56  static const int kIsWasmBit = 2;
57 
58  DISALLOW_IMPLICIT_CONSTRUCTORS(StackFrameInfo);
59 };
60 
61 } // namespace internal
62 } // namespace v8
63 
64 #include "src/objects/object-macros-undef.h"
65 
66 #endif // V8_OBJECTS_STACK_FRAME_INFO_H_
Definition: libplatform.h:13