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

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

Issue 18602003: Encapsulate compare nil ic_state. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 return DoGenerateCode(this); 777 return DoGenerateCode(this);
778 } 778 }
779 779
780 780
781 template <> 781 template <>
782 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() { 782 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() {
783 Isolate* isolate = graph()->isolate(); 783 Isolate* isolate = graph()->isolate();
784 CompareNilICStub* stub = casted_stub(); 784 CompareNilICStub* stub = casted_stub();
785 HIfContinuation continuation; 785 HIfContinuation continuation;
786 Handle<Map> sentinel_map(isolate->heap()->meta_map()); 786 Handle<Map> sentinel_map(isolate->heap()->meta_map());
787 Handle<Type> type = 787 Handle<Type> type = stub->GetType(isolate, sentinel_map);
788 CompareNilICStub::StateToType(isolate, stub->GetState(), sentinel_map);
789 BuildCompareNil(GetParameter(0), type, RelocInfo::kNoPosition, &continuation); 788 BuildCompareNil(GetParameter(0), type, RelocInfo::kNoPosition, &continuation);
790 IfBuilder if_nil(this, &continuation); 789 IfBuilder if_nil(this, &continuation);
791 if_nil.Then(); 790 if_nil.Then();
792 if (continuation.IsFalseReachable()) { 791 if (continuation.IsFalseReachable()) {
793 if_nil.Else(); 792 if_nil.Else();
794 if_nil.Return(graph()->GetConstant0()); 793 if_nil.Return(graph()->GetConstant0());
795 } 794 }
796 if_nil.End(); 795 if_nil.End();
797 return continuation.IsTrueReachable() 796 return continuation.IsTrueReachable()
798 ? graph()->GetConstant1() 797 ? graph()->GetConstant1()
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 return value; 902 return value;
904 } 903 }
905 904
906 905
907 Handle<Code> StoreGlobalStub::GenerateCode() { 906 Handle<Code> StoreGlobalStub::GenerateCode() {
908 return DoGenerateCode(this); 907 return DoGenerateCode(this);
909 } 908 }
910 909
911 910
912 } } // namespace v8::internal 911 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698