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

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

Issue 16361015: Migrate Compare ICs to new type rep (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 7 years, 6 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/code-stubs.cc ('k') | src/compiler.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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 726 }
727 727
728 728
729 Handle<Code> InternalArrayNArgumentsConstructorStub::GenerateCode() { 729 Handle<Code> InternalArrayNArgumentsConstructorStub::GenerateCode() {
730 return DoGenerateCode(this); 730 return DoGenerateCode(this);
731 } 731 }
732 732
733 733
734 template <> 734 template <>
735 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() { 735 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() {
736 Isolate* isolate = graph()->isolate();
736 CompareNilICStub* stub = casted_stub(); 737 CompareNilICStub* stub = casted_stub();
737 HIfContinuation continuation; 738 HIfContinuation continuation;
738 Handle<Map> sentinel_map(graph()->isolate()->heap()->meta_map()); 739 Handle<Map> sentinel_map(isolate->heap()->meta_map());
739 BuildCompareNil(GetParameter(0), 740 Handle<Type> type =
740 stub->GetTypes(), sentinel_map, 741 CompareNilICStub::StateToType(isolate, stub->GetState(), sentinel_map);
741 RelocInfo::kNoPosition, &continuation); 742 BuildCompareNil(GetParameter(0), type, RelocInfo::kNoPosition, &continuation);
742 IfBuilder if_nil(this, &continuation); 743 IfBuilder if_nil(this, &continuation);
743 if_nil.Then(); 744 if_nil.Then();
744 if (continuation.IsFalseReachable()) { 745 if (continuation.IsFalseReachable()) {
745 if_nil.Else(); 746 if_nil.Else();
746 if_nil.Return(graph()->GetConstant0()); 747 if_nil.Return(graph()->GetConstant0());
747 } 748 }
748 if_nil.End(); 749 if_nil.End();
749 return continuation.IsTrueReachable() 750 return continuation.IsTrueReachable()
750 ? graph()->GetConstant1() 751 ? graph()->GetConstant1()
751 : graph()->GetConstantUndefined(); 752 : graph()->GetConstantUndefined();
(...skipping 18 matching lines...) Expand all
770 return graph()->GetConstant0(); 771 return graph()->GetConstant0();
771 } 772 }
772 773
773 774
774 Handle<Code> ToBooleanStub::GenerateCode() { 775 Handle<Code> ToBooleanStub::GenerateCode() {
775 return DoGenerateCode(this); 776 return DoGenerateCode(this);
776 } 777 }
777 778
778 779
779 } } // namespace v8::internal 780 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698