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::DoLoadGlobalCell(LLoadGlobalCell* instr) { | 2109 void LCodeGen::DoLoadGlobal(LLoadGlobal* 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->global_object()).is(r0)); | |
2123 ASSERT(ToRegister(instr->result()).is(r0)); | |
2124 | |
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 | |
2133 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { | 2121 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
2134 Register value = ToRegister(instr->InputAt(0)); | 2122 Register value = ToRegister(instr->InputAt(0)); |
2135 Register scratch = scratch0(); | 2123 Register scratch = scratch0(); |
2136 | 2124 |
2137 // Load the cell. | 2125 // Load the cell. |
2138 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2126 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
2139 | 2127 |
2140 // If the cell we are storing to contains the hole it could have | 2128 // If the cell we are storing to contains the hole it could have |
2141 // been deleted from the property dictionary. In that case, we need | 2129 // been deleted from the property dictionary. In that case, we need |
2142 // to update the property details in the property dictionary to mark | 2130 // to update the property details in the property dictionary to mark |
(...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3968 ASSERT(!environment->HasBeenRegistered()); | 3956 ASSERT(!environment->HasBeenRegistered()); |
3969 RegisterEnvironmentForDeoptimization(environment); | 3957 RegisterEnvironmentForDeoptimization(environment); |
3970 ASSERT(osr_pc_offset_ == -1); | 3958 ASSERT(osr_pc_offset_ == -1); |
3971 osr_pc_offset_ = masm()->pc_offset(); | 3959 osr_pc_offset_ = masm()->pc_offset(); |
3972 } | 3960 } |
3973 | 3961 |
3974 | 3962 |
3975 #undef __ | 3963 #undef __ |
3976 | 3964 |
3977 } } // namespace v8::internal | 3965 } } // namespace v8::internal |
OLD | NEW |