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

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

Issue 59023003: Generate TypedArrayInitialize builtin in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 7 years 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
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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); 1646 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow);
1647 LInstruction* result = use_lea 1647 LInstruction* result = use_lea
1648 ? DefineAsRegister(add) 1648 ? DefineAsRegister(add)
1649 : DefineSameAsFirst(add); 1649 : DefineSameAsFirst(add);
1650 if (can_overflow) { 1650 if (can_overflow) {
1651 result = AssignEnvironment(result); 1651 result = AssignEnvironment(result);
1652 } 1652 }
1653 return result; 1653 return result;
1654 } else if (instr->representation().IsDouble()) { 1654 } else if (instr->representation().IsDouble()) {
1655 return DoArithmeticD(Token::ADD, instr); 1655 return DoArithmeticD(Token::ADD, instr);
1656 } else if (instr->representation().IsExternal()) {
1657 ASSERT(instr->left()->representation().IsExternal());
1658 ASSERT(instr->right()->representation().IsInteger32());
1659 ASSERT(!instr->CheckFlag(HValue::kCanOverflow));
1660 bool use_lea = LAddI::UseLea(instr);
1661 LOperand* left = UseRegisterAtStart(instr->left());
1662 HValue* right_candidate = instr->right();
1663 LOperand* right = use_lea
1664 ? UseRegisterOrConstantAtStart(right_candidate)
1665 : UseOrConstantAtStart(right_candidate);
1666 LAddI* add = new(zone()) LAddI(left, right);
1667 LInstruction* result = use_lea
1668 ? DefineAsRegister(add)
1669 : DefineSameAsFirst(add);
1670 return result;
1656 } else { 1671 } else {
1657 return DoArithmeticT(Token::ADD, instr); 1672 return DoArithmeticT(Token::ADD, instr);
1658 } 1673 }
1659 } 1674 }
1660 1675
1661 1676
1662 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { 1677 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) {
1663 LOperand* left = NULL; 1678 LOperand* left = NULL;
1664 LOperand* right = NULL; 1679 LOperand* right = NULL;
1665 if (instr->representation().IsSmiOrInteger32()) { 1680 if (instr->representation().IsSmiOrInteger32()) {
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2786 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2801 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2787 LOperand* object = UseRegister(instr->object()); 2802 LOperand* object = UseRegister(instr->object());
2788 LOperand* index = UseTempRegister(instr->index()); 2803 LOperand* index = UseTempRegister(instr->index());
2789 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2804 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2790 } 2805 }
2791 2806
2792 2807
2793 } } // namespace v8::internal 2808 } } // namespace v8::internal
2794 2809
2795 #endif // V8_TARGET_ARCH_IA32 2810 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698