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

Side by Side Diff: runtime/vm/dart_api_state.h

Issue 16247002: - Adjust parameter types for Dart_NewWeakReferenceSet implementation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/dart_api_impl.cc ('k') | no next file » | 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 #ifndef VM_DART_API_STATE_H_ 5 #ifndef VM_DART_API_STATE_H_
6 #define VM_DART_API_STATE_H_ 6 #define VM_DART_API_STATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "platform/thread.h" 10 #include "platform/thread.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 private: 437 private:
438 FinalizablePersistentHandle* free_list_; 438 FinalizablePersistentHandle* free_list_;
439 DISALLOW_COPY_AND_ASSIGN(FinalizablePersistentHandles); 439 DISALLOW_COPY_AND_ASSIGN(FinalizablePersistentHandles);
440 }; 440 };
441 441
442 442
443 class WeakReferenceSet { 443 class WeakReferenceSet {
444 public: 444 public:
445 WeakReferenceSet(Dart_Handle* keys, intptr_t keys_length, 445 WeakReferenceSet(Dart_WeakPersistentHandle* keys, intptr_t keys_length,
446 Dart_Handle* values, intptr_t values_length) 446 Dart_WeakPersistentHandle* values, intptr_t values_length)
447 : next_(NULL), 447 : next_(NULL),
448 keys_(keys), num_keys_(keys_length), 448 keys_(keys), num_keys_(keys_length),
449 values_(values), num_values_(values_length) { 449 values_(values), num_values_(values_length) {
450 } 450 }
451 ~WeakReferenceSet() {} 451 ~WeakReferenceSet() {}
452 452
453 WeakReferenceSet* next() const { return next_; } 453 WeakReferenceSet* next() const { return next_; }
454 454
455 intptr_t num_keys() const { return num_keys_; } 455 intptr_t num_keys() const { return num_keys_; }
456 RawObject** get_key(intptr_t i) { 456 RawObject** get_key(intptr_t i) {
(...skipping 23 matching lines...) Expand all
480 480
481 static void Push(WeakReferenceSet* reference_set, WeakReferenceSet** queue) { 481 static void Push(WeakReferenceSet* reference_set, WeakReferenceSet** queue) {
482 ASSERT(reference_set != NULL); 482 ASSERT(reference_set != NULL);
483 ASSERT(queue != NULL); 483 ASSERT(queue != NULL);
484 reference_set->next_ = *queue; 484 reference_set->next_ = *queue;
485 *queue = reference_set; 485 *queue = reference_set;
486 } 486 }
487 487
488 private: 488 private:
489 WeakReferenceSet* next_; 489 WeakReferenceSet* next_;
490 Dart_Handle* keys_; 490 Dart_WeakPersistentHandle* keys_;
491 intptr_t num_keys_; 491 intptr_t num_keys_;
492 Dart_Handle* values_; 492 Dart_WeakPersistentHandle* values_;
493 intptr_t num_values_; 493 intptr_t num_values_;
494 DISALLOW_COPY_AND_ASSIGN(WeakReferenceSet); 494 DISALLOW_COPY_AND_ASSIGN(WeakReferenceSet);
495 }; 495 };
496 496
497 497
498 // Structure used for the implementation of local scopes used in dart_api. 498 // Structure used for the implementation of local scopes used in dart_api.
499 // These local scopes manage handles and memory allocated in the scope. 499 // These local scopes manage handles and memory allocated in the scope.
500 class ApiLocalScope { 500 class ApiLocalScope {
501 public: 501 public:
502 ApiLocalScope(ApiLocalScope* previous, uword stack_marker) : 502 ApiLocalScope(ApiLocalScope* previous, uword stack_marker) :
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 ApiNativeScope::Current()->zone()) {} 731 ApiNativeScope::Current()->zone()) {}
732 ApiGrowableArray() 732 ApiGrowableArray()
733 : BaseGrowableArray<T, ValueObject>( 733 : BaseGrowableArray<T, ValueObject>(
734 ApiNativeScope::Current()->zone()) {} 734 ApiNativeScope::Current()->zone()) {}
735 }; 735 };
736 736
737 737
738 } // namespace dart 738 } // namespace dart
739 739
740 #endif // VM_DART_API_STATE_H_ 740 #endif // VM_DART_API_STATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698