From e5eaef56d2281fee773b8192300136fab522e6ed Mon Sep 17 00:00:00 2001 From: "palfia@homejinni.com" Date: Mon, 9 Sep 2013 15:02:41 +0000 Subject: [PATCH] MIPS: thread isolate for HConstant::handle. Port r16587 (45fc067) BUG= Review URL: https://codereview.chromium.org/23444041 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/lithium-codegen-mips.cc | 12 ++++++------ src/mips/lithium-mips.h | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index e7f05a6646..d346428151 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -398,7 +398,7 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { } else if (op->IsConstantOperand()) { LConstantOperand* const_op = LConstantOperand::cast(op); HConstant* constant = chunk_->LookupConstant(const_op); - Handle literal = constant->handle(); + Handle literal = constant->handle(isolate()); Representation r = chunk_->LookupLiteralRepresentation(const_op); if (r.IsInteger32()) { ASSERT(literal->IsNumber()); @@ -436,7 +436,7 @@ DoubleRegister LCodeGen::EmitLoadDoubleRegister(LOperand* op, } else if (op->IsConstantOperand()) { LConstantOperand* const_op = LConstantOperand::cast(op); HConstant* constant = chunk_->LookupConstant(const_op); - Handle literal = constant->handle(); + Handle literal = constant->handle(isolate()); Representation r = chunk_->LookupLiteralRepresentation(const_op); if (r.IsInteger32()) { ASSERT(literal->IsNumber()); @@ -462,7 +462,7 @@ DoubleRegister LCodeGen::EmitLoadDoubleRegister(LOperand* op, Handle LCodeGen::ToHandle(LConstantOperand* op) const { HConstant* constant = chunk_->LookupConstant(op); ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); - return constant->handle(); + return constant->handle(isolate()); } @@ -519,7 +519,7 @@ Operand LCodeGen::ToOperand(LOperand* op) { Abort(kToOperandUnsupportedDoubleImmediate); } ASSERT(r.IsTagged()); - return Operand(constant->handle()); + return Operand(constant->handle(isolate())); } else if (op->IsRegister()) { return Operand(ToRegister(op)); } else if (op->IsDoubleRegister()) { @@ -666,7 +666,7 @@ void LCodeGen::AddToTranslation(LEnvironment* environment, translation->StoreDoubleRegister(reg); } else if (op->IsConstantOperand()) { HConstant* constant = chunk()->LookupConstant(LConstantOperand::cast(op)); - int src_index = DefineDeoptimizationLiteral(constant->handle()); + int src_index = DefineDeoptimizationLiteral(constant->handle(isolate())); translation->StoreLiteral(src_index); } else { UNREACHABLE(); @@ -1686,7 +1686,7 @@ void LCodeGen::DoConstantE(LConstantE* instr) { void LCodeGen::DoConstantT(LConstantT* instr) { - Handle value = instr->value(); + Handle value = instr->value(isolate()); AllowDeferredHandleDereference smi_check; __ LoadObject(ToRegister(instr->result()), value); } diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h index 584682c13d..fa2aed5afe 100644 --- a/src/mips/lithium-mips.h +++ b/src/mips/lithium-mips.h @@ -1266,7 +1266,9 @@ class LConstantT V8_FINAL : public LTemplateInstruction<1, 0, 0> { DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") DECLARE_HYDROGEN_ACCESSOR(Constant) - Handle value() const { return hydrogen()->handle(); } + Handle value(Isolate* isolate) const { + return hydrogen()->handle(isolate); + } };