Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/objects/frame-array.h

Issue 2961253002: [objects] Rename macros from DECLARE_ to DECL_ for consistency. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects/dictionary.h ('k') | src/objects/hash-table.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_FRAME_ARRAY_H_ 5 #ifndef V8_OBJECTS_FRAME_ARRAY_H_
6 #define V8_OBJECTS_FRAME_ARRAY_H_ 6 #define V8_OBJECTS_FRAME_ARRAY_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 #include "src/wasm/wasm-objects.h" 9 #include "src/wasm/wasm-objects.h"
10 10
(...skipping 11 matching lines...) Expand all
22 V(WasmFunctionIndex, Smi) \ 22 V(WasmFunctionIndex, Smi) \
23 V(Receiver, Object) \ 23 V(Receiver, Object) \
24 V(Function, JSFunction) \ 24 V(Function, JSFunction) \
25 V(Code, AbstractCode) \ 25 V(Code, AbstractCode) \
26 V(Offset, Smi) \ 26 V(Offset, Smi) \
27 V(Flags, Smi) 27 V(Flags, Smi)
28 28
29 // Container object for data collected during simple stack trace captures. 29 // Container object for data collected during simple stack trace captures.
30 class FrameArray : public FixedArray { 30 class FrameArray : public FixedArray {
31 public: 31 public:
32 #define DECLARE_FRAME_ARRAY_ACCESSORS(name, type) \ 32 #define DECL_FRAME_ARRAY_ACCESSORS(name, type) \
33 inline type* name(int frame_ix) const; \ 33 inline type* name(int frame_ix) const; \
34 inline void Set##name(int frame_ix, type* value); 34 inline void Set##name(int frame_ix, type* value);
35 FRAME_ARRAY_FIELD_LIST(DECLARE_FRAME_ARRAY_ACCESSORS) 35 FRAME_ARRAY_FIELD_LIST(DECL_FRAME_ARRAY_ACCESSORS)
36 #undef DECLARE_FRAME_ARRAY_ACCESSORS 36 #undef DECL_FRAME_ARRAY_ACCESSORS
37 37
38 inline bool IsWasmFrame(int frame_ix) const; 38 inline bool IsWasmFrame(int frame_ix) const;
39 inline bool IsWasmInterpretedFrame(int frame_ix) const; 39 inline bool IsWasmInterpretedFrame(int frame_ix) const;
40 inline bool IsAsmJsWasmFrame(int frame_ix) const; 40 inline bool IsAsmJsWasmFrame(int frame_ix) const;
41 inline int FrameCount() const; 41 inline int FrameCount() const;
42 42
43 void ShrinkToFit(); 43 void ShrinkToFit();
44 44
45 // Flags. 45 // Flags.
46 enum Flag { 46 enum Flag {
47 kIsWasmFrame = 1 << 0, 47 kIsWasmFrame = 1 << 0,
48 kIsWasmInterpretedFrame = 1 << 1, 48 kIsWasmInterpretedFrame = 1 << 1,
49 kIsAsmJsWasmFrame = 1 << 2, 49 kIsAsmJsWasmFrame = 1 << 2,
50 kIsStrict = 1 << 3, 50 kIsStrict = 1 << 3,
51 kIsConstructor = 1 << 4, 51 kIsConstructor = 1 << 4,
52 kAsmJsAtNumberConversion = 1 << 5 52 kAsmJsAtNumberConversion = 1 << 5
53 }; 53 };
54 54
55 static Handle<FrameArray> AppendJSFrame(Handle<FrameArray> in, 55 static Handle<FrameArray> AppendJSFrame(Handle<FrameArray> in,
56 Handle<Object> receiver, 56 Handle<Object> receiver,
57 Handle<JSFunction> function, 57 Handle<JSFunction> function,
58 Handle<AbstractCode> code, int offset, 58 Handle<AbstractCode> code, int offset,
59 int flags); 59 int flags);
60 static Handle<FrameArray> AppendWasmFrame( 60 static Handle<FrameArray> AppendWasmFrame(
61 Handle<FrameArray> in, Handle<WasmInstanceObject> wasm_instance, 61 Handle<FrameArray> in, Handle<WasmInstanceObject> wasm_instance,
62 int wasm_function_index, Handle<AbstractCode> code, int offset, 62 int wasm_function_index, Handle<AbstractCode> code, int offset,
63 int flags); 63 int flags);
64 64
65 DECLARE_CAST(FrameArray) 65 DECL_CAST(FrameArray)
66 66
67 private: 67 private:
68 // The underlying fixed array embodies a captured stack trace. Frame i 68 // The underlying fixed array embodies a captured stack trace. Frame i
69 // occupies indices 69 // occupies indices
70 // 70 //
71 // kFirstIndex + 1 + [i * kElementsPerFrame, (i + 1) * kElementsPerFrame[, 71 // kFirstIndex + 1 + [i * kElementsPerFrame, (i + 1) * kElementsPerFrame[,
72 // 72 //
73 // with internal offsets as below: 73 // with internal offsets as below:
74 74
75 static const int kWasmInstanceOffset = 0; 75 static const int kWasmInstanceOffset = 0;
(...skipping 23 matching lines...) Expand all
99 friend class Factory; 99 friend class Factory;
100 DISALLOW_IMPLICIT_CONSTRUCTORS(FrameArray); 100 DISALLOW_IMPLICIT_CONSTRUCTORS(FrameArray);
101 }; 101 };
102 102
103 } // namespace internal 103 } // namespace internal
104 } // namespace v8 104 } // namespace v8
105 105
106 #include "src/objects/object-macros-undef.h" 106 #include "src/objects/object-macros-undef.h"
107 107
108 #endif // V8_OBJECTS_FRAME_ARRAY_H_ 108 #endif // V8_OBJECTS_FRAME_ARRAY_H_
OLDNEW
« no previous file with comments | « src/objects/dictionary.h ('k') | src/objects/hash-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698