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

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

Issue 9147034: Inlining Math.min and Math.max in crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Port to x64 and arm. Created 8 years, 11 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.h ('k') | src/objects.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 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 return NULL; 1675 return NULL;
1676 } 1676 }
1677 1677
1678 1678
1679 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1679 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1680 Representation from = instr->from(); 1680 Representation from = instr->from();
1681 Representation to = instr->to(); 1681 Representation to = instr->to();
1682 if (from.IsTagged()) { 1682 if (from.IsTagged()) {
1683 if (to.IsDouble()) { 1683 if (to.IsDouble()) {
1684 LOperand* value = UseRegister(instr->value()); 1684 LOperand* value = UseRegister(instr->value());
1685 LNumberUntagD* res = new(zone()) LNumberUntagD(value); 1685 // Temp register only necessary for minus zero check.
1686 LOperand* temp = instr->deoptimize_on_minus_zero()
1687 ? TempRegister()
1688 : NULL;
1689 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp);
1686 return AssignEnvironment(DefineAsRegister(res)); 1690 return AssignEnvironment(DefineAsRegister(res));
1687 } else { 1691 } else {
1688 ASSERT(to.IsInteger32()); 1692 ASSERT(to.IsInteger32());
1689 LOperand* value = UseRegister(instr->value()); 1693 LOperand* value = UseRegister(instr->value());
1690 bool needs_check = !instr->value()->type().IsSmi(); 1694 bool needs_check = !instr->value()->type().IsSmi();
1691 if (needs_check) { 1695 if (needs_check) {
1692 bool truncating = instr->CanTruncateToInt32(); 1696 bool truncating = instr->CanTruncateToInt32();
1693 LOperand* xmm_temp = 1697 LOperand* xmm_temp =
1694 (truncating && CpuFeatures::IsSupported(SSE3)) 1698 (truncating && CpuFeatures::IsSupported(SSE3))
1695 ? NULL 1699 ? NULL
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 LOperand* key = UseOrConstantAtStart(instr->key()); 2401 LOperand* key = UseOrConstantAtStart(instr->key());
2398 LOperand* object = UseOrConstantAtStart(instr->object()); 2402 LOperand* object = UseOrConstantAtStart(instr->object());
2399 LIn* result = new(zone()) LIn(context, key, object); 2403 LIn* result = new(zone()) LIn(context, key, object);
2400 return MarkAsCall(DefineFixed(result, eax), instr); 2404 return MarkAsCall(DefineFixed(result, eax), instr);
2401 } 2405 }
2402 2406
2403 2407
2404 } } // namespace v8::internal 2408 } } // namespace v8::internal
2405 2409
2406 #endif // V8_TARGET_ARCH_IA32 2410 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698