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

Side by Side Diff: src/api.cc

Issue 13786002: [WIP] New GC related APIs. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: use old testing machinery Created 7 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
« no previous file with comments | « include/v8.h ('k') | src/global-handles.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5779 matching lines...) Expand 10 before | Expand all | Expand 10 after
5790 RetainedObjectInfo* info) { 5790 RetainedObjectInfo* info) {
5791 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate); 5791 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate);
5792 ASSERT(isolate == i::Isolate::Current()); 5792 ASSERT(isolate == i::Isolate::Current());
5793 if (IsDeadCheck(isolate, "v8::V8::AddObjectGroup()")) return; 5793 if (IsDeadCheck(isolate, "v8::V8::AddObjectGroup()")) return;
5794 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); 5794 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
5795 isolate->global_handles()->AddObjectGroup( 5795 isolate->global_handles()->AddObjectGroup(
5796 reinterpret_cast<i::Object***>(objects), length, info); 5796 reinterpret_cast<i::Object***>(objects), length, info);
5797 } 5797 }
5798 5798
5799 5799
5800 void V8::SetObjectGroupId(Isolate* exported_isolate,
5801 const Persistent<Value>& object,
5802 UniqueId id) {
5803 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate);
5804 isolate->global_handles()->SetObjectGroupId(
5805 reinterpret_cast<i::Object**>(*object), id);
5806 }
5807
5808
5809 void V8::SetRetainedObjectInfo(Isolate* exported_isolate,
5810 UniqueId id,
5811 RetainedObjectInfo* info) {
5812 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate);
5813 isolate->global_handles()->SetRetainedObjectInfo(id, info);
5814 }
5815
5816
5800 void V8::AddImplicitReferences(Persistent<Object> parent, 5817 void V8::AddImplicitReferences(Persistent<Object> parent,
5801 Persistent<Value>* children, 5818 Persistent<Value>* children,
5802 size_t length) { 5819 size_t length) {
5803 i::Isolate* isolate = i::Isolate::Current(); 5820 i::Isolate* isolate = i::Isolate::Current();
5804 if (IsDeadCheck(isolate, "v8::V8::AddImplicitReferences()")) return; 5821 if (IsDeadCheck(isolate, "v8::V8::AddImplicitReferences()")) return;
5805 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); 5822 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
5806 isolate->global_handles()->AddImplicitReferences( 5823 isolate->global_handles()->AddImplicitReferences(
5807 i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*parent)).location(), 5824 i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*parent)).location(),
5808 reinterpret_cast<i::Object***>(children), length); 5825 reinterpret_cast<i::Object***>(children), length);
5809 } 5826 }
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
7250 7267
7251 v->VisitPointers(blocks_.first(), first_block_limit_); 7268 v->VisitPointers(blocks_.first(), first_block_limit_);
7252 7269
7253 for (int i = 1; i < blocks_.length(); i++) { 7270 for (int i = 1; i < blocks_.length(); i++) {
7254 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 7271 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
7255 } 7272 }
7256 } 7273 }
7257 7274
7258 7275
7259 } } // namespace v8::internal 7276 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698