Push version 1.3.10 to trunk.
Fixed profiler on Mac in 64-bit mode.
Optimized creation of objects from simple constructor functions on ARM.
Fixed a number of debugger issues.
Reduced the amount of memory consumed by V8.
git-svn-id: http://v8.googlecode.com/svn/trunk@2866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/serialize.cc b/src/serialize.cc
index a16032a..c894762 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -70,7 +70,7 @@
// These values are special allocation space tags used for
// serialization.
-// Mar the pages executable on platforms that support it.
+// Mark the pages executable on platforms that support it.
const int kLargeCode = LAST_SPACE + 1;
// Allocate extra remembered-set bits.
const int kLargeFixedArray = LAST_SPACE + 2;
@@ -541,7 +541,7 @@
#undef DEF_ENTRY_A
// Runtime functions
-#define RUNTIME_ENTRY(name, nargs) \
+#define RUNTIME_ENTRY(name, nargs, ressize) \
{ RUNTIME_FUNCTION, \
Runtime::k##name, \
"Runtime::" #name },
@@ -1201,19 +1201,25 @@
void Serializer::PutContextStack() {
- List<Handle<Object> > contexts(2);
+ List<Context*> contexts(2);
while (HandleScopeImplementer::instance()->HasSavedContexts()) {
- Handle<Object> context =
+ Context* context =
HandleScopeImplementer::instance()->RestoreContext();
contexts.Add(context);
}
for (int i = contexts.length() - 1; i >= 0; i--) {
HandleScopeImplementer::instance()->SaveContext(contexts[i]);
}
- PutGlobalHandleStack(contexts);
+ writer_->PutC('C');
+ writer_->PutC('[');
+ writer_->PutInt(contexts.length());
+ if (!contexts.is_empty()) {
+ Object** start = reinterpret_cast<Object**>(&contexts.first());
+ VisitPointers(start, start + contexts.length());
+ }
+ writer_->PutC(']');
}
-
void Serializer::PutEncodedAddress(Address addr) {
writer_->PutC('P');
writer_->PutAddress(addr);
@@ -1541,9 +1547,16 @@
void Deserializer::GetContextStack() {
- List<Handle<Object> > entered_contexts(2);
- GetGlobalHandleStack(&entered_contexts);
- for (int i = 0; i < entered_contexts.length(); i++) {
+ reader_.ExpectC('C');
+ CHECK_EQ(reader_.GetC(), '[');
+ int count = reader_.GetInt();
+ List<Context*> entered_contexts(count);
+ if (count > 0) {
+ Object** start = reinterpret_cast<Object**>(&entered_contexts.first());
+ VisitPointers(start, start + count);
+ }
+ reader_.ExpectC(']');
+ for (int i = 0; i < count; i++) {
HandleScopeImplementer::instance()->SaveContext(entered_contexts[i]);
}
}