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 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 Register tmp2 = a3; | 3360 Register tmp2 = a3; |
3361 | 3361 |
3362 VisitForStackValue(args->at(0)); | 3362 VisitForStackValue(args->at(0)); |
3363 VisitForAccumulatorValue(args->at(1)); // Result (right) in v0. | 3363 VisitForAccumulatorValue(args->at(1)); // Result (right) in v0. |
3364 __ pop(left); | 3364 __ pop(left); |
3365 | 3365 |
3366 Label done, fail, ok; | 3366 Label done, fail, ok; |
3367 __ Branch(&ok, eq, left, Operand(right)); | 3367 __ Branch(&ok, eq, left, Operand(right)); |
3368 // Fail if either is a non-HeapObject. | 3368 // Fail if either is a non-HeapObject. |
3369 __ And(tmp, left, Operand(right)); | 3369 __ And(tmp, left, Operand(right)); |
3370 __ And(at, tmp, Operand(kSmiTagMask)); | 3370 __ JumpIfSmi(tmp, &fail); |
3371 __ Branch(&fail, eq, at, Operand(zero_reg)); | |
3372 __ lw(tmp, FieldMemOperand(left, HeapObject::kMapOffset)); | 3371 __ lw(tmp, FieldMemOperand(left, HeapObject::kMapOffset)); |
3373 __ lbu(tmp2, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); | 3372 __ lbu(tmp2, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); |
3374 __ Branch(&fail, ne, tmp2, Operand(JS_REGEXP_TYPE)); | 3373 __ Branch(&fail, ne, tmp2, Operand(JS_REGEXP_TYPE)); |
3375 __ lw(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); | 3374 __ lw(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); |
3376 __ Branch(&fail, ne, tmp, Operand(tmp2)); | 3375 __ Branch(&fail, ne, tmp, Operand(tmp2)); |
3377 __ lw(tmp, FieldMemOperand(left, JSRegExp::kDataOffset)); | 3376 __ lw(tmp, FieldMemOperand(left, JSRegExp::kDataOffset)); |
3378 __ lw(tmp2, FieldMemOperand(right, JSRegExp::kDataOffset)); | 3377 __ lw(tmp2, FieldMemOperand(right, JSRegExp::kDataOffset)); |
3379 __ Branch(&ok, eq, tmp, Operand(tmp2)); | 3378 __ Branch(&ok, eq, tmp, Operand(tmp2)); |
3380 __ bind(&fail); | 3379 __ bind(&fail); |
3381 __ LoadRoot(v0, Heap::kFalseValueRootIndex); | 3380 __ LoadRoot(v0, Heap::kFalseValueRootIndex); |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4226 __ LoadRoot(a1, nil_value); | 4225 __ LoadRoot(a1, nil_value); |
4227 if (expr->op() == Token::EQ_STRICT) { | 4226 if (expr->op() == Token::EQ_STRICT) { |
4228 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); | 4227 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); |
4229 } else { | 4228 } else { |
4230 Heap::RootListIndex other_nil_value = nil == kNullValue ? | 4229 Heap::RootListIndex other_nil_value = nil == kNullValue ? |
4231 Heap::kUndefinedValueRootIndex : | 4230 Heap::kUndefinedValueRootIndex : |
4232 Heap::kNullValueRootIndex; | 4231 Heap::kNullValueRootIndex; |
4233 __ Branch(if_true, eq, a0, Operand(a1)); | 4232 __ Branch(if_true, eq, a0, Operand(a1)); |
4234 __ LoadRoot(a1, other_nil_value); | 4233 __ LoadRoot(a1, other_nil_value); |
4235 __ Branch(if_true, eq, a0, Operand(a1)); | 4234 __ Branch(if_true, eq, a0, Operand(a1)); |
4236 __ And(at, a0, Operand(kSmiTagMask)); | 4235 __ JumpIfSmi(a0, if_false); |
4237 __ Branch(if_false, eq, at, Operand(zero_reg)); | |
4238 // It can be an undetectable object. | 4236 // It can be an undetectable object. |
4239 __ lw(a1, FieldMemOperand(a0, HeapObject::kMapOffset)); | 4237 __ lw(a1, FieldMemOperand(a0, HeapObject::kMapOffset)); |
4240 __ lbu(a1, FieldMemOperand(a1, Map::kBitFieldOffset)); | 4238 __ lbu(a1, FieldMemOperand(a1, Map::kBitFieldOffset)); |
4241 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 4239 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
4242 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); | 4240 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
4243 } | 4241 } |
4244 context()->Plug(if_true, if_false); | 4242 context()->Plug(if_true, if_false); |
4245 } | 4243 } |
4246 | 4244 |
4247 | 4245 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4348 *context_length = 0; | 4346 *context_length = 0; |
4349 return previous_; | 4347 return previous_; |
4350 } | 4348 } |
4351 | 4349 |
4352 | 4350 |
4353 #undef __ | 4351 #undef __ |
4354 | 4352 |
4355 } } // namespace v8::internal | 4353 } } // namespace v8::internal |
4356 | 4354 |
4357 #endif // V8_TARGET_ARCH_MIPS | 4355 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |