| 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 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3273 __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 3273 __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 3274 __ subi(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); | 3274 __ subi(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
| 3275 __ cmpli(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); | 3275 __ cmpli(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); |
| 3276 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3276 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3277 Split(le, if_true, if_false, fall_through); | 3277 Split(le, if_true, if_false, fall_through); |
| 3278 | 3278 |
| 3279 context()->Plug(if_true, if_false); | 3279 context()->Plug(if_true, if_false); |
| 3280 } | 3280 } |
| 3281 | 3281 |
| 3282 | 3282 |
| 3283 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | |
| 3284 DCHECK(expr->arguments()->length() == 0); | |
| 3285 | |
| 3286 Label materialize_true, materialize_false; | |
| 3287 Label* if_true = NULL; | |
| 3288 Label* if_false = NULL; | |
| 3289 Label* fall_through = NULL; | |
| 3290 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
| 3291 &if_false, &fall_through); | |
| 3292 | |
| 3293 // Get the frame pointer for the calling frame. | |
| 3294 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
| 3295 | |
| 3296 // Skip the arguments adaptor frame if it exists. | |
| 3297 Label check_frame_marker; | |
| 3298 __ LoadP(r4, MemOperand(r5, StandardFrameConstants::kContextOffset)); | |
| 3299 __ CmpSmiLiteral(r4, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); | |
| 3300 __ bne(&check_frame_marker); | |
| 3301 __ LoadP(r5, MemOperand(r5, StandardFrameConstants::kCallerFPOffset)); | |
| 3302 | |
| 3303 // Check the marker in the calling frame. | |
| 3304 __ bind(&check_frame_marker); | |
| 3305 __ LoadP(r4, MemOperand(r5, StandardFrameConstants::kMarkerOffset)); | |
| 3306 STATIC_ASSERT(StackFrame::CONSTRUCT < 0x4000); | |
| 3307 __ CmpSmiLiteral(r4, Smi::FromInt(StackFrame::CONSTRUCT), r0); | |
| 3308 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 3309 Split(eq, if_true, if_false, fall_through); | |
| 3310 | |
| 3311 context()->Plug(if_true, if_false); | |
| 3312 } | |
| 3313 | |
| 3314 | |
| 3315 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 3283 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { |
| 3316 ZoneList<Expression*>* args = expr->arguments(); | 3284 ZoneList<Expression*>* args = expr->arguments(); |
| 3317 DCHECK(args->length() == 2); | 3285 DCHECK(args->length() == 2); |
| 3318 | 3286 |
| 3319 // Load the two objects into registers and perform the comparison. | 3287 // Load the two objects into registers and perform the comparison. |
| 3320 VisitForStackValue(args->at(0)); | 3288 VisitForStackValue(args->at(0)); |
| 3321 VisitForAccumulatorValue(args->at(1)); | 3289 VisitForAccumulatorValue(args->at(1)); |
| 3322 | 3290 |
| 3323 Label materialize_true, materialize_false; | 3291 Label materialize_true, materialize_false; |
| 3324 Label* if_true = NULL; | 3292 Label* if_true = NULL; |
| (...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4951 return ON_STACK_REPLACEMENT; | 4919 return ON_STACK_REPLACEMENT; |
| 4952 } | 4920 } |
| 4953 | 4921 |
| 4954 DCHECK(interrupt_address == | 4922 DCHECK(interrupt_address == |
| 4955 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4923 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4956 return OSR_AFTER_STACK_CHECK; | 4924 return OSR_AFTER_STACK_CHECK; |
| 4957 } | 4925 } |
| 4958 } // namespace internal | 4926 } // namespace internal |
| 4959 } // namespace v8 | 4927 } // namespace v8 |
| 4960 #endif // V8_TARGET_ARCH_PPC | 4928 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |