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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 2305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 Handle<Code> ic = 2316 Handle<Code> ic =
2317 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); 2317 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
2318 EmitLoadStoreICSlot(expr->AssignmentSlot()); 2318 EmitLoadStoreICSlot(expr->AssignmentSlot());
2319 CallIC(ic); 2319 CallIC(ic);
2320 2320
2321 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); 2321 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
2322 context()->Plug(r3); 2322 context()->Plug(r3);
2323 } 2323 }
2324 2324
2325 2325
2326 void FullCodeGenerator::VisitProperty(Property* expr) {
2327 Comment cmnt(masm_, "[ Property");
2328 SetExpressionPosition(expr);
2329
2330 Expression* key = expr->key();
2331
2332 if (key->IsPropertyName()) {
2333 if (!expr->IsSuperAccess()) {
2334 VisitForAccumulatorValue(expr->obj());
2335 __ Move(LoadDescriptor::ReceiverRegister(), r3);
2336 EmitNamedPropertyLoad(expr);
2337 } else {
2338 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var());
2339 VisitForStackValue(
2340 expr->obj()->AsSuperPropertyReference()->home_object());
2341 EmitNamedSuperPropertyLoad(expr);
2342 }
2343 } else {
2344 if (!expr->IsSuperAccess()) {
2345 VisitForStackValue(expr->obj());
2346 VisitForAccumulatorValue(expr->key());
2347 __ Move(LoadDescriptor::NameRegister(), r3);
2348 PopOperand(LoadDescriptor::ReceiverRegister());
2349 EmitKeyedPropertyLoad(expr);
2350 } else {
2351 VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var());
2352 VisitForStackValue(
2353 expr->obj()->AsSuperPropertyReference()->home_object());
2354 VisitForStackValue(expr->key());
2355 EmitKeyedSuperPropertyLoad(expr);
2356 }
2357 }
2358 PrepareForBailoutForId(expr->LoadId(), TOS_REG);
2359 context()->Plug(r3);
2360 }
2361
2362
2363 void FullCodeGenerator::CallIC(Handle<Code> code, TypeFeedbackId ast_id) { 2326 void FullCodeGenerator::CallIC(Handle<Code> code, TypeFeedbackId ast_id) {
2364 ic_total_count_++; 2327 ic_total_count_++;
2365 __ Call(code, RelocInfo::CODE_TARGET, ast_id); 2328 __ Call(code, RelocInfo::CODE_TARGET, ast_id);
2366 } 2329 }
2367 2330
2368 2331
2369 // Code common for calls using the IC. 2332 // Code common for calls using the IC.
2370 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { 2333 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
2371 Expression* callee = expr->expression(); 2334 Expression* callee = expr->expression();
2372 2335
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
3937 3900
3938 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3901 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3939 3902
3940 DCHECK(interrupt_address == 3903 DCHECK(interrupt_address ==
3941 isolate->builtins()->OnStackReplacement()->entry()); 3904 isolate->builtins()->OnStackReplacement()->entry());
3942 return ON_STACK_REPLACEMENT; 3905 return ON_STACK_REPLACEMENT;
3943 } 3906 }
3944 } // namespace internal 3907 } // namespace internal
3945 } // namespace v8 3908 } // namespace v8
3946 #endif // V8_TARGET_ARCH_PPC 3909 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698