OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2314 Handle<Code> ic = | 2314 Handle<Code> ic = |
2315 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2315 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
2316 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2316 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
2317 CallIC(ic); | 2317 CallIC(ic); |
2318 | 2318 |
2319 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2319 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2320 context()->Plug(r0); | 2320 context()->Plug(r0); |
2321 } | 2321 } |
2322 | 2322 |
2323 | 2323 |
2324 void FullCodeGenerator::VisitProperty(Property* expr) { | |
2325 Comment cmnt(masm_, "[ Property"); | |
2326 SetExpressionPosition(expr); | |
2327 | |
2328 Expression* key = expr->key(); | |
2329 | |
2330 if (key->IsPropertyName()) { | |
2331 if (!expr->IsSuperAccess()) { | |
2332 VisitForAccumulatorValue(expr->obj()); | |
2333 __ Move(LoadDescriptor::ReceiverRegister(), r0); | |
2334 EmitNamedPropertyLoad(expr); | |
2335 } else { | |
2336 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); | |
2337 VisitForStackValue( | |
2338 expr->obj()->AsSuperPropertyReference()->home_object()); | |
2339 EmitNamedSuperPropertyLoad(expr); | |
2340 } | |
2341 } else { | |
2342 if (!expr->IsSuperAccess()) { | |
2343 VisitForStackValue(expr->obj()); | |
2344 VisitForAccumulatorValue(expr->key()); | |
2345 __ Move(LoadDescriptor::NameRegister(), r0); | |
2346 PopOperand(LoadDescriptor::ReceiverRegister()); | |
2347 EmitKeyedPropertyLoad(expr); | |
2348 } else { | |
2349 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); | |
2350 VisitForStackValue( | |
2351 expr->obj()->AsSuperPropertyReference()->home_object()); | |
2352 VisitForStackValue(expr->key()); | |
2353 EmitKeyedSuperPropertyLoad(expr); | |
2354 } | |
2355 } | |
2356 PrepareForBailoutForId(expr->LoadId(), TOS_REG); | |
2357 context()->Plug(r0); | |
2358 } | |
2359 | |
2360 | |
2361 void FullCodeGenerator::CallIC(Handle<Code> code, | 2324 void FullCodeGenerator::CallIC(Handle<Code> code, |
2362 TypeFeedbackId ast_id) { | 2325 TypeFeedbackId ast_id) { |
2363 ic_total_count_++; | 2326 ic_total_count_++; |
2364 // All calls must have a predictable size in full-codegen code to ensure that | 2327 // All calls must have a predictable size in full-codegen code to ensure that |
2365 // the debugger can patch them correctly. | 2328 // the debugger can patch them correctly. |
2366 __ Call(code, RelocInfo::CODE_TARGET, ast_id, al, | 2329 __ Call(code, RelocInfo::CODE_TARGET, ast_id, al, |
2367 NEVER_INLINE_TARGET_ADDRESS); | 2330 NEVER_INLINE_TARGET_ADDRESS); |
2368 } | 2331 } |
2369 | 2332 |
2370 | 2333 |
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4027 DCHECK(interrupt_address == | 3990 DCHECK(interrupt_address == |
4028 isolate->builtins()->OnStackReplacement()->entry()); | 3991 isolate->builtins()->OnStackReplacement()->entry()); |
4029 return ON_STACK_REPLACEMENT; | 3992 return ON_STACK_REPLACEMENT; |
4030 } | 3993 } |
4031 | 3994 |
4032 | 3995 |
4033 } // namespace internal | 3996 } // namespace internal |
4034 } // namespace v8 | 3997 } // namespace v8 |
4035 | 3998 |
4036 #endif // V8_TARGET_ARCH_ARM | 3999 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |