OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 417 |
418 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { | 418 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { |
419 if (op->IsRegister()) { | 419 if (op->IsRegister()) { |
420 return ToRegister(op->index()); | 420 return ToRegister(op->index()); |
421 } else if (op->IsConstantOperand()) { | 421 } else if (op->IsConstantOperand()) { |
422 LConstantOperand* const_op = LConstantOperand::cast(op); | 422 LConstantOperand* const_op = LConstantOperand::cast(op); |
423 HConstant* constant = chunk_->LookupConstant(const_op); | 423 HConstant* constant = chunk_->LookupConstant(const_op); |
424 Handle<Object> literal = constant->handle(isolate()); | 424 Handle<Object> literal = constant->handle(isolate()); |
425 Representation r = chunk_->LookupLiteralRepresentation(const_op); | 425 Representation r = chunk_->LookupLiteralRepresentation(const_op); |
426 if (r.IsInteger32()) { | 426 if (r.IsInteger32()) { |
| 427 AllowDeferredHandleDereference get_number; |
427 DCHECK(literal->IsNumber()); | 428 DCHECK(literal->IsNumber()); |
428 __ li(scratch, Operand(static_cast<int32_t>(literal->Number()))); | 429 __ li(scratch, Operand(static_cast<int32_t>(literal->Number()))); |
429 } else if (r.IsSmi()) { | 430 } else if (r.IsSmi()) { |
430 DCHECK(constant->HasSmiValue()); | 431 DCHECK(constant->HasSmiValue()); |
431 __ li(scratch, Operand(Smi::FromInt(constant->Integer32Value()))); | 432 __ li(scratch, Operand(Smi::FromInt(constant->Integer32Value()))); |
432 } else if (r.IsDouble()) { | 433 } else if (r.IsDouble()) { |
433 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate); | 434 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate); |
434 } else { | 435 } else { |
435 DCHECK(r.IsSmiOrTagged()); | 436 DCHECK(r.IsSmiOrTagged()); |
436 __ li(scratch, literal); | 437 __ li(scratch, literal); |
(...skipping 5591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6028 __ Push(at, ToRegister(instr->function())); | 6029 __ Push(at, ToRegister(instr->function())); |
6029 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6030 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6030 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6031 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6031 } | 6032 } |
6032 | 6033 |
6033 | 6034 |
6034 #undef __ | 6035 #undef __ |
6035 | 6036 |
6036 } // namespace internal | 6037 } // namespace internal |
6037 } // namespace v8 | 6038 } // namespace v8 |
OLD | NEW |