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

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

Issue 1128803002: Lazily generate local var descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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/object.h ('k') | runtime/vm/object_test.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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 12029 matching lines...) Expand 10 before | Expand all | Expand 10 after
12040 void Code::Comments::SetCommentAt(intptr_t idx, const String& comment) { 12040 void Code::Comments::SetCommentAt(intptr_t idx, const String& comment) {
12041 comments_.SetAt(idx * kNumberOfEntries + kCommentEntry, comment); 12041 comments_.SetAt(idx * kNumberOfEntries + kCommentEntry, comment);
12042 } 12042 }
12043 12043
12044 12044
12045 Code::Comments::Comments(const Array& comments) 12045 Code::Comments::Comments(const Array& comments)
12046 : comments_(comments) { 12046 : comments_(comments) {
12047 } 12047 }
12048 12048
12049 12049
12050 RawLocalVarDescriptors* Code::GetLocalVarDescriptors() const {
12051 LocalVarDescriptors& v = LocalVarDescriptors::Handle(var_descriptors());
12052 if (v.IsNull()) {
12053 const Function& f = Function::Handle(function());
12054 ASSERT(!f.IsIrregexpFunction()); // Not yet implemented.
12055 Compiler::ComputeLocalVarDescriptors(*this);
12056 }
12057 return v.raw();
12058 }
12059
12060
12050 void Code::set_state_bits(intptr_t bits) const { 12061 void Code::set_state_bits(intptr_t bits) const {
12051 StoreNonPointer(&raw_ptr()->state_bits_, bits); 12062 StoreNonPointer(&raw_ptr()->state_bits_, bits);
12052 } 12063 }
12053 12064
12054 12065
12055 void Code::set_is_optimized(bool value) const { 12066 void Code::set_is_optimized(bool value) const {
12056 set_state_bits(OptimizedBit::update(value, raw_ptr()->state_bits_)); 12067 set_state_bits(OptimizedBit::update(value, raw_ptr()->state_bits_));
12057 } 12068 }
12058 12069
12059 12070
(...skipping 8655 matching lines...) Expand 10 before | Expand all | Expand 10 after
20715 return tag_label.ToCString(); 20726 return tag_label.ToCString();
20716 } 20727 }
20717 20728
20718 20729
20719 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20730 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20720 Instance::PrintJSONImpl(stream, ref); 20731 Instance::PrintJSONImpl(stream, ref);
20721 } 20732 }
20722 20733
20723 20734
20724 } // namespace dart 20735 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698