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

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

Issue 18508002: Remove HFixedArrayBaseLength instruction and replace with regular HLoadNamedField. (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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 V(Context) \ 104 V(Context) \
105 V(DebugBreak) \ 105 V(DebugBreak) \
106 V(DeclareGlobals) \ 106 V(DeclareGlobals) \
107 V(DeleteProperty) \ 107 V(DeleteProperty) \
108 V(Deoptimize) \ 108 V(Deoptimize) \
109 V(Div) \ 109 V(Div) \
110 V(DummyUse) \ 110 V(DummyUse) \
111 V(ElementsKind) \ 111 V(ElementsKind) \
112 V(EnterInlined) \ 112 V(EnterInlined) \
113 V(EnvironmentMarker) \ 113 V(EnvironmentMarker) \
114 V(FixedArrayBaseLength) \
115 V(ForceRepresentation) \ 114 V(ForceRepresentation) \
116 V(FunctionLiteral) \ 115 V(FunctionLiteral) \
117 V(GetCachedArrayIndex) \ 116 V(GetCachedArrayIndex) \
118 V(GlobalObject) \ 117 V(GlobalObject) \
119 V(GlobalReceiver) \ 118 V(GlobalReceiver) \
120 V(Goto) \ 119 V(Goto) \
121 V(HasCachedArrayIndexAndBranch) \ 120 V(HasCachedArrayIndexAndBranch) \
122 V(HasInstanceTypeAndBranch) \ 121 V(HasInstanceTypeAndBranch) \
123 V(InductionVariableAnnotation) \ 122 V(InductionVariableAnnotation) \
124 V(In) \ 123 V(In) \
(...skipping 2410 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 } 2534 }
2536 2535
2537 DECLARE_CONCRETE_INSTRUCTION(CallRuntime) 2536 DECLARE_CONCRETE_INSTRUCTION(CallRuntime)
2538 2537
2539 private: 2538 private:
2540 const Runtime::Function* c_function_; 2539 const Runtime::Function* c_function_;
2541 Handle<String> name_; 2540 Handle<String> name_;
2542 }; 2541 };
2543 2542
2544 2543
2545 class HFixedArrayBaseLength: public HUnaryOperation {
2546 public:
2547 explicit HFixedArrayBaseLength(HValue* value) : HUnaryOperation(value) {
2548 set_type(HType::Smi());
2549 set_representation(Representation::Smi());
2550 SetFlag(kUseGVN);
2551 SetGVNFlag(kDependsOnArrayLengths);
2552 }
2553
2554 virtual Representation RequiredInputRepresentation(int index) {
2555 return Representation::Tagged();
2556 }
2557
2558 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength)
2559
2560 protected:
2561 virtual bool DataEquals(HValue* other) { return true; }
2562
2563 private:
2564 virtual bool IsDeletable() const { return true; }
2565 };
2566
2567
2568 class HMapEnumLength: public HUnaryOperation { 2544 class HMapEnumLength: public HUnaryOperation {
2569 public: 2545 public:
2570 explicit HMapEnumLength(HValue* value) : HUnaryOperation(value) { 2546 explicit HMapEnumLength(HValue* value) : HUnaryOperation(value) {
2571 set_type(HType::Smi()); 2547 set_type(HType::Smi());
2572 set_representation(Representation::Smi()); 2548 set_representation(Representation::Smi());
2573 SetFlag(kUseGVN); 2549 SetFlag(kUseGVN);
2574 SetGVNFlag(kDependsOnMaps); 2550 SetGVNFlag(kDependsOnMaps);
2575 } 2551 }
2576 2552
2577 virtual Representation RequiredInputRepresentation(int index) { 2553 virtual Representation RequiredInputRepresentation(int index) {
(...skipping 4073 matching lines...) Expand 10 before | Expand all | Expand 10 after
6651 virtual bool IsDeletable() const { return true; } 6627 virtual bool IsDeletable() const { return true; }
6652 }; 6628 };
6653 6629
6654 6630
6655 #undef DECLARE_INSTRUCTION 6631 #undef DECLARE_INSTRUCTION
6656 #undef DECLARE_CONCRETE_INSTRUCTION 6632 #undef DECLARE_CONCRETE_INSTRUCTION
6657 6633
6658 } } // namespace v8::internal 6634 } } // namespace v8::internal
6659 6635
6660 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6636 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698