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

Side by Side Diff: runtime/vm/flow_graph_compiler.h

Issue 10982088: Remove deoptimization index PC descriptors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove code from an unrelated change. Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_FLOW_GRAPH_COMPILER_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_
6 #define VM_FLOW_GRAPH_COMPILER_H_ 6 #define VM_FLOW_GRAPH_COMPILER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // List of moves not yet resolved. 55 // List of moves not yet resolved.
56 GrowableArray<MoveOperands*> moves_; 56 GrowableArray<MoveOperands*> moves_;
57 }; 57 };
58 58
59 59
60 // Used for describing a deoptimization point after call (lazy deoptimization). 60 // Used for describing a deoptimization point after call (lazy deoptimization).
61 // For deoptimization before instruction use class CompilerDeoptInfoWithStub. 61 // For deoptimization before instruction use class CompilerDeoptInfoWithStub.
62 class CompilerDeoptInfo : public ZoneAllocated { 62 class CompilerDeoptInfo : public ZoneAllocated {
63 public: 63 public:
64 CompilerDeoptInfo(intptr_t deopt_id, DeoptReasonId reason) 64 CompilerDeoptInfo(intptr_t deopt_id, DeoptReasonId reason)
65 : deopt_id_(deopt_id), reason_(reason), deoptimization_env_(NULL) {} 65 : pc_offset_(-1),
66 66 deopt_id_(deopt_id),
67 void set_deoptimization_env(Environment* env) { 67 reason_(reason),
68 deoptimization_env_ = env; 68 deoptimization_env_(NULL) {}
69 }
70 69
71 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler); 70 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler);
72 71
73 void AllocateIncomingParametersRecursive(Environment* env, 72 void AllocateIncomingParametersRecursive(Environment* env,
74 intptr_t* stack_height); 73 intptr_t* stack_height);
75 74
76 // No code needs to be generated. 75 // No code needs to be generated.
77 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {} 76 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {}
78 77
79 // Builds deopt-after continuation point. 78 // Builds deopt-after continuation point.
80 virtual void BuildReturnAddress(DeoptInfoBuilder* builder, 79 virtual void BuildReturnAddress(DeoptInfoBuilder* builder,
81 const Function& function, 80 const Function& function,
82 intptr_t slot_ix); 81 intptr_t slot_ix);
83 82
83 intptr_t pc_offset() const { return pc_offset_; }
84 void set_pc_offset(intptr_t offset) { pc_offset_ = offset; }
85
84 intptr_t deopt_id() const { return deopt_id_; } 86 intptr_t deopt_id() const { return deopt_id_; }
87
85 DeoptReasonId reason() const { return reason_; } 88 DeoptReasonId reason() const { return reason_; }
89
86 const Environment* deoptimization_env() const { return deoptimization_env_; } 90 const Environment* deoptimization_env() const { return deoptimization_env_; }
91 void set_deoptimization_env(Environment* env) { deoptimization_env_ = env; }
87 92
88 private: 93 private:
94 intptr_t pc_offset_;
89 const intptr_t deopt_id_; 95 const intptr_t deopt_id_;
90 const DeoptReasonId reason_; 96 const DeoptReasonId reason_;
91 Environment* deoptimization_env_; 97 Environment* deoptimization_env_;
92 98
93 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfo); 99 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfo);
94 }; 100 };
95 101
96 102
97 class CompilerDeoptInfoWithStub : public CompilerDeoptInfo { 103 class CompilerDeoptInfoWithStub : public CompilerDeoptInfo {
98 public: 104 public:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 #include "vm/flow_graph_compiler_ia32.h" 148 #include "vm/flow_graph_compiler_ia32.h"
143 #elif defined(TARGET_ARCH_X64) 149 #elif defined(TARGET_ARCH_X64)
144 #include "vm/flow_graph_compiler_x64.h" 150 #include "vm/flow_graph_compiler_x64.h"
145 #elif defined(TARGET_ARCH_ARM) 151 #elif defined(TARGET_ARCH_ARM)
146 #include "vm/flow_graph_compiler_arm.h" 152 #include "vm/flow_graph_compiler_arm.h"
147 #else 153 #else
148 #error Unknown architecture. 154 #error Unknown architecture.
149 #endif 155 #endif
150 156
151 #endif // VM_FLOW_GRAPH_COMPILER_H_ 157 #endif // VM_FLOW_GRAPH_COMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698