Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 25666006: Get rid of the HInstanceSize instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 instr, 2738 instr,
2739 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); 2739 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
2740 LEnvironment* env = instr->GetDeferredLazyDeoptimizationEnvironment(); 2740 LEnvironment* env = instr->GetDeferredLazyDeoptimizationEnvironment();
2741 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 2741 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
2742 // Put the result value into the result register slot and 2742 // Put the result value into the result register slot and
2743 // restore all registers. 2743 // restore all registers.
2744 __ StoreToSafepointRegisterSlot(result, result); 2744 __ StoreToSafepointRegisterSlot(result, result);
2745 } 2745 }
2746 2746
2747 2747
2748 void LCodeGen::DoInstanceSize(LInstanceSize* instr) {
2749 Register object = ToRegister(instr->object());
2750 Register result = ToRegister(instr->result());
2751 __ lw(result, FieldMemOperand(object, HeapObject::kMapOffset));
2752 __ lbu(result, FieldMemOperand(result, Map::kInstanceSizeOffset));
2753 }
2754
2755
2756 void LCodeGen::DoCmpT(LCmpT* instr) { 2748 void LCodeGen::DoCmpT(LCmpT* instr) {
2757 ASSERT(ToRegister(instr->context()).is(cp)); 2749 ASSERT(ToRegister(instr->context()).is(cp));
2758 Token::Value op = instr->op(); 2750 Token::Value op = instr->op();
2759 2751
2760 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); 2752 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op);
2761 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2753 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2762 // On MIPS there is no need for a "no inlined smi code" marker (nop). 2754 // On MIPS there is no need for a "no inlined smi code" marker (nop).
2763 2755
2764 Condition condition = ComputeCompareCondition(op); 2756 Condition condition = ComputeCompareCondition(op);
2765 // A minor optimization that relies on LoadRoot always emitting one 2757 // A minor optimization that relies on LoadRoot always emitting one
(...skipping 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after
5848 __ Subu(scratch, result, scratch); 5840 __ Subu(scratch, result, scratch);
5849 __ lw(result, FieldMemOperand(scratch, 5841 __ lw(result, FieldMemOperand(scratch,
5850 FixedArray::kHeaderSize - kPointerSize)); 5842 FixedArray::kHeaderSize - kPointerSize));
5851 __ bind(&done); 5843 __ bind(&done);
5852 } 5844 }
5853 5845
5854 5846
5855 #undef __ 5847 #undef __
5856 5848
5857 } } // namespace v8::internal 5849 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698