OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 ExternalReference LCodeGen::ToExternalReference(LConstantOperand* op) const { | 443 ExternalReference LCodeGen::ToExternalReference(LConstantOperand* op) const { |
444 HConstant* constant = chunk_->LookupConstant(op); | 444 HConstant* constant = chunk_->LookupConstant(op); |
445 ASSERT(constant->HasExternalReferenceValue()); | 445 ASSERT(constant->HasExternalReferenceValue()); |
446 return constant->ExternalReferenceValue(); | 446 return constant->ExternalReferenceValue(); |
447 } | 447 } |
448 | 448 |
449 | 449 |
450 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { | 450 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { |
451 HConstant* constant = chunk_->LookupConstant(op); | 451 HConstant* constant = chunk_->LookupConstant(op); |
452 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); | 452 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); |
453 return constant->handle(); | 453 return constant->handle(isolate()); |
454 } | 454 } |
455 | 455 |
456 | 456 |
457 Operand LCodeGen::ToOperand(LOperand* op) const { | 457 Operand LCodeGen::ToOperand(LOperand* op) const { |
458 // Does not handle registers. In X64 assembler, plain registers are not | 458 // Does not handle registers. In X64 assembler, plain registers are not |
459 // representable as an Operand. | 459 // representable as an Operand. |
460 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot()); | 460 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot()); |
461 return Operand(rbp, StackSlotOffset(op->index())); | 461 return Operand(rbp, StackSlotOffset(op->index())); |
462 } | 462 } |
463 | 463 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 } else if (is_uint32) { | 575 } else if (is_uint32) { |
576 translation->StoreUint32Register(reg); | 576 translation->StoreUint32Register(reg); |
577 } else { | 577 } else { |
578 translation->StoreInt32Register(reg); | 578 translation->StoreInt32Register(reg); |
579 } | 579 } |
580 } else if (op->IsDoubleRegister()) { | 580 } else if (op->IsDoubleRegister()) { |
581 XMMRegister reg = ToDoubleRegister(op); | 581 XMMRegister reg = ToDoubleRegister(op); |
582 translation->StoreDoubleRegister(reg); | 582 translation->StoreDoubleRegister(reg); |
583 } else if (op->IsConstantOperand()) { | 583 } else if (op->IsConstantOperand()) { |
584 HConstant* constant = chunk()->LookupConstant(LConstantOperand::cast(op)); | 584 HConstant* constant = chunk()->LookupConstant(LConstantOperand::cast(op)); |
585 int src_index = DefineDeoptimizationLiteral(constant->handle()); | 585 int src_index = DefineDeoptimizationLiteral(constant->handle(isolate())); |
586 translation->StoreLiteral(src_index); | 586 translation->StoreLiteral(src_index); |
587 } else { | 587 } else { |
588 UNREACHABLE(); | 588 UNREACHABLE(); |
589 } | 589 } |
590 } | 590 } |
591 | 591 |
592 | 592 |
593 void LCodeGen::CallCodeGeneric(Handle<Code> code, | 593 void LCodeGen::CallCodeGeneric(Handle<Code> code, |
594 RelocInfo::Mode mode, | 594 RelocInfo::Mode mode, |
595 LInstruction* instr, | 595 LInstruction* instr, |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 } | 1591 } |
1592 } | 1592 } |
1593 | 1593 |
1594 | 1594 |
1595 void LCodeGen::DoConstantE(LConstantE* instr) { | 1595 void LCodeGen::DoConstantE(LConstantE* instr) { |
1596 __ LoadAddress(ToRegister(instr->result()), instr->value()); | 1596 __ LoadAddress(ToRegister(instr->result()), instr->value()); |
1597 } | 1597 } |
1598 | 1598 |
1599 | 1599 |
1600 void LCodeGen::DoConstantT(LConstantT* instr) { | 1600 void LCodeGen::DoConstantT(LConstantT* instr) { |
1601 Handle<Object> value = instr->value(); | 1601 Handle<Object> value = instr->value(isolate()); |
1602 AllowDeferredHandleDereference smi_check; | 1602 AllowDeferredHandleDereference smi_check; |
1603 __ LoadObject(ToRegister(instr->result()), value); | 1603 __ LoadObject(ToRegister(instr->result()), value); |
1604 } | 1604 } |
1605 | 1605 |
1606 | 1606 |
1607 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { | 1607 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { |
1608 Register result = ToRegister(instr->result()); | 1608 Register result = ToRegister(instr->result()); |
1609 Register map = ToRegister(instr->value()); | 1609 Register map = ToRegister(instr->value()); |
1610 __ EnumLength(result, map); | 1610 __ EnumLength(result, map); |
1611 } | 1611 } |
(...skipping 3938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5550 FixedArray::kHeaderSize - kPointerSize)); | 5550 FixedArray::kHeaderSize - kPointerSize)); |
5551 __ bind(&done); | 5551 __ bind(&done); |
5552 } | 5552 } |
5553 | 5553 |
5554 | 5554 |
5555 #undef __ | 5555 #undef __ |
5556 | 5556 |
5557 } } // namespace v8::internal | 5557 } } // namespace v8::internal |
5558 | 5558 |
5559 #endif // V8_TARGET_ARCH_X64 | 5559 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |