| 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 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { | 1732 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { |
| 1733 Register result = ToRegister(instr->result()); | 1733 Register result = ToRegister(instr->result()); |
| 1734 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); | 1734 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); |
| 1735 if (instr->hydrogen()->check_hole_value()) { | 1735 if (instr->hydrogen()->check_hole_value()) { |
| 1736 __ cmp(result, Factory::the_hole_value()); | 1736 __ cmp(result, Factory::the_hole_value()); |
| 1737 DeoptimizeIf(equal, instr->environment()); | 1737 DeoptimizeIf(equal, instr->environment()); |
| 1738 } | 1738 } |
| 1739 } | 1739 } |
| 1740 | 1740 |
| 1741 | 1741 |
| 1742 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 1743 ASSERT(ToRegister(instr->result()).is(eax)); |
| 1744 __ mov(eax, GlobalObjectOperand()); |
| 1745 __ mov(ecx, instr->hydrogen()->name()); |
| 1746 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
| 1747 RelocInfo::Mode mode = instr->hydrogen()->inside_typeof() |
| 1748 ? RelocInfo::CODE_TARGET |
| 1749 : RelocInfo::CODE_TARGET_CONTEXT; |
| 1750 CallCode(ic, mode, instr); |
| 1751 } |
| 1752 |
| 1753 |
| 1742 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { | 1754 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
| 1743 Register value = ToRegister(instr->input()); | 1755 Register value = ToRegister(instr->input()); |
| 1744 __ mov(Operand::Cell(instr->hydrogen()->cell()), value); | 1756 __ mov(Operand::Cell(instr->hydrogen()->cell()), value); |
| 1745 } | 1757 } |
| 1746 | 1758 |
| 1747 | 1759 |
| 1748 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 1760 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
| 1749 Register object = ToRegister(instr->input()); | 1761 Register object = ToRegister(instr->input()); |
| 1750 Register result = ToRegister(instr->result()); | 1762 Register result = ToRegister(instr->result()); |
| 1751 if (instr->hydrogen()->is_in_object()) { | 1763 if (instr->hydrogen()->is_in_object()) { |
| (...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3091 ASSERT(!environment->HasBeenRegistered()); | 3103 ASSERT(!environment->HasBeenRegistered()); |
| 3092 RegisterEnvironmentForDeoptimization(environment); | 3104 RegisterEnvironmentForDeoptimization(environment); |
| 3093 ASSERT(osr_pc_offset_ == -1); | 3105 ASSERT(osr_pc_offset_ == -1); |
| 3094 osr_pc_offset_ = masm()->pc_offset(); | 3106 osr_pc_offset_ = masm()->pc_offset(); |
| 3095 } | 3107 } |
| 3096 | 3108 |
| 3097 | 3109 |
| 3098 #undef __ | 3110 #undef __ |
| 3099 | 3111 |
| 3100 } } // namespace v8::internal | 3112 } } // namespace v8::internal |
| OLD | NEW |