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

Side by Side Diff: src/vm/weak_pointer.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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 | « src/vm/weak_pointer.h ('k') | tests/agent_tests/agent_tests.dart » ('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) 2014, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #include "src/vm/weak_pointer.h" 5 #include "src/vm/weak_pointer.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "src/vm/object.h" 9 #include "src/vm/object.h"
10 #include "src/vm/object_memory.h" 10 #include "src/vm/object_memory.h"
11 11
12 namespace fletch { 12 namespace dartino {
13 13
14 WeakPointer::WeakPointer(HeapObject* object, WeakPointerCallback callback, 14 WeakPointer::WeakPointer(HeapObject* object, WeakPointerCallback callback,
15 WeakPointer* next) 15 WeakPointer* next)
16 : object_(object), callback_(callback), prev_(NULL), next_(next) {} 16 : object_(object), callback_(callback), prev_(NULL), next_(next) {}
17 17
18 void WeakPointer::Process(Space* space, WeakPointer** pointers, Heap* heap) { 18 void WeakPointer::Process(Space* space, WeakPointer** pointers, Heap* heap) {
19 WeakPointer* new_list = NULL; 19 WeakPointer* new_list = NULL;
20 WeakPointer* previous = NULL; 20 WeakPointer* previous = NULL;
21 WeakPointer* current = *pointers; 21 WeakPointer* current = *pointers;
22 while (current != NULL) { 22 while (current != NULL) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 } 94 }
95 95
96 void WeakPointer::Visit(WeakPointer* pointers, PointerVisitor* visitor) { 96 void WeakPointer::Visit(WeakPointer* pointers, PointerVisitor* visitor) {
97 while (pointers != NULL) { 97 while (pointers != NULL) {
98 visitor->Visit(reinterpret_cast<Object**>(&pointers->object_)); 98 visitor->Visit(reinterpret_cast<Object**>(&pointers->object_));
99 pointers = pointers->next_; 99 pointers = pointers->next_;
100 } 100 }
101 } 101 }
102 102
103 } // namespace fletch 103 } // namespace dartino
OLDNEW
« no previous file with comments | « src/vm/weak_pointer.h ('k') | tests/agent_tests/agent_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698