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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 21782002: Replaced unary negation by multiplication with -1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 7 years, 4 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/arm/full-codegen-arm.cc ('k') | src/hydrogen.cc » ('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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 797
798 798
799 Handle<Code> CompareNilICStub::GenerateCode() { 799 Handle<Code> CompareNilICStub::GenerateCode() {
800 return DoGenerateCode(this); 800 return DoGenerateCode(this);
801 } 801 }
802 802
803 803
804 template <> 804 template <>
805 HValue* CodeStubGraphBuilder<UnaryOpStub>::BuildCodeInitializedStub() { 805 HValue* CodeStubGraphBuilder<UnaryOpStub>::BuildCodeInitializedStub() {
806 UnaryOpStub* stub = casted_stub(); 806 UnaryOpStub* stub = casted_stub();
807 ASSERT_EQ(Token::BIT_NOT, stub->operation());
807 Handle<Type> type = stub->GetType(graph()->isolate()); 808 Handle<Type> type = stub->GetType(graph()->isolate());
808 HValue* input = GetParameter(0); 809 HValue* input = GetParameter(0);
809 810
810 // Prevent unwanted HChange being inserted to ensure that the stub 811 // Prevent unwanted HChange being inserted to ensure that the stub
811 // deopts on newly encountered types. 812 // deopts on newly encountered types.
812 if (!type->Maybe(Type::Double())) { 813 if (!type->Maybe(Type::Double())) {
813 input = Add<HForceRepresentation>(input, Representation::Smi()); 814 input = Add<HForceRepresentation>(input, Representation::Smi());
814 } 815 }
815 816
816 if (!type->Is(Type::Number())) { 817 if (!type->Is(Type::Number())) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 return value; 936 return value;
936 } 937 }
937 938
938 939
939 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { 940 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() {
940 return DoGenerateCode(this); 941 return DoGenerateCode(this);
941 } 942 }
942 943
943 944
944 } } // namespace v8::internal 945 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698