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

Side by Side Diff: runtime/vm/code_descriptors.cc

Issue 10885039: Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/code_generator.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 (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 #include "vm/code_descriptors.h" 5 #include "vm/code_descriptors.h"
6 6
7 namespace dart { 7 namespace dart {
8 8
9 void DescriptorList::AddDescriptor(PcDescriptors::Kind kind, 9 void DescriptorList::AddDescriptor(PcDescriptors::Kind kind,
10 intptr_t pc_offset, 10 intptr_t pc_offset,
11 intptr_t deopt_id, 11 intptr_t deopt_id,
12 intptr_t token_index, 12 intptr_t token_index,
13 intptr_t try_index) { 13 intptr_t try_index) {
14 struct PcDesc data; 14 struct PcDesc data;
15 data.pc_offset = pc_offset; 15 data.pc_offset = pc_offset;
16 data.kind = kind; 16 data.kind = kind;
17 data.deopt_id = deopt_id; 17 data.deopt_id = deopt_id;
18 data.token_index = token_index; 18 data.SetTokenPos(token_index);
19 data.try_index = try_index; 19 data.try_index = try_index;
20 list_.Add(data); 20 list_.Add(data);
21 } 21 }
22 22
23 23
24 void DescriptorList::AddDeoptInfo(intptr_t pc_offset, 24 void DescriptorList::AddDeoptIndex(intptr_t pc_offset,
25 intptr_t deopt_id, 25 intptr_t deopt_id,
26 intptr_t token_index, 26 DeoptReasonId deopt_reason,
27 intptr_t deopt_array_index) { 27 intptr_t deopt_array_index) {
28 struct PcDesc data; 28 struct PcDesc data;
29 data.pc_offset = pc_offset; 29 data.pc_offset = pc_offset;
30 data.kind = PcDescriptors::kDeoptIndex; 30 data.kind = PcDescriptors::kDeoptIndex;
31 data.deopt_id = deopt_id; 31 data.deopt_id = deopt_id;
32 data.token_index = token_index; 32 data.SetDeoptReason(deopt_reason);
33 // Try_index is reused for deopt_array_index. 33 // Try_index is reused for deopt_array_index.
34 data.try_index = deopt_array_index; 34 data.try_index = deopt_array_index;
35 list_.Add(data); 35 list_.Add(data);
36 } 36 }
37 37
38 38
39 RawPcDescriptors* DescriptorList::FinalizePcDescriptors(uword entry_point) { 39 RawPcDescriptors* DescriptorList::FinalizePcDescriptors(uword entry_point) {
40 intptr_t num_descriptors = Length(); 40 intptr_t num_descriptors = Length();
41 const PcDescriptors& descriptors = 41 const PcDescriptors& descriptors =
42 PcDescriptors::Handle(PcDescriptors::New(num_descriptors)); 42 PcDescriptors::Handle(PcDescriptors::New(num_descriptors));
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 94
95 RawStackmap* StackmapTableBuilder::MapAt(int index) const { 95 RawStackmap* StackmapTableBuilder::MapAt(int index) const {
96 Stackmap& map = Stackmap::Handle(); 96 Stackmap& map = Stackmap::Handle();
97 map ^= list_.At(index); 97 map ^= list_.At(index);
98 return map.raw(); 98 return map.raw();
99 } 99 }
100 100
101 } // namespace dart 101 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/code_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698