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 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2923 Label* fail) { | 2923 Label* fail) { |
2924 lw(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); | 2924 lw(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); |
2925 IsInstanceJSObjectType(map, scratch, fail); | 2925 IsInstanceJSObjectType(map, scratch, fail); |
2926 } | 2926 } |
2927 | 2927 |
2928 | 2928 |
2929 void MacroAssembler::IsInstanceJSObjectType(Register map, | 2929 void MacroAssembler::IsInstanceJSObjectType(Register map, |
2930 Register scratch, | 2930 Register scratch, |
2931 Label* fail) { | 2931 Label* fail) { |
2932 lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 2932 lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
2933 Branch(fail, lt, scratch, Operand(FIRST_JS_OBJECT_TYPE)); | 2933 Branch(fail, lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
2934 Branch(fail, gt, scratch, Operand(LAST_JS_OBJECT_TYPE)); | 2934 Branch(fail, gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
2935 } | 2935 } |
2936 | 2936 |
2937 | 2937 |
2938 void MacroAssembler::IsObjectJSStringType(Register object, | 2938 void MacroAssembler::IsObjectJSStringType(Register object, |
2939 Register scratch, | 2939 Register scratch, |
2940 Label* fail) { | 2940 Label* fail) { |
2941 ASSERT(kNotStringTag != 0); | 2941 ASSERT(kNotStringTag != 0); |
2942 | 2942 |
2943 lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 2943 lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
2944 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); | 2944 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4087 opcode == BGTZL); | 4087 opcode == BGTZL); |
4088 opcode = (cond == eq) ? BEQ : BNE; | 4088 opcode = (cond == eq) ? BEQ : BNE; |
4089 instr = (instr & ~kOpcodeMask) | opcode; | 4089 instr = (instr & ~kOpcodeMask) | opcode; |
4090 masm_.emit(instr); | 4090 masm_.emit(instr); |
4091 } | 4091 } |
4092 | 4092 |
4093 | 4093 |
4094 } } // namespace v8::internal | 4094 } } // namespace v8::internal |
4095 | 4095 |
4096 #endif // V8_TARGET_ARCH_MIPS | 4096 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |