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

Side by Side Diff: src/objects.cc

Issue 6903154: Revert "This implements per-isolate locking and unlocking, including tests" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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 | « src/objects.h ('k') | src/top.cc » ('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 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 4940 matching lines...) Expand 10 before | Expand all | Expand 10 after
4951 } 4951 }
4952 4952
4953 4953
4954 // Reserve space for statics needing saving and restoring. 4954 // Reserve space for statics needing saving and restoring.
4955 int Relocatable::ArchiveSpacePerThread() { 4955 int Relocatable::ArchiveSpacePerThread() {
4956 return sizeof(Isolate::Current()->relocatable_top()); 4956 return sizeof(Isolate::Current()->relocatable_top());
4957 } 4957 }
4958 4958
4959 4959
4960 // Archive statics that are thread local. 4960 // Archive statics that are thread local.
4961 char* Relocatable::ArchiveState(Isolate* isolate, char* to) { 4961 char* Relocatable::ArchiveState(char* to) {
4962 Isolate* isolate = Isolate::Current();
4962 *reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top(); 4963 *reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top();
4963 isolate->set_relocatable_top(NULL); 4964 isolate->set_relocatable_top(NULL);
4964 return to + ArchiveSpacePerThread(); 4965 return to + ArchiveSpacePerThread();
4965 } 4966 }
4966 4967
4967 4968
4968 // Restore statics that are thread local. 4969 // Restore statics that are thread local.
4969 char* Relocatable::RestoreState(Isolate* isolate, char* from) { 4970 char* Relocatable::RestoreState(char* from) {
4971 Isolate* isolate = Isolate::Current();
4970 isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from)); 4972 isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from));
4971 return from + ArchiveSpacePerThread(); 4973 return from + ArchiveSpacePerThread();
4972 } 4974 }
4973 4975
4974 4976
4975 char* Relocatable::Iterate(ObjectVisitor* v, char* thread_storage) { 4977 char* Relocatable::Iterate(ObjectVisitor* v, char* thread_storage) {
4976 Relocatable* top = *reinterpret_cast<Relocatable**>(thread_storage); 4978 Relocatable* top = *reinterpret_cast<Relocatable**>(thread_storage);
4977 Iterate(v, top); 4979 Iterate(v, top);
4978 return thread_storage + ArchiveSpacePerThread(); 4980 return thread_storage + ArchiveSpacePerThread();
4979 } 4981 }
(...skipping 5442 matching lines...) Expand 10 before | Expand all | Expand 10 after
10422 if (break_point_objects()->IsUndefined()) return 0; 10424 if (break_point_objects()->IsUndefined()) return 0;
10423 // Single beak point. 10425 // Single beak point.
10424 if (!break_point_objects()->IsFixedArray()) return 1; 10426 if (!break_point_objects()->IsFixedArray()) return 1;
10425 // Multiple break points. 10427 // Multiple break points.
10426 return FixedArray::cast(break_point_objects())->length(); 10428 return FixedArray::cast(break_point_objects())->length();
10427 } 10429 }
10428 #endif 10430 #endif
10429 10431
10430 10432
10431 } } // namespace v8::internal 10433 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698