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

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

Issue 2372113004: [turbofan] JSGenericLowering mostly uses builtins instead of code stubs now (Closed)
Patch Set: Ross' comments Created 4 years, 2 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/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. 969 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4.
970 Label convert, done_convert; 970 Label convert, done_convert;
971 __ JumpIfSmi(r3, &convert); 971 __ JumpIfSmi(r3, &convert);
972 __ CompareObjectType(r3, r4, r4, FIRST_JS_RECEIVER_TYPE); 972 __ CompareObjectType(r3, r4, r4, FIRST_JS_RECEIVER_TYPE);
973 __ bge(&done_convert); 973 __ bge(&done_convert);
974 __ CompareRoot(r3, Heap::kNullValueRootIndex); 974 __ CompareRoot(r3, Heap::kNullValueRootIndex);
975 __ beq(&exit); 975 __ beq(&exit);
976 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); 976 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex);
977 __ beq(&exit); 977 __ beq(&exit);
978 __ bind(&convert); 978 __ bind(&convert);
979 ToObjectStub stub(isolate()); 979 __ Call(isolate()->builtins()->ToObject(), RelocInfo::CODE_TARGET);
980 __ CallStub(&stub);
981 RestoreContext(); 980 RestoreContext();
982 __ bind(&done_convert); 981 __ bind(&done_convert);
983 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); 982 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER);
984 __ push(r3); 983 __ push(r3);
985 984
986 // Check cache validity in generated code. If we cannot guarantee cache 985 // Check cache validity in generated code. If we cannot guarantee cache
987 // validity, call the runtime system to check cache validity or get the 986 // validity, call the runtime system to check cache validity or get the
988 // property names in a fixed array. Note: Proxies never have an enum cache, 987 // property names in a fixed array. Note: Proxies never have an enum cache,
989 // so will always take the slow path. 988 // so will always take the slow path.
990 Label call_runtime; 989 Label call_runtime;
(...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after
3041 break; 3040 break;
3042 } 3041 }
3043 3042
3044 case Token::TYPEOF: { 3043 case Token::TYPEOF: {
3045 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 3044 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
3046 { 3045 {
3047 AccumulatorValueContext context(this); 3046 AccumulatorValueContext context(this);
3048 VisitForTypeofValue(expr->expression()); 3047 VisitForTypeofValue(expr->expression());
3049 } 3048 }
3050 __ mr(r6, r3); 3049 __ mr(r6, r3);
3051 TypeofStub typeof_stub(isolate()); 3050 __ Call(isolate()->builtins()->Typeof(), RelocInfo::CODE_TARGET);
3052 __ CallStub(&typeof_stub);
3053 context()->Plug(r3); 3051 context()->Plug(r3);
3054 break; 3052 break;
3055 } 3053 }
3056 3054
3057 default: 3055 default:
3058 UNREACHABLE(); 3056 UNREACHABLE();
3059 } 3057 }
3060 } 3058 }
3061 3059
3062 3060
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
3412 EmitHasProperty(); 3410 EmitHasProperty();
3413 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3411 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3414 __ CompareRoot(r3, Heap::kTrueValueRootIndex); 3412 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
3415 Split(eq, if_true, if_false, fall_through); 3413 Split(eq, if_true, if_false, fall_through);
3416 break; 3414 break;
3417 3415
3418 case Token::INSTANCEOF: { 3416 case Token::INSTANCEOF: {
3419 VisitForAccumulatorValue(expr->right()); 3417 VisitForAccumulatorValue(expr->right());
3420 SetExpressionPosition(expr); 3418 SetExpressionPosition(expr);
3421 PopOperand(r4); 3419 PopOperand(r4);
3422 InstanceOfStub stub(isolate()); 3420 __ Call(isolate()->builtins()->InstanceOf(), RelocInfo::CODE_TARGET);
3423 __ CallStub(&stub);
3424 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3421 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3425 __ CompareRoot(r3, Heap::kTrueValueRootIndex); 3422 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
3426 Split(eq, if_true, if_false, fall_through); 3423 Split(eq, if_true, if_false, fall_through);
3427 break; 3424 break;
3428 } 3425 }
3429 3426
3430 default: { 3427 default: {
3431 VisitForAccumulatorValue(expr->right()); 3428 VisitForAccumulatorValue(expr->right());
3432 SetExpressionPosition(expr); 3429 SetExpressionPosition(expr);
3433 Condition cond = CompareIC::ComputeCondition(op); 3430 Condition cond = CompareIC::ComputeCondition(op);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
3660 3657
3661 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3658 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3662 3659
3663 DCHECK(interrupt_address == 3660 DCHECK(interrupt_address ==
3664 isolate->builtins()->OnStackReplacement()->entry()); 3661 isolate->builtins()->OnStackReplacement()->entry());
3665 return ON_STACK_REPLACEMENT; 3662 return ON_STACK_REPLACEMENT;
3666 } 3663 }
3667 } // namespace internal 3664 } // namespace internal
3668 } // namespace v8 3665 } // namespace v8
3669 #endif // V8_TARGET_ARCH_PPC 3666 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698