Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.cc

Issue 1962663002: [fullcodegen] Factor out VisitProperty from architectures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2325 Handle<Code> ic = 2325 Handle<Code> ic =
2326 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); 2326 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
2327 EmitLoadStoreICSlot(expr->AssignmentSlot()); 2327 EmitLoadStoreICSlot(expr->AssignmentSlot());
2328 CallIC(ic); 2328 CallIC(ic);
2329 2329
2330 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); 2330 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
2331 context()->Plug(v0); 2331 context()->Plug(v0);
2332 } 2332 }
2333 2333
2334 2334
2335 void FullCodeGenerator::VisitProperty(Property* expr) {
2336 Comment cmnt(masm_, "[ Property");
2337 SetExpressionPosition(expr);
2338
2339 Expression* key = expr->key();
2340
2341 if (key->IsPropertyName()) {
2342 if (!expr->IsSuperAccess()) {
2343 VisitForAccumulatorValue(expr->obj());
2344 __ Move(LoadDescriptor::ReceiverRegister(), v0);
2345 EmitNamedPropertyLoad(expr);
2346 } else {
2347 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var());
2348 VisitForStackValue(
2349 expr->obj()->AsSuperPropertyReference()->home_object());
2350 EmitNamedSuperPropertyLoad(expr);
2351 }
2352 } else {
2353 if (!expr->IsSuperAccess()) {
2354 VisitForStackValue(expr->obj());
2355 VisitForAccumulatorValue(expr->key());
2356 __ Move(LoadDescriptor::NameRegister(), v0);
2357 PopOperand(LoadDescriptor::ReceiverRegister());
2358 EmitKeyedPropertyLoad(expr);
2359 } else {
2360 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var());
2361 VisitForStackValue(
2362 expr->obj()->AsSuperPropertyReference()->home_object());
2363 VisitForStackValue(expr->key());
2364 EmitKeyedSuperPropertyLoad(expr);
2365 }
2366 }
2367 PrepareForBailoutForId(expr->LoadId(), TOS_REG);
2368 context()->Plug(v0);
2369 }
2370
2371
2372 void FullCodeGenerator::CallIC(Handle<Code> code, 2335 void FullCodeGenerator::CallIC(Handle<Code> code,
2373 TypeFeedbackId id) { 2336 TypeFeedbackId id) {
2374 ic_total_count_++; 2337 ic_total_count_++;
2375 __ Call(code, RelocInfo::CODE_TARGET, id); 2338 __ Call(code, RelocInfo::CODE_TARGET, id);
2376 } 2339 }
2377 2340
2378 2341
2379 // Code common for calls using the IC. 2342 // Code common for calls using the IC.
2380 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { 2343 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
2381 Expression* callee = expr->expression(); 2344 Expression* callee = expr->expression();
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
3981 reinterpret_cast<uint32_t>( 3944 reinterpret_cast<uint32_t>(
3982 isolate->builtins()->OnStackReplacement()->entry())); 3945 isolate->builtins()->OnStackReplacement()->entry()));
3983 return ON_STACK_REPLACEMENT; 3946 return ON_STACK_REPLACEMENT;
3984 } 3947 }
3985 3948
3986 3949
3987 } // namespace internal 3950 } // namespace internal
3988 } // namespace v8 3951 } // namespace v8
3989 3952
3990 #endif // V8_TARGET_ARCH_MIPS 3953 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698