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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 11414201: Make HJSArrayLength more likely to have identical GVNs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 } 1029 }
1030 1030
1031 1031
1032 void HJSArrayLength::PrintDataTo(StringStream* stream) { 1032 void HJSArrayLength::PrintDataTo(StringStream* stream) {
1033 value()->PrintNameTo(stream); 1033 value()->PrintNameTo(stream);
1034 stream->Add(" "); 1034 stream->Add(" ");
1035 typecheck()->PrintNameTo(stream); 1035 typecheck()->PrintNameTo(stream);
1036 } 1036 }
1037 1037
1038 1038
1039 HJSArrayLength* HJSArrayLength::Create(HGraph* graph,
1040 HValue* value,
1041 HValue* typecheck,
1042 HType type) {
1043 HJSArrayLength* result = new(graph->zone())
1044 HJSArrayLength(value, typecheck, type);
1045 graph->RecordJSArrayLength(result);
1046 return result;
1047 }
1048
1049
1039 HValue* HUnaryMathOperation::Canonicalize() { 1050 HValue* HUnaryMathOperation::Canonicalize() {
1040 if (op() == kMathFloor) { 1051 if (op() == kMathFloor) {
1041 // If the input is integer32 then we replace the floor instruction 1052 // If the input is integer32 then we replace the floor instruction
1042 // with its input. This happens before the representation changes are 1053 // with its input. This happens before the representation changes are
1043 // introduced. 1054 // introduced.
1044 if (value()->representation().IsInteger32()) return value(); 1055 if (value()->representation().IsInteger32()) return value();
1045 1056
1046 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \ 1057 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \
1047 defined(V8_TARGET_ARCH_X64) 1058 defined(V8_TARGET_ARCH_X64)
1048 if (value()->IsDiv() && (value()->UseCount() == 1)) { 1059 if (value()->IsDiv() && (value()->UseCount() == 1)) {
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2765 2776
2766 2777
2767 void HCheckFunction::Verify() { 2778 void HCheckFunction::Verify() {
2768 HInstruction::Verify(); 2779 HInstruction::Verify();
2769 ASSERT(HasNoUses()); 2780 ASSERT(HasNoUses());
2770 } 2781 }
2771 2782
2772 #endif 2783 #endif
2773 2784
2774 } } // namespace v8::internal 2785 } } // namespace v8::internal
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698