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

Unified Diff: src/api.h

Issue 199021: Changed saved context stack to using direct pointers. Before we would... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.h
===================================================================
--- src/api.h (revision 2819)
+++ src/api.h (working copy)
@@ -352,8 +352,8 @@
// contexts have been entered.
inline Handle<Object> LastEnteredContext();
- inline void SaveContext(Handle<Object> context);
- inline Handle<Object> RestoreContext();
+ inline void SaveContext(Context* context);
+ inline Context* RestoreContext();
inline bool HasSavedContexts();
inline List<internal::Object**>* Blocks() { return &blocks; }
@@ -368,14 +368,12 @@
// Used as a stack to keep track of entered contexts.
List<Handle<Object> > entered_contexts_;
// Used as a stack to keep track of saved contexts.
- List<Handle<Object> > saved_contexts_;
+ List<Context*> saved_contexts_;
bool ignore_out_of_memory;
// This is only used for threading support.
v8::ImplementationUtilities::HandleScopeData handle_scope_data_;
- static void Iterate(ObjectVisitor* v,
- List<internal::Object**>* blocks,
- v8::ImplementationUtilities::HandleScopeData* handle_data);
+ void IterateThis(ObjectVisitor* v);
char* RestoreThreadHelper(char* from);
char* ArchiveThreadHelper(char* to);
@@ -386,12 +384,12 @@
static const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page
-void HandleScopeImplementer::SaveContext(Handle<Object> context) {
+void HandleScopeImplementer::SaveContext(Context* context) {
saved_contexts_.Add(context);
}
-Handle<Object> HandleScopeImplementer::RestoreContext() {
+Context* HandleScopeImplementer::RestoreContext() {
return saved_contexts_.RemoveLast();
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698