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

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

Issue 1343373003: Revert "VM: New calling convention for generated code." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « runtime/vm/deferred_objects.cc ('k') | runtime/vm/deopt_instructions.cc » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_DEOPT_INSTRUCTIONS_H_ 5 #ifndef VM_DEOPT_INSTRUCTIONS_H_
6 #define VM_DEOPT_INSTRUCTIONS_H_ 6 #define VM_DEOPT_INSTRUCTIONS_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/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 16 matching lines...) Expand all
27 public: 27 public:
28 enum DestFrameOptions { 28 enum DestFrameOptions {
29 kDestIsOriginalFrame, // Replace the original frame with deopt frame. 29 kDestIsOriginalFrame, // Replace the original frame with deopt frame.
30 kDestIsAllocated // Write deopt frame to a buffer. 30 kDestIsAllocated // Write deopt frame to a buffer.
31 }; 31 };
32 32
33 DeoptContext(const StackFrame* frame, 33 DeoptContext(const StackFrame* frame,
34 const Code& code, 34 const Code& code,
35 DestFrameOptions dest_options, 35 DestFrameOptions dest_options,
36 fpu_register_t* fpu_registers, 36 fpu_register_t* fpu_registers,
37 intptr_t* cpu_registers, 37 intptr_t* cpu_registers);
38 bool is_lazy_deopt);
39 virtual ~DeoptContext(); 38 virtual ~DeoptContext();
40 39
41 // Returns the offset of the dest fp from the dest sp. Used in 40 // Returns the offset of the dest fp from the dest sp. Used in
42 // runtime code to adjust the stack size before deoptimization. 41 // runtime code to adjust the stack size before deoptimization.
43 intptr_t DestStackAdjustment() const; 42 intptr_t DestStackAdjustment() const;
44 43
45 intptr_t* GetSourceFrameAddressAt(intptr_t index) const { 44 intptr_t* GetSourceFrameAddressAt(intptr_t index) const {
46 ASSERT(source_frame_ != NULL); 45 ASSERT(source_frame_ != NULL);
47 ASSERT((0 <= index) && (index < source_frame_size_)); 46 ASSERT((0 <= index) && (index < source_frame_size_));
48 return &source_frame_[index]; 47 return &source_frame_[index];
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 87 }
89 88
90 Thread* thread() const { return thread_; } 89 Thread* thread() const { return thread_; }
91 Zone* zone() const { return thread_->zone(); } 90 Zone* zone() const { return thread_->zone(); }
92 91
93 intptr_t source_frame_size() const { return source_frame_size_; } 92 intptr_t source_frame_size() const { return source_frame_size_; }
94 intptr_t dest_frame_size() const { return dest_frame_size_; } 93 intptr_t dest_frame_size() const { return dest_frame_size_; }
95 94
96 RawCode* code() const { return code_; } 95 RawCode* code() const { return code_; }
97 96
98 bool is_lazy_deopt() const { return is_lazy_deopt_; }
99
100 ICData::DeoptReasonId deopt_reason() const { return deopt_reason_; } 97 ICData::DeoptReasonId deopt_reason() const { return deopt_reason_; }
101 bool HasDeoptFlag(ICData::DeoptFlags flag) { 98 bool HasDeoptFlag(ICData::DeoptFlags flag) {
102 return (deopt_flags_ & flag) != 0; 99 return (deopt_flags_ & flag) != 0;
103 } 100 }
104 101
105 RawTypedData* deopt_info() const { return deopt_info_; } 102 RawTypedData* deopt_info() const { return deopt_info_; }
106 103
107 // Fills the destination frame but defers materialization of 104 // Fills the destination frame but defers materialization of
108 // objects. 105 // objects.
109 void FillDestFrame(); 106 void FillDestFrame();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 uint32_t deopt_flags_; 221 uint32_t deopt_flags_;
225 intptr_t caller_fp_; 222 intptr_t caller_fp_;
226 Thread* thread_; 223 Thread* thread_;
227 TimelineEvent* timeline_event_; 224 TimelineEvent* timeline_event_;
228 225
229 DeferredSlot* deferred_slots_; 226 DeferredSlot* deferred_slots_;
230 227
231 intptr_t deferred_objects_count_; 228 intptr_t deferred_objects_count_;
232 DeferredObject** deferred_objects_; 229 DeferredObject** deferred_objects_;
233 230
234 const bool is_lazy_deopt_;
235
236 DISALLOW_COPY_AND_ASSIGN(DeoptContext); 231 DISALLOW_COPY_AND_ASSIGN(DeoptContext);
237 }; 232 };
238 233
239 234
240 235
241 // Represents one deopt instruction, e.g, setup return address, store object, 236 // Represents one deopt instruction, e.g, setup return address, store object,
242 // store register, etc. The target is defined by instruction's position in 237 // store register, etc. The target is defined by instruction's position in
243 // the deopt-info array. 238 // the deopt-info array.
244 class DeoptInstr : public ZoneAllocated { 239 class DeoptInstr : public ZoneAllocated {
245 public: 240 public:
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 class ReasonField : public BitField<ICData::DeoptReasonId, 0, 8> { }; 535 class ReasonField : public BitField<ICData::DeoptReasonId, 0, 8> { };
541 class FlagsField : public BitField<uint32_t, 8, 8> { }; 536 class FlagsField : public BitField<uint32_t, 8, 8> { };
542 537
543 private: 538 private:
544 static const intptr_t kEntrySize = 3; 539 static const intptr_t kEntrySize = 3;
545 }; 540 };
546 541
547 } // namespace dart 542 } // namespace dart
548 543
549 #endif // VM_DEOPT_INSTRUCTIONS_H_ 544 #endif // VM_DEOPT_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/deferred_objects.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698