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

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: Fixes for simulator (arm/mips) 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 4939 matching lines...) Expand 10 before | Expand all | Expand 10 after
4950 } 4950 }
4951 4951
4952 4952
4953 // Reserve space for statics needing saving and restoring. 4953 // Reserve space for statics needing saving and restoring.
4954 int Relocatable::ArchiveSpacePerThread() { 4954 int Relocatable::ArchiveSpacePerThread() {
4955 return sizeof(Isolate::Current()->relocatable_top()); 4955 return sizeof(Isolate::Current()->relocatable_top());
4956 } 4956 }
4957 4957
4958 4958
4959 // Archive statics that are thread local. 4959 // Archive statics that are thread local.
4960 char* Relocatable::ArchiveState(char* to) { 4960 char* Relocatable::ArchiveState(Isolate* isolate, char* to) {
4961 Isolate* isolate = Isolate::Current();
4962 *reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top(); 4961 *reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top();
4963 isolate->set_relocatable_top(NULL); 4962 isolate->set_relocatable_top(NULL);
4964 return to + ArchiveSpacePerThread(); 4963 return to + ArchiveSpacePerThread();
4965 } 4964 }
4966 4965
4967 4966
4968 // Restore statics that are thread local. 4967 // Restore statics that are thread local.
4969 char* Relocatable::RestoreState(char* from) { 4968 char* Relocatable::RestoreState(Isolate* isolate, char* from) {
4970 Isolate* isolate = Isolate::Current();
4971 isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from)); 4969 isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from));
4972 return from + ArchiveSpacePerThread(); 4970 return from + ArchiveSpacePerThread();
4973 } 4971 }
4974 4972
4975 4973
4976 char* Relocatable::Iterate(ObjectVisitor* v, char* thread_storage) { 4974 char* Relocatable::Iterate(ObjectVisitor* v, char* thread_storage) {
4977 Relocatable* top = *reinterpret_cast<Relocatable**>(thread_storage); 4975 Relocatable* top = *reinterpret_cast<Relocatable**>(thread_storage);
4978 Iterate(v, top); 4976 Iterate(v, top);
4979 return thread_storage + ArchiveSpacePerThread(); 4977 return thread_storage + ArchiveSpacePerThread();
4980 } 4978 }
(...skipping 5442 matching lines...) Expand 10 before | Expand all | Expand 10 after
10423 if (break_point_objects()->IsUndefined()) return 0; 10421 if (break_point_objects()->IsUndefined()) return 0;
10424 // Single beak point. 10422 // Single beak point.
10425 if (!break_point_objects()->IsFixedArray()) return 1; 10423 if (!break_point_objects()->IsFixedArray()) return 1;
10426 // Multiple break points. 10424 // Multiple break points.
10427 return FixedArray::cast(break_point_objects())->length(); 10425 return FixedArray::cast(break_point_objects())->length();
10428 } 10426 }
10429 #endif 10427 #endif
10430 10428
10431 10429
10432 } } // namespace v8::internal 10430 } } // 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