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

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

Issue 15861009: Tag smi-constants as smi. This also fixes code that copies holes into arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed 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/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 CompareNilICStub* stub = casted_stub(); 663 CompareNilICStub* stub = casted_stub();
664 HIfContinuation continuation; 664 HIfContinuation continuation;
665 Handle<Map> sentinel_map(graph()->isolate()->heap()->meta_map()); 665 Handle<Map> sentinel_map(graph()->isolate()->heap()->meta_map());
666 BuildCompareNil(GetParameter(0), stub->GetKind(), 666 BuildCompareNil(GetParameter(0), stub->GetKind(),
667 stub->GetTypes(), sentinel_map, 667 stub->GetTypes(), sentinel_map,
668 RelocInfo::kNoPosition, &continuation); 668 RelocInfo::kNoPosition, &continuation);
669 IfBuilder if_nil(this, &continuation); 669 IfBuilder if_nil(this, &continuation);
670 if_nil.Then(); 670 if_nil.Then();
671 if (continuation.IsFalseReachable()) { 671 if (continuation.IsFalseReachable()) {
672 if_nil.Else(); 672 if_nil.Else();
673 if_nil.Return(graph()->GetConstantSmi0()); 673 if_nil.Return(graph()->GetConstant0());
674 } 674 }
675 if_nil.End(); 675 if_nil.End();
676 return continuation.IsTrueReachable() 676 return continuation.IsTrueReachable()
677 ? graph()->GetConstantSmi1() 677 ? graph()->GetConstant1()
678 : graph()->GetConstantUndefined(); 678 : graph()->GetConstantUndefined();
679 } 679 }
680 680
681 681
682 Handle<Code> CompareNilICStub::GenerateCode() { 682 Handle<Code> CompareNilICStub::GenerateCode() {
683 return DoGenerateCode(this); 683 return DoGenerateCode(this);
684 } 684 }
685 685
686 } } // namespace v8::internal 686 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698