OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3446 // It is a heap object - get the map. Check if the object is a JS array. | 3446 // It is a heap object - get the map. Check if the object is a JS array. |
3447 __ CompareObjectType(r0, r1, r1, JS_ARRAY_TYPE); | 3447 __ CompareObjectType(r0, r1, r1, JS_ARRAY_TYPE); |
3448 answer.Bind(); | 3448 answer.Bind(); |
3449 cc_reg_ = eq; | 3449 cc_reg_ = eq; |
3450 } | 3450 } |
3451 | 3451 |
3452 | 3452 |
3453 void CodeGenerator::GenerateIsConstructCall(ZoneList<Expression*>* args) { | 3453 void CodeGenerator::GenerateIsConstructCall(ZoneList<Expression*>* args) { |
3454 VirtualFrame::SpilledScope spilled_scope; | 3454 VirtualFrame::SpilledScope spilled_scope; |
3455 ASSERT(args->length() == 0); | 3455 ASSERT(args->length() == 0); |
3456 frame_->CallRuntime(Runtime::kIsConstructCall, 0); | 3456 |
3457 frame_->EmitPush(r0); | 3457 // Get the frame pointer for the calling frame. |
| 3458 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 3459 |
| 3460 // Skip the arguments adaptor frame if it exists. |
| 3461 Label check_frame_marker; |
| 3462 __ ldr(r1, MemOperand(r2, StandardFrameConstants::kContextOffset)); |
| 3463 __ cmp(r1, Operand(ArgumentsAdaptorFrame::SENTINEL)); |
| 3464 __ b(ne, &check_frame_marker); |
| 3465 __ ldr(r2, MemOperand(r2, StandardFrameConstants::kCallerFPOffset)); |
| 3466 |
| 3467 // Check the marker in the calling frame. |
| 3468 __ bind(&check_frame_marker); |
| 3469 __ ldr(r1, MemOperand(r2, StandardFrameConstants::kMarkerOffset)); |
| 3470 __ cmp(r1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); |
| 3471 cc_reg_ = eq; |
3458 } | 3472 } |
3459 | 3473 |
3460 | 3474 |
3461 void CodeGenerator::GenerateArgumentsLength(ZoneList<Expression*>* args) { | 3475 void CodeGenerator::GenerateArgumentsLength(ZoneList<Expression*>* args) { |
3462 VirtualFrame::SpilledScope spilled_scope; | 3476 VirtualFrame::SpilledScope spilled_scope; |
3463 ASSERT(args->length() == 0); | 3477 ASSERT(args->length() == 0); |
3464 | 3478 |
3465 // Seed the result with the formal parameters count, which will be used | 3479 // Seed the result with the formal parameters count, which will be used |
3466 // in case no arguments adaptor frame is found below the current frame. | 3480 // in case no arguments adaptor frame is found below the current frame. |
3467 __ mov(r0, Operand(Smi::FromInt(scope_->num_parameters()))); | 3481 __ mov(r0, Operand(Smi::FromInt(scope_->num_parameters()))); |
(...skipping 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6380 int CompareStub::MinorKey() { | 6394 int CompareStub::MinorKey() { |
6381 // Encode the two parameters in a unique 16 bit value. | 6395 // Encode the two parameters in a unique 16 bit value. |
6382 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); | 6396 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); |
6383 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); | 6397 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); |
6384 } | 6398 } |
6385 | 6399 |
6386 | 6400 |
6387 #undef __ | 6401 #undef __ |
6388 | 6402 |
6389 } } // namespace v8::internal | 6403 } } // namespace v8::internal |
OLD | NEW |