| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2324 Handle<Code> ic = | 2324 Handle<Code> ic = |
| 2325 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); | 2325 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 2326 EmitLoadStoreICSlot(expr->AssignmentSlot()); | 2326 EmitLoadStoreICSlot(expr->AssignmentSlot()); |
| 2327 CallIC(ic); | 2327 CallIC(ic); |
| 2328 | 2328 |
| 2329 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2329 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 2330 context()->Plug(v0); | 2330 context()->Plug(v0); |
| 2331 } | 2331 } |
| 2332 | 2332 |
| 2333 | 2333 |
| 2334 void FullCodeGenerator::VisitProperty(Property* expr) { | |
| 2335 Comment cmnt(masm_, "[ Property"); | |
| 2336 SetExpressionPosition(expr); | |
| 2337 | |
| 2338 Expression* key = expr->key(); | |
| 2339 | |
| 2340 if (key->IsPropertyName()) { | |
| 2341 if (!expr->IsSuperAccess()) { | |
| 2342 VisitForAccumulatorValue(expr->obj()); | |
| 2343 __ Move(LoadDescriptor::ReceiverRegister(), v0); | |
| 2344 EmitNamedPropertyLoad(expr); | |
| 2345 } else { | |
| 2346 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); | |
| 2347 VisitForStackValue( | |
| 2348 expr->obj()->AsSuperPropertyReference()->home_object()); | |
| 2349 EmitNamedSuperPropertyLoad(expr); | |
| 2350 } | |
| 2351 } else { | |
| 2352 if (!expr->IsSuperAccess()) { | |
| 2353 VisitForStackValue(expr->obj()); | |
| 2354 VisitForAccumulatorValue(expr->key()); | |
| 2355 __ Move(LoadDescriptor::NameRegister(), v0); | |
| 2356 PopOperand(LoadDescriptor::ReceiverRegister()); | |
| 2357 EmitKeyedPropertyLoad(expr); | |
| 2358 } else { | |
| 2359 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); | |
| 2360 VisitForStackValue( | |
| 2361 expr->obj()->AsSuperPropertyReference()->home_object()); | |
| 2362 VisitForStackValue(expr->key()); | |
| 2363 EmitKeyedSuperPropertyLoad(expr); | |
| 2364 } | |
| 2365 } | |
| 2366 PrepareForBailoutForId(expr->LoadId(), TOS_REG); | |
| 2367 context()->Plug(v0); | |
| 2368 } | |
| 2369 | |
| 2370 | |
| 2371 void FullCodeGenerator::CallIC(Handle<Code> code, | 2334 void FullCodeGenerator::CallIC(Handle<Code> code, |
| 2372 TypeFeedbackId id) { | 2335 TypeFeedbackId id) { |
| 2373 ic_total_count_++; | 2336 ic_total_count_++; |
| 2374 __ Call(code, RelocInfo::CODE_TARGET, id); | 2337 __ Call(code, RelocInfo::CODE_TARGET, id); |
| 2375 } | 2338 } |
| 2376 | 2339 |
| 2377 | 2340 |
| 2378 // Code common for calls using the IC. | 2341 // Code common for calls using the IC. |
| 2379 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { | 2342 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
| 2380 Expression* callee = expr->expression(); | 2343 Expression* callee = expr->expression(); |
| (...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3989 reinterpret_cast<uint64_t>( | 3952 reinterpret_cast<uint64_t>( |
| 3990 isolate->builtins()->OnStackReplacement()->entry())); | 3953 isolate->builtins()->OnStackReplacement()->entry())); |
| 3991 return ON_STACK_REPLACEMENT; | 3954 return ON_STACK_REPLACEMENT; |
| 3992 } | 3955 } |
| 3993 | 3956 |
| 3994 | 3957 |
| 3995 } // namespace internal | 3958 } // namespace internal |
| 3996 } // namespace v8 | 3959 } // namespace v8 |
| 3997 | 3960 |
| 3998 #endif // V8_TARGET_ARCH_MIPS64 | 3961 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |