OLD | NEW |
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 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3269 __ GetObjectType(v0, map, type_reg); | 3269 __ GetObjectType(v0, map, type_reg); |
3270 __ Subu(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); | 3270 __ Subu(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
3271 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3271 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3272 Split(ls, type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE), | 3272 Split(ls, type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE), |
3273 if_true, if_false, fall_through); | 3273 if_true, if_false, fall_through); |
3274 | 3274 |
3275 context()->Plug(if_true, if_false); | 3275 context()->Plug(if_true, if_false); |
3276 } | 3276 } |
3277 | 3277 |
3278 | 3278 |
3279 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | |
3280 DCHECK(expr->arguments()->length() == 0); | |
3281 | |
3282 Label materialize_true, materialize_false; | |
3283 Label* if_true = NULL; | |
3284 Label* if_false = NULL; | |
3285 Label* fall_through = NULL; | |
3286 context()->PrepareTest(&materialize_true, &materialize_false, | |
3287 &if_true, &if_false, &fall_through); | |
3288 | |
3289 // Get the frame pointer for the calling frame. | |
3290 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
3291 | |
3292 // Skip the arguments adaptor frame if it exists. | |
3293 Label check_frame_marker; | |
3294 __ lw(a1, MemOperand(a2, StandardFrameConstants::kContextOffset)); | |
3295 __ Branch(&check_frame_marker, ne, | |
3296 a1, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
3297 __ lw(a2, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); | |
3298 | |
3299 // Check the marker in the calling frame. | |
3300 __ bind(&check_frame_marker); | |
3301 __ lw(a1, MemOperand(a2, StandardFrameConstants::kMarkerOffset)); | |
3302 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3303 Split(eq, a1, Operand(Smi::FromInt(StackFrame::CONSTRUCT)), | |
3304 if_true, if_false, fall_through); | |
3305 | |
3306 context()->Plug(if_true, if_false); | |
3307 } | |
3308 | |
3309 | |
3310 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 3279 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { |
3311 ZoneList<Expression*>* args = expr->arguments(); | 3280 ZoneList<Expression*>* args = expr->arguments(); |
3312 DCHECK(args->length() == 2); | 3281 DCHECK(args->length() == 2); |
3313 | 3282 |
3314 // Load the two objects into registers and perform the comparison. | 3283 // Load the two objects into registers and perform the comparison. |
3315 VisitForStackValue(args->at(0)); | 3284 VisitForStackValue(args->at(0)); |
3316 VisitForAccumulatorValue(args->at(1)); | 3285 VisitForAccumulatorValue(args->at(1)); |
3317 | 3286 |
3318 Label materialize_true, materialize_false; | 3287 Label materialize_true, materialize_false; |
3319 Label* if_true = NULL; | 3288 Label* if_true = NULL; |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4969 reinterpret_cast<uint32_t>( | 4938 reinterpret_cast<uint32_t>( |
4970 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4939 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4971 return OSR_AFTER_STACK_CHECK; | 4940 return OSR_AFTER_STACK_CHECK; |
4972 } | 4941 } |
4973 | 4942 |
4974 | 4943 |
4975 } // namespace internal | 4944 } // namespace internal |
4976 } // namespace v8 | 4945 } // namespace v8 |
4977 | 4946 |
4978 #endif // V8_TARGET_ARCH_MIPS | 4947 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |