OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3378 Register tmp2 = a3; | 3378 Register tmp2 = a3; |
3379 | 3379 |
3380 VisitForStackValue(args->at(0)); | 3380 VisitForStackValue(args->at(0)); |
3381 VisitForAccumulatorValue(args->at(1)); // Result (right) in v0. | 3381 VisitForAccumulatorValue(args->at(1)); // Result (right) in v0. |
3382 __ pop(left); | 3382 __ pop(left); |
3383 | 3383 |
3384 Label done, fail, ok; | 3384 Label done, fail, ok; |
3385 __ Branch(&ok, eq, left, Operand(right)); | 3385 __ Branch(&ok, eq, left, Operand(right)); |
3386 // Fail if either is a non-HeapObject. | 3386 // Fail if either is a non-HeapObject. |
3387 __ And(tmp, left, Operand(right)); | 3387 __ And(tmp, left, Operand(right)); |
3388 __ And(at, tmp, Operand(kSmiTagMask)); | 3388 __ JumpIfSmi(tmp, &fail); |
3389 __ Branch(&fail, eq, at, Operand(zero_reg)); | |
3390 __ lw(tmp, FieldMemOperand(left, HeapObject::kMapOffset)); | 3389 __ lw(tmp, FieldMemOperand(left, HeapObject::kMapOffset)); |
3391 __ lbu(tmp2, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); | 3390 __ lbu(tmp2, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); |
3392 __ Branch(&fail, ne, tmp2, Operand(JS_REGEXP_TYPE)); | 3391 __ Branch(&fail, ne, tmp2, Operand(JS_REGEXP_TYPE)); |
3393 __ lw(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); | 3392 __ lw(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); |
3394 __ Branch(&fail, ne, tmp, Operand(tmp2)); | 3393 __ Branch(&fail, ne, tmp, Operand(tmp2)); |
3395 __ lw(tmp, FieldMemOperand(left, JSRegExp::kDataOffset)); | 3394 __ lw(tmp, FieldMemOperand(left, JSRegExp::kDataOffset)); |
3396 __ lw(tmp2, FieldMemOperand(right, JSRegExp::kDataOffset)); | 3395 __ lw(tmp2, FieldMemOperand(right, JSRegExp::kDataOffset)); |
3397 __ Branch(&ok, eq, tmp, Operand(tmp2)); | 3396 __ Branch(&ok, eq, tmp, Operand(tmp2)); |
3398 __ bind(&fail); | 3397 __ bind(&fail); |
3399 __ LoadRoot(v0, Heap::kFalseValueRootIndex); | 3398 __ LoadRoot(v0, Heap::kFalseValueRootIndex); |
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4264 __ LoadRoot(a1, nil_value); | 4263 __ LoadRoot(a1, nil_value); |
4265 if (expr->op() == Token::EQ_STRICT) { | 4264 if (expr->op() == Token::EQ_STRICT) { |
4266 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); | 4265 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); |
4267 } else { | 4266 } else { |
4268 Heap::RootListIndex other_nil_value = nil == kNullValue ? | 4267 Heap::RootListIndex other_nil_value = nil == kNullValue ? |
4269 Heap::kUndefinedValueRootIndex : | 4268 Heap::kUndefinedValueRootIndex : |
4270 Heap::kNullValueRootIndex; | 4269 Heap::kNullValueRootIndex; |
4271 __ Branch(if_true, eq, a0, Operand(a1)); | 4270 __ Branch(if_true, eq, a0, Operand(a1)); |
4272 __ LoadRoot(a1, other_nil_value); | 4271 __ LoadRoot(a1, other_nil_value); |
4273 __ Branch(if_true, eq, a0, Operand(a1)); | 4272 __ Branch(if_true, eq, a0, Operand(a1)); |
4274 __ And(at, a0, Operand(kSmiTagMask)); | 4273 __ JumpIfSmi(a0, if_false); |
4275 __ Branch(if_false, eq, at, Operand(zero_reg)); | |
4276 // It can be an undetectable object. | 4274 // It can be an undetectable object. |
4277 __ lw(a1, FieldMemOperand(a0, HeapObject::kMapOffset)); | 4275 __ lw(a1, FieldMemOperand(a0, HeapObject::kMapOffset)); |
4278 __ lbu(a1, FieldMemOperand(a1, Map::kBitFieldOffset)); | 4276 __ lbu(a1, FieldMemOperand(a1, Map::kBitFieldOffset)); |
4279 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 4277 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
4280 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); | 4278 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
4281 } | 4279 } |
4282 context()->Plug(if_true, if_false); | 4280 context()->Plug(if_true, if_false); |
4283 } | 4281 } |
4284 | 4282 |
4285 | 4283 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4386 *context_length = 0; | 4384 *context_length = 0; |
4387 return previous_; | 4385 return previous_; |
4388 } | 4386 } |
4389 | 4387 |
4390 | 4388 |
4391 #undef __ | 4389 #undef __ |
4392 | 4390 |
4393 } } // namespace v8::internal | 4391 } } // namespace v8::internal |
4394 | 4392 |
4395 #endif // V8_TARGET_ARCH_MIPS | 4393 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |