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

Side by Side Diff: src/api.cc

Issue 6800003: Make object groups and implicit references a bit more lightweight. (Closed)
Patch Set: Review fixes Created 9 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 | « no previous file | 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 4455 matching lines...) Expand 10 before | Expand all | Expand 10 after
4466 } 4466 }
4467 4467
4468 4468
4469 void V8::AddImplicitReferences(Persistent<Object> parent, 4469 void V8::AddImplicitReferences(Persistent<Object> parent,
4470 Persistent<Value>* children, 4470 Persistent<Value>* children,
4471 size_t length) { 4471 size_t length) {
4472 i::Isolate* isolate = i::Isolate::Current(); 4472 i::Isolate* isolate = i::Isolate::Current();
4473 if (IsDeadCheck(isolate, "v8::V8::AddImplicitReferences()")) return; 4473 if (IsDeadCheck(isolate, "v8::V8::AddImplicitReferences()")) return;
4474 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); 4474 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
4475 isolate->global_handles()->AddImplicitReferences( 4475 isolate->global_handles()->AddImplicitReferences(
4476 *Utils::OpenHandle(*parent), 4476 i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*parent)).location(),
4477 reinterpret_cast<i::Object***>(children), length); 4477 reinterpret_cast<i::Object***>(children), length);
4478 } 4478 }
4479 4479
4480 4480
4481 int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) { 4481 int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
4482 i::Isolate* isolate = i::Isolate::Current(); 4482 i::Isolate* isolate = i::Isolate::Current();
4483 if (IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) { 4483 if (IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) {
4484 return 0; 4484 return 0;
4485 } 4485 }
4486 return isolate->heap()->AdjustAmountOfExternalAllocatedMemory( 4486 return isolate->heap()->AdjustAmountOfExternalAllocatedMemory(
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
5669 5669
5670 5670
5671 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5671 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5672 HandleScopeImplementer* scope_implementer = 5672 HandleScopeImplementer* scope_implementer =
5673 reinterpret_cast<HandleScopeImplementer*>(storage); 5673 reinterpret_cast<HandleScopeImplementer*>(storage);
5674 scope_implementer->IterateThis(v); 5674 scope_implementer->IterateThis(v);
5675 return storage + ArchiveSpacePerThread(); 5675 return storage + ArchiveSpacePerThread();
5676 } 5676 }
5677 5677
5678 } } // namespace v8::internal 5678 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698