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

Unified Diff: src/hydrogen-instructions.h

Issue 15763004: Replace tagged keys for fast access by smi, and use smi in boundscheck. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed comment Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 5a261ed77296ccda974c6ae44e7d8158228daed2..554f28191bf813ad8e3d1bd020d0541d663a4266 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -93,7 +93,6 @@ class LChunkBuilder;
V(CheckNonSmi) \
V(CheckPrototypeMaps) \
V(CheckSmi) \
- V(CheckSmiOrInt32) \
V(ClampToUint8) \
V(ClassOfTestAndBranch) \
V(CompareIDAndBranch) \
@@ -1721,7 +1720,7 @@ class HChange: public HUnaryOperation {
SetFlag(kUseGVN);
if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined);
if (is_truncating) SetFlag(kTruncatingToInt32);
- if (value->type().IsSmi()) {
+ if (value->representation().IsSmi() || value->type().IsSmi()) {
set_type(HType::Smi());
} else {
set_type(HType::TaggedNumber());
@@ -2952,38 +2951,6 @@ class HCheckSmi: public HUnaryOperation {
};
-class HCheckSmiOrInt32: public HUnaryOperation {
- public:
- explicit HCheckSmiOrInt32(HValue* value) : HUnaryOperation(value) {
- SetFlag(kFlexibleRepresentation);
- SetFlag(kUseGVN);
- }
-
- virtual int RedefinedOperandIndex() { return 0; }
- virtual Representation RequiredInputRepresentation(int index) {
- return representation();
- }
- virtual void InferRepresentation(HInferRepresentation* h_infer);
-
- virtual Representation observed_input_representation(int index) {
- return Representation::Integer32();
- }
-
- virtual HValue* Canonicalize() {
- if (representation().IsTagged() && !value()->type().IsSmi()) {
- return this;
- } else {
- return value();
- }
- }
-
- DECLARE_CONCRETE_INSTRUCTION(CheckSmiOrInt32)
-
- protected:
- virtual bool DataEquals(HValue* other) { return true; }
-};
-
-
class HPhi: public HValue {
public:
HPhi(int merged_index, Zone* zone)
@@ -3578,8 +3545,7 @@ class HBoundsCheckBaseIndexInformation;
class HBoundsCheck: public HTemplateInstruction<2> {
public:
// Normally HBoundsCheck should be created using the
- // HGraphBuilder::AddBoundsCheck() helper, which also guards the index with
- // a HCheckSmiOrInt32 check.
+ // HGraphBuilder::AddBoundsCheck() helper.
// However when building stubs, where we know that the arguments are Int32,
// it makes sense to invoke this constructor directly.
HBoundsCheck(HValue* index,
@@ -5383,7 +5349,7 @@ class ArrayInstructionInterface {
static Representation KeyedAccessIndexRequirement(Representation r) {
return r.IsInteger32() ? Representation::Integer32()
- : Representation::Tagged();
+ : Representation::Smi();
}
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698