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

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

Issue 140943002: Fix logic error in assert in IsUndeclaredGlobal() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports and addressed comments. Created 6 years, 11 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') | src/hydrogen-instructions.cc » ('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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 V(Sar) \ 158 V(Sar) \
159 V(SeqStringGetChar) \ 159 V(SeqStringGetChar) \
160 V(SeqStringSetChar) \ 160 V(SeqStringSetChar) \
161 V(Shl) \ 161 V(Shl) \
162 V(Shr) \ 162 V(Shr) \
163 V(Simulate) \ 163 V(Simulate) \
164 V(StackCheck) \ 164 V(StackCheck) \
165 V(StoreCodeEntry) \ 165 V(StoreCodeEntry) \
166 V(StoreContextSlot) \ 166 V(StoreContextSlot) \
167 V(StoreGlobalCell) \ 167 V(StoreGlobalCell) \
168 V(StoreGlobalGeneric) \
169 V(StoreKeyed) \ 168 V(StoreKeyed) \
170 V(StoreKeyedGeneric) \ 169 V(StoreKeyedGeneric) \
171 V(StoreNamedField) \ 170 V(StoreNamedField) \
172 V(StoreNamedGeneric) \ 171 V(StoreNamedGeneric) \
173 V(StringAdd) \ 172 V(StringAdd) \
174 V(StringCharCodeAt) \ 173 V(StringCharCodeAt) \
175 V(StringCharFromCode) \ 174 V(StringCharFromCode) \
176 V(StringCompareAndBranch) \ 175 V(StringCompareAndBranch) \
177 V(Sub) \ 176 V(Sub) \
178 V(ThisFunction) \ 177 V(ThisFunction) \
(...skipping 5555 matching lines...) Expand 10 before | Expand all | Expand 10 after
5734 cell_(Unique<PropertyCell>::CreateUninitialized(cell)), 5733 cell_(Unique<PropertyCell>::CreateUninitialized(cell)),
5735 details_(details) { 5734 details_(details) {
5736 SetGVNFlag(kChangesGlobalVars); 5735 SetGVNFlag(kChangesGlobalVars);
5737 } 5736 }
5738 5737
5739 Unique<PropertyCell> cell_; 5738 Unique<PropertyCell> cell_;
5740 PropertyDetails details_; 5739 PropertyDetails details_;
5741 }; 5740 };
5742 5741
5743 5742
5744 class HStoreGlobalGeneric : public HTemplateInstruction<3> {
5745 public:
5746 inline static HStoreGlobalGeneric* New(Zone* zone,
5747 HValue* context,
5748 HValue* global_object,
5749 Handle<Object> name,
5750 HValue* value,
5751 StrictModeFlag strict_mode_flag) {
5752 return new(zone) HStoreGlobalGeneric(context, global_object,
5753 name, value, strict_mode_flag);
5754 }
5755
5756 HValue* context() { return OperandAt(0); }
5757 HValue* global_object() { return OperandAt(1); }
5758 Handle<Object> name() const { return name_; }
5759 HValue* value() { return OperandAt(2); }
5760 StrictModeFlag strict_mode_flag() { return strict_mode_flag_; }
5761
5762 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
5763
5764 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
5765 return Representation::Tagged();
5766 }
5767
5768 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric)
5769
5770 private:
5771 HStoreGlobalGeneric(HValue* context,
5772 HValue* global_object,
5773 Handle<Object> name,
5774 HValue* value,
5775 StrictModeFlag strict_mode_flag)
5776 : name_(name),
5777 strict_mode_flag_(strict_mode_flag) {
5778 SetOperandAt(0, context);
5779 SetOperandAt(1, global_object);
5780 SetOperandAt(2, value);
5781 set_representation(Representation::Tagged());
5782 SetAllSideEffects();
5783 }
5784
5785 Handle<Object> name_;
5786 StrictModeFlag strict_mode_flag_;
5787 };
5788
5789
5790 class HLoadContextSlot V8_FINAL : public HUnaryOperation { 5743 class HLoadContextSlot V8_FINAL : public HUnaryOperation {
5791 public: 5744 public:
5792 enum Mode { 5745 enum Mode {
5793 // Perform a normal load of the context slot without checking its value. 5746 // Perform a normal load of the context slot without checking its value.
5794 kNoCheck, 5747 kNoCheck,
5795 // Load and check the value of the context slot. Deoptimize if it's the 5748 // Load and check the value of the context slot. Deoptimize if it's the
5796 // hole value. This is used for checking for loading of uninitialized 5749 // hole value. This is used for checking for loading of uninitialized
5797 // harmony bindings where we deoptimize into full-codegen generated code 5750 // harmony bindings where we deoptimize into full-codegen generated code
5798 // which will subsequently throw a reference error. 5751 // which will subsequently throw a reference error.
5799 kCheckDeoptimize, 5752 kCheckDeoptimize,
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
7576 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7529 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7577 }; 7530 };
7578 7531
7579 7532
7580 #undef DECLARE_INSTRUCTION 7533 #undef DECLARE_INSTRUCTION
7581 #undef DECLARE_CONCRETE_INSTRUCTION 7534 #undef DECLARE_CONCRETE_INSTRUCTION
7582 7535
7583 } } // namespace v8::internal 7536 } } // namespace v8::internal
7584 7537
7585 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7538 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« 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