| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 46d80506edd887ce2f1b4915a3f6e04e0248fad0..ff92be13f3cd40d1abf085ea17e331c325869c64 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -490,14 +490,18 @@ void LCodeGen::CallRuntimeFromDeferred(Runtime::FunctionId id,
|
| int argc,
|
| LInstruction* instr,
|
| LOperand* context) {
|
| - ASSERT(context->IsRegister() || context->IsStackSlot());
|
| if (context->IsRegister()) {
|
| if (!ToRegister(context).is(esi)) {
|
| __ mov(esi, ToRegister(context));
|
| }
|
| - } else {
|
| - // Context is stack slot.
|
| + } else if (context->IsStackSlot()) {
|
| __ mov(esi, ToOperand(context));
|
| + } else if (context->IsConstantOperand()) {
|
| + Handle<Object> literal =
|
| + chunk_->LookupLiteral(LConstantOperand::cast(context));
|
| + LoadHeapObject(esi, Handle<Context>::cast(literal));
|
| + } else {
|
| + UNREACHABLE();
|
| }
|
|
|
| __ CallRuntimeSaveDoubles(id);
|
| @@ -1209,8 +1213,13 @@ void LCodeGen::DoConstantD(LConstantD* instr) {
|
|
|
|
|
| void LCodeGen::DoConstantT(LConstantT* instr) {
|
| - ASSERT(instr->result()->IsRegister());
|
| - __ Set(ToRegister(instr->result()), Immediate(instr->value()));
|
| + Register reg = ToRegister(instr->result());
|
| + Handle<Object> handle = instr->value();
|
| + if (handle->IsHeapObject()) {
|
| + LoadHeapObject(reg, Handle<HeapObject>::cast(handle));
|
| + } else {
|
| + __ Set(reg, Immediate(handle));
|
| + }
|
| }
|
|
|
|
|
|
|