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

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

Issue 203523011: Introduce a lazy-compile stub for functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 6 years, 8 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 | « no previous file | runtime/vm/code_generator.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) 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,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 RawArray* StackmapTableBuilder::FinalizeStackmaps(const Code& code) { 64 RawArray* StackmapTableBuilder::FinalizeStackmaps(const Code& code) {
65 ASSERT(Verify()); 65 ASSERT(Verify());
66 intptr_t num_entries = Length(); 66 intptr_t num_entries = Length();
67 if (num_entries == 0) { 67 if (num_entries == 0) {
68 return Object::empty_array().raw(); 68 return Object::empty_array().raw();
69 } 69 }
70 uword entry_point = code.EntryPoint(); 70 uword entry_point = code.EntryPoint();
71 for (intptr_t i = 0; i < num_entries; i++) { 71 for (intptr_t i = 0; i < num_entries; i++) {
72 stack_map_ = MapAt(i); 72 stack_map_ = MapAt(i);
73 stack_map_.SetPC(entry_point + stack_map_.PC()); 73 stack_map_.SetPC(entry_point + stack_map_.PC());
74 stack_map_.SetCode(code);
75 } 74 }
76 return Array::MakeArray(list_); 75 return Array::MakeArray(list_);
77 } 76 }
78 77
79 78
80 RawStackmap* StackmapTableBuilder::MapAt(intptr_t index) const { 79 RawStackmap* StackmapTableBuilder::MapAt(intptr_t index) const {
81 Stackmap& map = Stackmap::Handle(); 80 Stackmap& map = Stackmap::Handle();
82 map ^= list_.At(index); 81 map ^= list_.At(index);
83 return map.raw(); 82 return map.raw();
84 } 83 }
85 84
86 } // namespace dart 85 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698