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

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

Issue 15383002: Use handles to save the object being read before calling StorePointer to make (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | runtime/vm/raw_object_snapshot.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 6036 matching lines...) Expand 10 before | Expand all | Expand 10 after
6047 break; 6047 break;
6048 } 6048 }
6049 } 6049 }
6050 if (is_unique) { 6050 if (is_unique) {
6051 // Add script to the list of scripts. 6051 // Add script to the list of scripts.
6052 scripts.Add(owner_script); 6052 scripts.Add(owner_script);
6053 } 6053 }
6054 } 6054 }
6055 6055
6056 // Create the array of scripts and cache it in loaded_scripts_. 6056 // Create the array of scripts and cache it in loaded_scripts_.
6057 StorePointer(&raw_ptr()->loaded_scripts_, Array::MakeArray(scripts)); 6057 const Array& scripts_array = Array::Handle(Array::MakeArray(scripts));
6058 StorePointer(&raw_ptr()->loaded_scripts_, scripts_array.raw());
6058 } 6059 }
6059 return loaded_scripts(); 6060 return loaded_scripts();
6060 } 6061 }
6061 6062
6062 6063
6063 // TODO(hausner): we might want to add a script dictionary to the 6064 // TODO(hausner): we might want to add a script dictionary to the
6064 // library class to make this lookup faster. 6065 // library class to make this lookup faster.
6065 RawScript* Library::LookupScript(const String& url) const { 6066 RawScript* Library::LookupScript(const String& url) const {
6066 const Array& scripts = Array::Handle(LoadedScripts()); 6067 const Array& scripts = Array::Handle(LoadedScripts());
6067 Script& script = Script::Handle(); 6068 Script& script = Script::Handle();
(...skipping 7189 matching lines...) Expand 10 before | Expand all | Expand 10 after
13257 } 13258 }
13258 return result.raw(); 13259 return result.raw();
13259 } 13260 }
13260 13261
13261 13262
13262 const char* WeakProperty::ToCString() const { 13263 const char* WeakProperty::ToCString() const {
13263 return "_WeakProperty"; 13264 return "_WeakProperty";
13264 } 13265 }
13265 13266
13266 } // namespace dart 13267 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698