OLD | NEW |
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 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3138 // If the object is not a value type, return the object. | 3138 // If the object is not a value type, return the object. |
3139 __ CompareObjectType(r3, r4, r4, JS_VALUE_TYPE); | 3139 __ CompareObjectType(r3, r4, r4, JS_VALUE_TYPE); |
3140 __ bne(&done); | 3140 __ bne(&done); |
3141 __ LoadP(r3, FieldMemOperand(r3, JSValue::kValueOffset)); | 3141 __ LoadP(r3, FieldMemOperand(r3, JSValue::kValueOffset)); |
3142 | 3142 |
3143 __ bind(&done); | 3143 __ bind(&done); |
3144 context()->Plug(r3); | 3144 context()->Plug(r3); |
3145 } | 3145 } |
3146 | 3146 |
3147 | 3147 |
3148 void FullCodeGenerator::EmitIsDate(CallRuntime* expr) { | |
3149 ZoneList<Expression*>* args = expr->arguments(); | |
3150 DCHECK_EQ(1, args->length()); | |
3151 | |
3152 VisitForAccumulatorValue(args->at(0)); | |
3153 | |
3154 Label materialize_true, materialize_false; | |
3155 Label* if_true = nullptr; | |
3156 Label* if_false = nullptr; | |
3157 Label* fall_through = nullptr; | |
3158 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
3159 &if_false, &fall_through); | |
3160 | |
3161 __ JumpIfSmi(r3, if_false); | |
3162 __ CompareObjectType(r3, r4, r4, JS_DATE_TYPE); | |
3163 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3164 Split(eq, if_true, if_false, fall_through); | |
3165 | |
3166 context()->Plug(if_true, if_false); | |
3167 } | |
3168 | |
3169 | |
3170 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 3148 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
3171 ZoneList<Expression*>* args = expr->arguments(); | 3149 ZoneList<Expression*>* args = expr->arguments(); |
3172 DCHECK_EQ(3, args->length()); | 3150 DCHECK_EQ(3, args->length()); |
3173 | 3151 |
3174 Register string = r3; | 3152 Register string = r3; |
3175 Register index = r4; | 3153 Register index = r4; |
3176 Register value = r5; | 3154 Register value = r5; |
3177 | 3155 |
3178 VisitForStackValue(args->at(0)); // index | 3156 VisitForStackValue(args->at(0)); // index |
3179 VisitForStackValue(args->at(1)); // value | 3157 VisitForStackValue(args->at(1)); // value |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4507 return ON_STACK_REPLACEMENT; | 4485 return ON_STACK_REPLACEMENT; |
4508 } | 4486 } |
4509 | 4487 |
4510 DCHECK(interrupt_address == | 4488 DCHECK(interrupt_address == |
4511 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4489 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4512 return OSR_AFTER_STACK_CHECK; | 4490 return OSR_AFTER_STACK_CHECK; |
4513 } | 4491 } |
4514 } // namespace internal | 4492 } // namespace internal |
4515 } // namespace v8 | 4493 } // namespace v8 |
4516 #endif // V8_TARGET_ARCH_PPC | 4494 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |