Revision: 3938
Author: [email protected]
Date: Wed Feb 24 04:30:09 2010
Log: Allow snapshots built without -DANDROID to work on Android.
Fix bug in fast code generator on ARM (can't use ip as scratch
in RecordWrite).
Activate normal-sized compilation cache on Android.
Review URL: http://codereview.chromium.org/657077
http://code.google.com/p/v8/source/detail?r=3938
Modified:
/branches/experimental/partial_snapshots/src/arm/fast-codegen-arm.cc
/branches/experimental/partial_snapshots/src/arm/macro-assembler-arm.cc
/branches/experimental/partial_snapshots/src/assembler.cc
/branches/experimental/partial_snapshots/src/assembler.h
/branches/experimental/partial_snapshots/src/compilation-cache.cc
/branches/experimental/partial_snapshots/src/ia32/macro-assembler-ia32.cc
/branches/experimental/partial_snapshots/src/serialize.cc
/branches/experimental/partial_snapshots/test/cctest/test-serialize.cc
=======================================
--- /branches/experimental/partial_snapshots/src/arm/fast-codegen-arm.cc
Tue Feb 23 07:23:56 2010
+++ /branches/experimental/partial_snapshots/src/arm/fast-codegen-arm.cc
Wed Feb 24 04:30:09 2010
@@ -104,7 +104,7 @@
// Perform the store.
__ str(r0, FieldMemOperand(r2, offset));
__ mov(r3, Operand(offset));
- __ RecordWrite(r2, r3, ip);
+ __ RecordWrite(r2, r3, r4);
}
=======================================
--- /branches/experimental/partial_snapshots/src/arm/macro-assembler-arm.cc
Tue Feb 23 07:23:56 2010
+++ /branches/experimental/partial_snapshots/src/arm/macro-assembler-arm.cc
Wed Feb 24 04:30:09 2010
@@ -221,7 +221,7 @@
// remembered set bits in the new space.
// object: heap object pointer (with tag)
// offset: offset to store location from the object
- and_(scratch, object, Operand(Heap::NewSpaceMask()));
+ and_(scratch, object, Operand(ExternalReference::new_space_mask()));
cmp(scratch, Operand(ExternalReference::new_space_start()));
b(eq, &done);
=======================================
--- /branches/experimental/partial_snapshots/src/assembler.cc Fri Jan 29
02:33:27 2010
+++ /branches/experimental/partial_snapshots/src/assembler.cc Wed Feb 24
04:30:09 2010
@@ -607,6 +607,11 @@
ExternalReference ExternalReference::new_space_start() {
return ExternalReference(Heap::NewSpaceStart());
}
+
+
+ExternalReference ExternalReference::new_space_mask() {
+ return
ExternalReference(reinterpret_cast<Address>(Heap::NewSpaceMask()));
+}
ExternalReference ExternalReference::new_space_allocation_top_address() {
=======================================
--- /branches/experimental/partial_snapshots/src/assembler.h Tue Feb 23
07:23:56 2010
+++ /branches/experimental/partial_snapshots/src/assembler.h Wed Feb 24
04:30:09 2010
@@ -426,6 +426,7 @@
// Static variable Heap::NewSpaceStart()
static ExternalReference new_space_start();
+ static ExternalReference new_space_mask();
static ExternalReference heap_always_allocate_scope_depth();
// Used for fast allocation in generated code.
=======================================
--- /branches/experimental/partial_snapshots/src/compilation-cache.cc Wed
Feb 3 02:52:22 2010
+++ /branches/experimental/partial_snapshots/src/compilation-cache.cc Wed
Feb 24 04:30:09 2010
@@ -38,19 +38,12 @@
static const int kSubCacheCount = 4;
// The number of generations for each sub cache.
-#if defined(ANDROID)
-static const int kScriptGenerations = 1;
-static const int kEvalGlobalGenerations = 1;
-static const int kEvalContextualGenerations = 1;
-static const int kRegExpGenerations = 1;
-#else
// The number of ScriptGenerations is carefully chosen based on histograms.
// See issue 458: http://code.google.com/p/v8/issues/detail?id=458
static const int kScriptGenerations = 5;
static const int kEvalGlobalGenerations = 2;
static const int kEvalContextualGenerations = 2;
static const int kRegExpGenerations = 2;
-#endif
// Initial size of each compilation cache table allocated.
static const int kInitialCacheSize = 64;
=======================================
---
/branches/experimental/partial_snapshots/src/ia32/macro-assembler-ia32.cc
Tue Feb 23 07:23:56 2010
+++
/branches/experimental/partial_snapshots/src/ia32/macro-assembler-ia32.cc
Wed Feb 24 04:30:09 2010
@@ -165,7 +165,10 @@
if (Serializer::enabled()) {
// Can't do arithmetic on external references if it might get
serialized.
mov(value, Operand(object));
- and_(value, Heap::NewSpaceMask());
+ // The mask isn't really an address. We load it as an external
reference in
+ // case the size of the new space is different between the snapshot
maker
+ // and the running system.
+ and_(Operand(value), Immediate(ExternalReference::new_space_mask()));
cmp(Operand(value), Immediate(ExternalReference::new_space_start()));
j(equal, &done);
} else {
=======================================
--- /branches/experimental/partial_snapshots/src/serialize.cc Mon Feb 22
06:14:33 2010
+++ /branches/experimental/partial_snapshots/src/serialize.cc Wed Feb 24
04:30:09 2010
@@ -359,78 +359,82 @@
UNCLASSIFIED,
7,
"Heap::NewSpaceStart()");
- Add(ExternalReference::heap_always_allocate_scope_depth().address(),
+ Add(ExternalReference::new_space_mask().address(),
UNCLASSIFIED,
8,
+ "Heap::NewSpaceMask()");
+ Add(ExternalReference::heap_always_allocate_scope_depth().address(),
+ UNCLASSIFIED,
+ 9,
"Heap::always_allocate_scope_depth()");
Add(ExternalReference::new_space_allocation_limit_address().address(),
UNCLASSIFIED,
- 9,
+ 10,
"Heap::NewSpaceAllocationLimitAddress()");
Add(ExternalReference::new_space_allocation_top_address().address(),
UNCLASSIFIED,
- 10,
+ 11,
"Heap::NewSpaceAllocationTopAddress()");
#ifdef ENABLE_DEBUGGER_SUPPORT
Add(ExternalReference::debug_break().address(),
UNCLASSIFIED,
- 11,
+ 12,
"Debug::Break()");
Add(ExternalReference::debug_step_in_fp_address().address(),
UNCLASSIFIED,
- 12,
+ 13,
"Debug::step_in_fp_addr()");
#endif
Add(ExternalReference::double_fp_operation(Token::ADD).address(),
UNCLASSIFIED,
- 13,
+ 14,
"add_two_doubles");
Add(ExternalReference::double_fp_operation(Token::SUB).address(),
UNCLASSIFIED,
- 14,
+ 15,
"sub_two_doubles");
Add(ExternalReference::double_fp_operation(Token::MUL).address(),
UNCLASSIFIED,
- 15,
+ 16,
"mul_two_doubles");
Add(ExternalReference::double_fp_operation(Token::DIV).address(),
UNCLASSIFIED,
- 16,
+ 17,
"div_two_doubles");
Add(ExternalReference::double_fp_operation(Token::MOD).address(),
UNCLASSIFIED,
- 17,
+ 18,
"mod_two_doubles");
Add(ExternalReference::compare_doubles().address(),
UNCLASSIFIED,
- 18,
+ 19,
"compare_doubles");
#ifdef V8_NATIVE_REGEXP
Add(ExternalReference::re_case_insensitive_compare_uc16().address(),
UNCLASSIFIED,
- 19,
+ 20,
"NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()");
Add(ExternalReference::re_check_stack_guard_state().address(),
UNCLASSIFIED,
- 20,
+ 21,
"RegExpMacroAssembler*::CheckStackGuardState()");
Add(ExternalReference::re_grow_stack().address(),
UNCLASSIFIED,
- 21,
+ 22,
"NativeRegExpMacroAssembler::GrowStack()");
Add(ExternalReference::re_word_character_map().address(),
UNCLASSIFIED,
- 22,
+ 23,
"NativeRegExpMacroAssembler::word_character_map");
#endif
// Keyed lookup cache.
Add(ExternalReference::keyed_lookup_cache_keys().address(),
UNCLASSIFIED,
- 23,
+ 24,
"KeyedLookupCache::keys()");
Add(ExternalReference::keyed_lookup_cache_field_offsets().address(),
UNCLASSIFIED,
- 24,
+ 25,
"KeyedLookupCache::field_offsets()");
}
=======================================
--- /branches/experimental/partial_snapshots/test/cctest/test-serialize.cc
Fri Feb 5 01:40:21 2010
+++ /branches/experimental/partial_snapshots/test/cctest/test-serialize.cc
Wed Feb 24 04:30:09 2010
@@ -131,7 +131,7 @@
ExternalReference::address_of_real_stack_limit();
CHECK_EQ(make_code(UNCLASSIFIED, 5),
encoder.Encode(real_stack_limit_address.address()));
- CHECK_EQ(make_code(UNCLASSIFIED, 11),
+ CHECK_EQ(make_code(UNCLASSIFIED, 12),
encoder.Encode(ExternalReference::debug_break().address()));
CHECK_EQ(make_code(UNCLASSIFIED, 7),
encoder.Encode(ExternalReference::new_space_start().address()));
@@ -165,7 +165,7 @@
CHECK_EQ(ExternalReference::address_of_real_stack_limit().address(),
decoder.Decode(make_code(UNCLASSIFIED, 5)));
CHECK_EQ(ExternalReference::debug_break().address(),
- decoder.Decode(make_code(UNCLASSIFIED, 11)));
+ decoder.Decode(make_code(UNCLASSIFIED, 12)));
CHECK_EQ(ExternalReference::new_space_start().address(),
decoder.Decode(make_code(UNCLASSIFIED, 7)));
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev