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

Side by Side Diff: src/objects.cc

Issue 6788023: Per-isolate v8::Locker and v8::Unlocker (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New tests for IsLocker 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4931 matching lines...) Expand 10 before | Expand all | Expand 10 after
4942 } 4942 }
4943 4943
4944 4944
4945 // Reserve space for statics needing saving and restoring. 4945 // Reserve space for statics needing saving and restoring.
4946 int Relocatable::ArchiveSpacePerThread() { 4946 int Relocatable::ArchiveSpacePerThread() {
4947 return sizeof(Isolate::Current()->relocatable_top()); 4947 return sizeof(Isolate::Current()->relocatable_top());
4948 } 4948 }
4949 4949
4950 4950
4951 // Archive statics that are thread local. 4951 // Archive statics that are thread local.
4952 char* Relocatable::ArchiveState(char* to) { 4952 char* Relocatable::ArchiveState(Isolate* isolate, char* to) {
4953 Isolate* isolate = Isolate::Current();
4954 *reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top(); 4953 *reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top();
4955 isolate->set_relocatable_top(NULL); 4954 isolate->set_relocatable_top(NULL);
4956 return to + ArchiveSpacePerThread(); 4955 return to + ArchiveSpacePerThread();
4957 } 4956 }
4958 4957
4959 4958
4960 // Restore statics that are thread local. 4959 // Restore statics that are thread local.
4961 char* Relocatable::RestoreState(char* from) { 4960 char* Relocatable::RestoreState(Isolate* isolate, char* from) {
4962 Isolate* isolate = Isolate::Current();
4963 isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from)); 4961 isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from));
4964 return from + ArchiveSpacePerThread(); 4962 return from + ArchiveSpacePerThread();
4965 } 4963 }
4966 4964
4967 4965
4968 char* Relocatable::Iterate(ObjectVisitor* v, char* thread_storage) { 4966 char* Relocatable::Iterate(ObjectVisitor* v, char* thread_storage) {
4969 Relocatable* top = *reinterpret_cast<Relocatable**>(thread_storage); 4967 Relocatable* top = *reinterpret_cast<Relocatable**>(thread_storage);
4970 Iterate(v, top); 4968 Iterate(v, top);
4971 return thread_storage + ArchiveSpacePerThread(); 4969 return thread_storage + ArchiveSpacePerThread();
4972 } 4970 }
(...skipping 5344 matching lines...) Expand 10 before | Expand all | Expand 10 after
10317 if (break_point_objects()->IsUndefined()) return 0; 10315 if (break_point_objects()->IsUndefined()) return 0;
10318 // Single beak point. 10316 // Single beak point.
10319 if (!break_point_objects()->IsFixedArray()) return 1; 10317 if (!break_point_objects()->IsFixedArray()) return 1;
10320 // Multiple break points. 10318 // Multiple break points.
10321 return FixedArray::cast(break_point_objects())->length(); 10319 return FixedArray::cast(break_point_objects())->length();
10322 } 10320 }
10323 #endif 10321 #endif
10324 10322
10325 10323
10326 } } // namespace v8::internal 10324 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698