| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2099 __ CallRuntime(Runtime::kTraceExit, 1); | 2099 __ CallRuntime(Runtime::kTraceExit, 1); |
| 2100 } | 2100 } |
| 2101 int32_t sp_delta = (ParameterCount() + 1) * kPointerSize; | 2101 int32_t sp_delta = (ParameterCount() + 1) * kPointerSize; |
| 2102 __ mov(sp, fp); | 2102 __ mov(sp, fp); |
| 2103 __ ldm(ia_w, sp, fp.bit() | lr.bit()); | 2103 __ ldm(ia_w, sp, fp.bit() | lr.bit()); |
| 2104 __ add(sp, sp, Operand(sp_delta)); | 2104 __ add(sp, sp, Operand(sp_delta)); |
| 2105 __ Jump(lr); | 2105 __ Jump(lr); |
| 2106 } | 2106 } |
| 2107 | 2107 |
| 2108 | 2108 |
| 2109 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { | 2109 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
| 2110 Register result = ToRegister(instr->result()); | 2110 Register result = ToRegister(instr->result()); |
| 2111 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2111 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
| 2112 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); | 2112 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); |
| 2113 if (instr->hydrogen()->check_hole_value()) { | 2113 if (instr->hydrogen()->check_hole_value()) { |
| 2114 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2114 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
| 2115 __ cmp(result, ip); | 2115 __ cmp(result, ip); |
| 2116 DeoptimizeIf(eq, instr->environment()); | 2116 DeoptimizeIf(eq, instr->environment()); |
| 2117 } | 2117 } |
| 2118 } | 2118 } |
| 2119 | 2119 |
| 2120 | 2120 |
| 2121 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2122 ASSERT(ToRegister(instr->result()).is(r0)); |
| 2123 |
| 2124 __ ldr(r0, ContextOperand(cp, Context::GLOBAL_INDEX)); |
| 2125 __ mov(r2, Operand(instr->name())); |
| 2126 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : |
| 2127 RelocInfo::CODE_TARGET_CONTEXT; |
| 2128 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
| 2129 CallCode(ic, mode, instr); |
| 2130 } |
| 2131 |
| 2132 |
| 2121 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { | 2133 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
| 2122 Register value = ToRegister(instr->InputAt(0)); | 2134 Register value = ToRegister(instr->InputAt(0)); |
| 2123 Register scratch = scratch0(); | 2135 Register scratch = scratch0(); |
| 2124 | 2136 |
| 2125 // Load the cell. | 2137 // Load the cell. |
| 2126 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2138 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
| 2127 | 2139 |
| 2128 // If the cell we are storing to contains the hole it could have | 2140 // If the cell we are storing to contains the hole it could have |
| 2129 // been deleted from the property dictionary. In that case, we need | 2141 // been deleted from the property dictionary. In that case, we need |
| 2130 // to update the property details in the property dictionary to mark | 2142 // to update the property details in the property dictionary to mark |
| (...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3950 ASSERT(!environment->HasBeenRegistered()); | 3962 ASSERT(!environment->HasBeenRegistered()); |
| 3951 RegisterEnvironmentForDeoptimization(environment); | 3963 RegisterEnvironmentForDeoptimization(environment); |
| 3952 ASSERT(osr_pc_offset_ == -1); | 3964 ASSERT(osr_pc_offset_ == -1); |
| 3953 osr_pc_offset_ = masm()->pc_offset(); | 3965 osr_pc_offset_ = masm()->pc_offset(); |
| 3954 } | 3966 } |
| 3955 | 3967 |
| 3956 | 3968 |
| 3957 #undef __ | 3969 #undef __ |
| 3958 | 3970 |
| 3959 } } // namespace v8::internal | 3971 } } // namespace v8::internal |
| OLD | NEW |