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

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

Issue 130803012: MIPS: Remove the HValueOf instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | 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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 } 1644 }
1645 1645
1646 1646
1647 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { 1647 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) {
1648 Register result = ToRegister(instr->result()); 1648 Register result = ToRegister(instr->result());
1649 Register map = ToRegister(instr->value()); 1649 Register map = ToRegister(instr->value());
1650 __ EnumLength(result, map); 1650 __ EnumLength(result, map);
1651 } 1651 }
1652 1652
1653 1653
1654 void LCodeGen::DoValueOf(LValueOf* instr) {
1655 Register input = ToRegister(instr->value());
1656 Register result = ToRegister(instr->result());
1657 Register map = ToRegister(instr->temp());
1658 Label done;
1659
1660 if (!instr->hydrogen()->value()->IsHeapObject()) {
1661 // If the object is a smi return the object.
1662 __ Move(result, input);
1663 __ JumpIfSmi(input, &done);
1664 }
1665
1666 // If the object is not a value type, return the object.
1667 __ GetObjectType(input, map, map);
1668 __ Branch(&done, ne, map, Operand(JS_VALUE_TYPE));
1669 __ lw(result, FieldMemOperand(input, JSValue::kValueOffset));
1670
1671 __ bind(&done);
1672 }
1673
1674
1675 void LCodeGen::DoDateField(LDateField* instr) { 1654 void LCodeGen::DoDateField(LDateField* instr) {
1676 Register object = ToRegister(instr->date()); 1655 Register object = ToRegister(instr->date());
1677 Register result = ToRegister(instr->result()); 1656 Register result = ToRegister(instr->result());
1678 Register scratch = ToRegister(instr->temp()); 1657 Register scratch = ToRegister(instr->temp());
1679 Smi* index = instr->index(); 1658 Smi* index = instr->index();
1680 Label runtime, done; 1659 Label runtime, done;
1681 ASSERT(object.is(a0)); 1660 ASSERT(object.is(a0));
1682 ASSERT(result.is(v0)); 1661 ASSERT(result.is(v0));
1683 ASSERT(!scratch.is(scratch0())); 1662 ASSERT(!scratch.is(scratch0()));
1684 ASSERT(!scratch.is(object)); 1663 ASSERT(!scratch.is(object));
(...skipping 4070 matching lines...) Expand 10 before | Expand all | Expand 10 after
5755 __ Subu(scratch, result, scratch); 5734 __ Subu(scratch, result, scratch);
5756 __ lw(result, FieldMemOperand(scratch, 5735 __ lw(result, FieldMemOperand(scratch,
5757 FixedArray::kHeaderSize - kPointerSize)); 5736 FixedArray::kHeaderSize - kPointerSize));
5758 __ bind(&done); 5737 __ bind(&done);
5759 } 5738 }
5760 5739
5761 5740
5762 #undef __ 5741 #undef __
5763 5742
5764 } } // namespace v8::internal 5743 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698