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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 9b60bc555813e0e1d160e3668e312861f56c3969..670ed9c0ff1ca234f4488087ef9d31aa499c7de3 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -41,9 +41,10 @@ namespace v8 {
namespace internal {
-static SaveFPRegsMode GetSaveFPRegsMode() {
+static SaveFPRegsMode GetSaveFPRegsMode(Isolate* isolate) {
// We don't need to save floating point regs when generating the snapshot
- return CpuFeatures::IsSafeForSnapshot(SSE2) ? kSaveFPRegs : kDontSaveFPRegs;
+ return CpuFeatures::IsSafeForSnapshot(isolate, SSE2) ? kSaveFPRegs
+ : kDontSaveFPRegs;
}
@@ -406,7 +407,7 @@ void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) {
x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr));
} else if (FLAG_debug_code && FLAG_enable_slow_asserts &&
!instr->IsGap() && !instr->IsReturn()) {
- if (instr->ClobbersDoubleRegisters()) {
+ if (instr->ClobbersDoubleRegisters(isolate())) {
if (instr->HasDoubleRegisterResult()) {
ASSERT_EQ(1, x87_stack_.depth());
} else {
@@ -705,7 +706,7 @@ void LCodeGen::X87PrepareBinaryOp(
void LCodeGen::X87Stack::FlushIfNecessary(LInstruction* instr, LCodeGen* cgen) {
- if (stack_depth_ > 0 && instr->ClobbersDoubleRegisters()) {
+ if (stack_depth_ > 0 && instr->ClobbersDoubleRegisters(isolate())) {
bool double_inputs = instr->HasDoubleRegisterInput();
// Flush stack from tos down, since FreeX87() will mess with tos
@@ -1992,7 +1993,7 @@ void LCodeGen::DoConstantD(LConstantD* instr) {
int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt));
ASSERT(instr->result()->IsDoubleRegister());
- if (!CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (!CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
__ push(Immediate(upper));
__ push(Immediate(lower));
X87Register reg = ToX87Register(instr->result());
@@ -2265,7 +2266,7 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) {
void LCodeGen::DoArithmeticD(LArithmeticD* instr) {
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister left = ToDoubleRegister(instr->left());
XMMRegister right = ToDoubleRegister(instr->right());
@@ -2510,7 +2511,7 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ cmp(FieldOperand(reg, HeapObject::kMapOffset),
factory()->heap_number_map());
__ j(not_equal, &not_heap_number, Label::kNear);
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister xmm_scratch = double_scratch0();
__ xorps(xmm_scratch, xmm_scratch);
@@ -2597,7 +2598,7 @@ void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
EmitGoto(next_block);
} else {
if (instr->is_double()) {
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
__ ucomisd(ToDoubleRegister(left), ToDoubleRegister(right));
} else {
@@ -3273,7 +3274,7 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
offset,
value,
temp,
- GetSaveFPRegsMode(),
+ GetSaveFPRegsMode(isolate()),
EMIT_REMEMBERED_SET,
check_needed);
}
@@ -4440,7 +4441,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
HeapObject::kMapOffset,
temp_map,
temp,
- GetSaveFPRegsMode(),
+ GetSaveFPRegsMode(isolate()),
OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK);
}
@@ -4481,7 +4482,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
offset,
value,
temp,
- GetSaveFPRegsMode(),
+ GetSaveFPRegsMode(isolate()),
EMIT_REMEMBERED_SET,
check_needed);
}
@@ -4541,7 +4542,7 @@ void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) {
instr->additional_index()));
if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS ||
elements_kind == FLOAT32_ELEMENTS) {
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister xmm_scratch = double_scratch0();
__ cvtsd2ss(xmm_scratch, ToDoubleRegister(instr->value()));
@@ -4552,7 +4553,7 @@ void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) {
}
} else if (elements_kind == EXTERNAL_FLOAT64_ELEMENTS ||
elements_kind == FLOAT64_ELEMENTS) {
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
__ movsd(operand, ToDoubleRegister(instr->value()));
} else {
@@ -4611,7 +4612,7 @@ void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) {
FixedDoubleArray::kHeaderSize - kHeapObjectTag,
instr->additional_index());
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister value = ToDoubleRegister(instr->value());
@@ -4713,7 +4714,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) {
__ RecordWrite(elements,
key,
value,
- GetSaveFPRegsMode(),
+ GetSaveFPRegsMode(isolate()),
EMIT_REMEMBERED_SET,
check_needed);
}
@@ -5450,7 +5451,7 @@ void LCodeGen::DoDoubleToI(LDoubleToI* instr) {
Register result_reg = ToRegister(result);
if (instr->truncating()) {
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister input_reg = ToDoubleRegister(input);
__ TruncateDoubleToI(result_reg, input_reg);
@@ -5461,7 +5462,7 @@ void LCodeGen::DoDoubleToI(LDoubleToI* instr) {
}
} else {
Label bailout, done;
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister input_reg = ToDoubleRegister(input);
XMMRegister xmm_scratch = double_scratch0();
@@ -5489,7 +5490,7 @@ void LCodeGen::DoDoubleToSmi(LDoubleToSmi* instr) {
Register result_reg = ToRegister(result);
Label bailout, done;
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
+ if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
XMMRegister input_reg = ToDoubleRegister(input);
XMMRegister xmm_scratch = double_scratch0();

Powered by Google App Engine
This is Rietveld 408576698