Reviewers: mvstanton,
Description:
Only crosscompile binary op stubs if we compile a snapshot.
BUG=
Please review this at https://codereview.chromium.org/26266005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+9, -2 lines):
M src/assembler.cc
M src/ia32/code-stubs-ia32.cc
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index
cd2bedd4287ea40655c12f56a5442e51c198d826..c6228eb353eaad7da8a18f10f8c5a84c07215f3e
100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -211,6 +211,9 @@ CpuFeatureScope::~CpuFeatureScope() {
PlatformFeatureScope::PlatformFeatureScope(CpuFeature f)
: old_cross_compile_(CpuFeatures::cross_compile_) {
+ // CpuFeatures is a global singleton, therefore this is only safe in
+ // single threaded code.
+ ASSERT(Serializer::enabled());
uint64_t mask = static_cast<uint64_t>(1) << f;
CpuFeatures::cross_compile_ |= mask;
}
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index
56798d32c1978329060653e49aac8801489de9be..beaf3206a6c1aff2e6fb72eaab8029a0358b73f1
100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -2918,8 +2918,12 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
RecordWriteStub::GenerateFixedRegStubsAheadOfTime(isolate);
ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
CreateAllocationSiteStub::GenerateAheadOfTime(isolate);
- PlatformFeatureScope sse2(SSE2);
- BinaryOpStub::GenerateAheadOfTime(isolate);
+ if (Serializer::enabled()) {
+ PlatformFeatureScope sse2(SSE2);
+ BinaryOpStub::GenerateAheadOfTime(isolate);
+ } else {
+ BinaryOpStub::GenerateAheadOfTime(isolate);
+ }
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.