| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 4676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4687 } else { | 4687 } else { |
| 4688 ASSERT(var->is_global()); | 4688 ASSERT(var->is_global()); |
| 4689 Reference ref(this, node); | 4689 Reference ref(this, node); |
| 4690 ref.GetValue(); | 4690 ref.GetValue(); |
| 4691 } | 4691 } |
| 4692 } | 4692 } |
| 4693 | 4693 |
| 4694 | 4694 |
| 4695 void CodeGenerator::VisitLiteral(Literal* node) { | 4695 void CodeGenerator::VisitLiteral(Literal* node) { |
| 4696 Comment cmnt(masm_, "[ Literal"); | 4696 Comment cmnt(masm_, "[ Literal"); |
| 4697 if (frame_->ConstantPoolOverflowed()) { | 4697 frame_->Push(node->handle()); |
| 4698 Result temp = allocator_->Allocate(); | |
| 4699 ASSERT(temp.is_valid()); | |
| 4700 if (node->handle()->IsSmi()) { | |
| 4701 __ Move(temp.reg(), Smi::cast(*node->handle())); | |
| 4702 } else { | |
| 4703 __ movq(temp.reg(), node->handle(), RelocInfo::EMBEDDED_OBJECT); | |
| 4704 } | |
| 4705 frame_->Push(&temp); | |
| 4706 } else { | |
| 4707 frame_->Push(node->handle()); | |
| 4708 } | |
| 4709 } | 4698 } |
| 4710 | 4699 |
| 4711 | 4700 |
| 4712 void CodeGenerator::LoadUnsafeSmi(Register target, Handle<Object> value) { | 4701 void CodeGenerator::LoadUnsafeSmi(Register target, Handle<Object> value) { |
| 4713 UNIMPLEMENTED(); | 4702 UNIMPLEMENTED(); |
| 4714 // TODO(X64): Implement security policy for loads of smis. | 4703 // TODO(X64): Implement security policy for loads of smis. |
| 4715 } | 4704 } |
| 4716 | 4705 |
| 4717 | 4706 |
| 4718 bool CodeGenerator::IsUnsafeSmi(Handle<Object> value) { | 4707 bool CodeGenerator::IsUnsafeSmi(Handle<Object> value) { |
| (...skipping 4095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8814 } | 8803 } |
| 8815 | 8804 |
| 8816 #endif | 8805 #endif |
| 8817 | 8806 |
| 8818 | 8807 |
| 8819 #undef __ | 8808 #undef __ |
| 8820 | 8809 |
| 8821 } } // namespace v8::internal | 8810 } } // namespace v8::internal |
| 8822 | 8811 |
| 8823 #endif // V8_TARGET_ARCH_X64 | 8812 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |