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

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

Issue 293353004: Remove HType::HeapNumber from mutable heap numbers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 6 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/hydrogen.cc ('k') | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 ClearFlag(kFlexibleRepresentation); 707 ClearFlag(kFlexibleRepresentation);
708 } 708 }
709 } 709 }
710 virtual void AssumeRepresentation(Representation r); 710 virtual void AssumeRepresentation(Representation r);
711 711
712 virtual Representation KnownOptimalRepresentation() { 712 virtual Representation KnownOptimalRepresentation() {
713 Representation r = representation(); 713 Representation r = representation();
714 if (r.IsTagged()) { 714 if (r.IsTagged()) {
715 HType t = type(); 715 HType t = type();
716 if (t.IsSmi()) return Representation::Smi(); 716 if (t.IsSmi()) return Representation::Smi();
717 // TODO(mstarzinger): This is not correct for mutable HeapNumbers.
718 if (t.IsHeapNumber()) return Representation::Double(); 717 if (t.IsHeapNumber()) return Representation::Double();
719 if (t.IsHeapObject()) return r; 718 if (t.IsHeapObject()) return r;
720 return Representation::None(); 719 return Representation::None();
721 } 720 }
722 return r; 721 return r;
723 } 722 }
724 723
725 HType type() const { return type_; } 724 HType type() const { return type_; }
726 void set_type(HType new_type) { 725 void set_type(HType new_type) {
727 ASSERT(new_type.IsSubtypeOf(type_)); 726 ASSERT(new_type.IsSubtypeOf(type_));
(...skipping 4812 matching lines...) Expand 10 before | Expand all | Expand 10 after
5540 HValue* context() { return OperandAt(0); } 5539 HValue* context() { return OperandAt(0); }
5541 HValue* size() { return OperandAt(1); } 5540 HValue* size() { return OperandAt(1); }
5542 5541
5543 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 5542 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
5544 if (index == 0) { 5543 if (index == 0) {
5545 return Representation::Tagged(); 5544 return Representation::Tagged();
5546 } else { 5545 } else {
5547 return Representation::Integer32(); 5546 return Representation::Integer32();
5548 } 5547 }
5549 } 5548 }
5550 // TODO(mstarzinger): Workaround until we track mutable HeapNumber types.
5551 virtual Representation KnownOptimalRepresentation() V8_OVERRIDE {
5552 return representation();
5553 }
5554 5549
5555 virtual Handle<Map> GetMonomorphicJSObjectMap() { 5550 virtual Handle<Map> GetMonomorphicJSObjectMap() {
5556 return known_initial_map_; 5551 return known_initial_map_;
5557 } 5552 }
5558 5553
5559 void set_known_initial_map(Handle<Map> known_initial_map) { 5554 void set_known_initial_map(Handle<Map> known_initial_map) {
5560 known_initial_map_ = known_initial_map; 5555 known_initial_map_ = known_initial_map;
5561 } 5556 }
5562 5557
5563 bool IsNewSpaceAllocation() const { 5558 bool IsNewSpaceAllocation() const {
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after
7803 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7798 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7804 }; 7799 };
7805 7800
7806 7801
7807 #undef DECLARE_INSTRUCTION 7802 #undef DECLARE_INSTRUCTION
7808 #undef DECLARE_CONCRETE_INSTRUCTION 7803 #undef DECLARE_CONCRETE_INSTRUCTION
7809 7804
7810 } } // namespace v8::internal 7805 } } // namespace v8::internal
7811 7806
7812 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7807 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698