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

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 12208013: Separated smi check from HBoundsCheck. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed platform specific code. Created 7 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 | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips/lithium-codegen-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 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 return AssignEnvironment(Define(result, temp)); 1850 return AssignEnvironment(Define(result, temp));
1851 } 1851 }
1852 1852
1853 1853
1854 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { 1854 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
1855 LOperand* value = UseAtStart(instr->value()); 1855 LOperand* value = UseAtStart(instr->value());
1856 return AssignEnvironment(new(zone()) LCheckSmi(value)); 1856 return AssignEnvironment(new(zone()) LCheckSmi(value));
1857 } 1857 }
1858 1858
1859 1859
1860 LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) {
1861 LOperand* value = UseAtStart(instr->value());
1862 return AssignEnvironment(new(zone()) LCheckSmi(value));
1863 }
1864
1865
1860 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { 1866 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
1861 // If the target is in new space, we'll emit a global cell compare and so 1867 // If the target is in new space, we'll emit a global cell compare and so
1862 // want the value in a register. If the target gets promoted before we 1868 // want the value in a register. If the target gets promoted before we
1863 // emit code, we will still get the register but will do an immediate 1869 // emit code, we will still get the register but will do an immediate
1864 // compare instead of the cell compare. This is safe. 1870 // compare instead of the cell compare. This is safe.
1865 LOperand* value = instr->target_in_new_space() 1871 LOperand* value = instr->target_in_new_space()
1866 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); 1872 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value());
1867 return AssignEnvironment(new(zone()) LCheckFunction(value)); 1873 return AssignEnvironment(new(zone()) LCheckFunction(value));
1868 } 1874 }
1869 1875
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2546 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2541 LOperand* object = UseRegister(instr->object()); 2547 LOperand* object = UseRegister(instr->object());
2542 LOperand* index = UseTempRegister(instr->index()); 2548 LOperand* index = UseTempRegister(instr->index());
2543 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2549 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2544 } 2550 }
2545 2551
2546 2552
2547 } } // namespace v8::internal 2553 } } // namespace v8::internal
2548 2554
2549 #endif // V8_TARGET_ARCH_IA32 2555 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698