Commit 979cd4b0 authored by ulan@chromium.org's avatar ulan@chromium.org

Disable tracking of double fields during snapshot creation.

Follow-up to r18298.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/101123004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4a0959e3
......@@ -4061,7 +4061,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
__ SmiTst(value);
DeoptimizeIf(eq, instr->environment());
}
} else if (FLAG_track_double_fields && representation.IsDouble()) {
} else if (representation.IsDouble()) {
ASSERT(transition.is_null());
ASSERT(access.IsInobject());
ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
......
......@@ -2556,12 +2556,31 @@ void Genesis::MakeFunctionInstancePrototypeWritable() {
}
class NoTrackDoubleFieldsForSerializerScope {
public:
NoTrackDoubleFieldsForSerializerScope() : flag_(FLAG_track_double_fields) {
if (Serializer::enabled()) {
// Disable tracking double fields because heap numbers treated as
// immutable by the serializer.
FLAG_track_double_fields = false;
}
}
~NoTrackDoubleFieldsForSerializerScope() {
FLAG_track_double_fields = flag_;
}
private:
bool flag_;
};
Genesis::Genesis(Isolate* isolate,
Handle<Object> global_object,
v8::Handle<v8::ObjectTemplate> global_template,
v8::ExtensionConfiguration* extensions)
: isolate_(isolate),
active_(isolate->bootstrapper()) {
NoTrackDoubleFieldsForSerializerScope disable_double_tracking_for_serializer;
result_ = Handle<Context>::null();
// If V8 cannot be initialized, just return.
if (!V8::Initialize(NULL)) return;
......
......@@ -3213,8 +3213,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
}
Register object = ToRegister(instr->object());
if (FLAG_track_double_fields &&
instr->hydrogen()->representation().IsDouble()) {
if (instr->hydrogen()->representation().IsDouble()) {
if (CpuFeatures::IsSupported(SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister result = ToDoubleRegister(instr->result());
......@@ -4314,7 +4313,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
DeoptimizeIf(zero, instr->environment());
}
}
} else if (FLAG_track_double_fields && representation.IsDouble()) {
} else if (representation.IsDouble()) {
ASSERT(transition.is_null());
ASSERT(access.IsInobject());
ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
......
......@@ -3999,7 +3999,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
__ SmiTst(value, scratch);
DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
}
} else if (FLAG_track_double_fields && representation.IsDouble()) {
} else if (representation.IsDouble()) {
ASSERT(transition.is_null());
ASSERT(access.IsInobject());
ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
......
......@@ -2764,8 +2764,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
}
Register object = ToRegister(instr->object());
if (FLAG_track_double_fields &&
instr->hydrogen()->representation().IsDouble()) {
if (instr->hydrogen()->representation().IsDouble()) {
XMMRegister result = ToDoubleRegister(instr->result());
__ movsd(result, FieldOperand(object, offset));
return;
......@@ -3891,7 +3890,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
DeoptimizeIf(cc, instr->environment());
}
}
} else if (FLAG_track_double_fields && representation.IsDouble()) {
} else if (representation.IsDouble()) {
ASSERT(transition.is_null());
ASSERT(access.IsInobject());
ASSERT(!hinstr->NeedsWriteBarrier());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment