OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2881 | 2881 |
2882 | 2882 |
2883 void LCodeGen::DoInstanceSize(LInstanceSize* instr) { | 2883 void LCodeGen::DoInstanceSize(LInstanceSize* instr) { |
2884 Register object = ToRegister(instr->object()); | 2884 Register object = ToRegister(instr->object()); |
2885 Register result = ToRegister(instr->result()); | 2885 Register result = ToRegister(instr->result()); |
2886 __ ldr(result, FieldMemOperand(object, HeapObject::kMapOffset)); | 2886 __ ldr(result, FieldMemOperand(object, HeapObject::kMapOffset)); |
2887 __ ldrb(result, FieldMemOperand(result, Map::kInstanceSizeOffset)); | 2887 __ ldrb(result, FieldMemOperand(result, Map::kInstanceSizeOffset)); |
2888 } | 2888 } |
2889 | 2889 |
2890 | 2890 |
2891 void LCodeGen::DoCmpT(LCmpT* instr) { | 2891 void LCodeGen::DoCompareGenericAndBranch(LCompareGenericAndBranch* instr) { |
2892 Token::Value op = instr->op(); | 2892 Token::Value op = instr->op(); |
2893 | 2893 |
2894 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); | 2894 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); |
2895 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2895 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2896 // This instruction also signals no smi code inlined. | 2896 // This instruction also signals no smi code inlined. |
2897 __ cmp(r0, Operand::Zero()); | 2897 __ cmp(r0, Operand::Zero()); |
2898 | 2898 |
2899 Condition condition = ComputeCompareCondition(op); | 2899 Condition condition = ComputeCompareCondition(op); |
2900 __ LoadRoot(ToRegister(instr->result()), | 2900 EmitBranch(instr, condition); |
2901 Heap::kTrueValueRootIndex, | |
2902 condition); | |
2903 __ LoadRoot(ToRegister(instr->result()), | |
2904 Heap::kFalseValueRootIndex, | |
2905 NegateCondition(condition)); | |
2906 } | 2901 } |
2907 | 2902 |
2908 | 2903 |
2909 void LCodeGen::DoReturn(LReturn* instr) { | 2904 void LCodeGen::DoReturn(LReturn* instr) { |
2910 if (FLAG_trace && info()->IsOptimizing()) { | 2905 if (FLAG_trace && info()->IsOptimizing()) { |
2911 // Push the return value on the stack as the parameter. | 2906 // Push the return value on the stack as the parameter. |
2912 // Runtime::TraceExit returns its parameter in r0. | 2907 // Runtime::TraceExit returns its parameter in r0. |
2913 __ push(r0); | 2908 __ push(r0); |
2914 __ CallRuntime(Runtime::kTraceExit, 1); | 2909 __ CallRuntime(Runtime::kTraceExit, 1); |
2915 } | 2910 } |
(...skipping 2871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5787 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5782 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5788 __ ldr(result, FieldMemOperand(scratch, | 5783 __ ldr(result, FieldMemOperand(scratch, |
5789 FixedArray::kHeaderSize - kPointerSize)); | 5784 FixedArray::kHeaderSize - kPointerSize)); |
5790 __ bind(&done); | 5785 __ bind(&done); |
5791 } | 5786 } |
5792 | 5787 |
5793 | 5788 |
5794 #undef __ | 5789 #undef __ |
5795 | 5790 |
5796 } } // namespace v8::internal | 5791 } } // namespace v8::internal |
OLD | NEW |