| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 Handle<Code> ic = | 2208 Handle<Code> ic = |
| 2209 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2209 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2210 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2210 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
| 2211 CallIC(ic); | 2211 CallIC(ic); |
| 2212 | 2212 |
| 2213 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2213 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 2214 context()->Plug(x0); | 2214 context()->Plug(x0); |
| 2215 } | 2215 } |
| 2216 | 2216 |
| 2217 | 2217 |
| 2218 void FullCodeGenerator::VisitProperty(Property* expr) { | |
| 2219 Comment cmnt(masm_, "[ Property"); | |
| 2220 SetExpressionPosition(expr); | |
| 2221 Expression* key = expr->key(); | |
| 2222 | |
| 2223 if (key->IsPropertyName()) { | |
| 2224 if (!expr->IsSuperAccess()) { | |
| 2225 VisitForAccumulatorValue(expr->obj()); | |
| 2226 __ Move(LoadDescriptor::ReceiverRegister(), x0); | |
| 2227 EmitNamedPropertyLoad(expr); | |
| 2228 } else { | |
| 2229 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); | |
| 2230 VisitForStackValue( | |
| 2231 expr->obj()->AsSuperPropertyReference()->home_object()); | |
| 2232 EmitNamedSuperPropertyLoad(expr); | |
| 2233 } | |
| 2234 } else { | |
| 2235 if (!expr->IsSuperAccess()) { | |
| 2236 VisitForStackValue(expr->obj()); | |
| 2237 VisitForAccumulatorValue(expr->key()); | |
| 2238 __ Move(LoadDescriptor::NameRegister(), x0); | |
| 2239 PopOperand(LoadDescriptor::ReceiverRegister()); | |
| 2240 EmitKeyedPropertyLoad(expr); | |
| 2241 } else { | |
| 2242 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); | |
| 2243 VisitForStackValue( | |
| 2244 expr->obj()->AsSuperPropertyReference()->home_object()); | |
| 2245 VisitForStackValue(expr->key()); | |
| 2246 EmitKeyedSuperPropertyLoad(expr); | |
| 2247 } | |
| 2248 } | |
| 2249 PrepareForBailoutForId(expr->LoadId(), TOS_REG); | |
| 2250 context()->Plug(x0); | |
| 2251 } | |
| 2252 | |
| 2253 | |
| 2254 void FullCodeGenerator::CallIC(Handle<Code> code, | 2218 void FullCodeGenerator::CallIC(Handle<Code> code, |
| 2255 TypeFeedbackId ast_id) { | 2219 TypeFeedbackId ast_id) { |
| 2256 ic_total_count_++; | 2220 ic_total_count_++; |
| 2257 // All calls must have a predictable size in full-codegen code to ensure that | 2221 // All calls must have a predictable size in full-codegen code to ensure that |
| 2258 // the debugger can patch them correctly. | 2222 // the debugger can patch them correctly. |
| 2259 __ Call(code, RelocInfo::CODE_TARGET, ast_id); | 2223 __ Call(code, RelocInfo::CODE_TARGET, ast_id); |
| 2260 } | 2224 } |
| 2261 | 2225 |
| 2262 | 2226 |
| 2263 // Code common for calls using the IC. | 2227 // Code common for calls using the IC. |
| (...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4027 } | 3991 } |
| 4028 | 3992 |
| 4029 return INTERRUPT; | 3993 return INTERRUPT; |
| 4030 } | 3994 } |
| 4031 | 3995 |
| 4032 | 3996 |
| 4033 } // namespace internal | 3997 } // namespace internal |
| 4034 } // namespace v8 | 3998 } // namespace v8 |
| 4035 | 3999 |
| 4036 #endif // V8_TARGET_ARCH_ARM64 | 4000 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |