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

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

Issue 16631002: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove Mips changes 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/hydrogen.cc ('k') | src/ia32/assembler-ia32.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 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 HValue* context() { return first(); } 2461 HValue* context() { return first(); }
2462 HValue* constructor() { return second(); } 2462 HValue* constructor() { return second(); }
2463 2463
2464 DECLARE_CONCRETE_INSTRUCTION(CallNew) 2464 DECLARE_CONCRETE_INSTRUCTION(CallNew)
2465 }; 2465 };
2466 2466
2467 2467
2468 class HCallNewArray: public HCallNew { 2468 class HCallNewArray: public HCallNew {
2469 public: 2469 public:
2470 HCallNewArray(HValue* context, HValue* constructor, int argument_count, 2470 HCallNewArray(HValue* context, HValue* constructor, int argument_count,
2471 Handle<JSGlobalPropertyCell> type_cell) 2471 Handle<Cell> type_cell)
2472 : HCallNew(context, constructor, argument_count), 2472 : HCallNew(context, constructor, argument_count),
2473 type_cell_(type_cell) { 2473 type_cell_(type_cell) {
2474 elements_kind_ = static_cast<ElementsKind>( 2474 elements_kind_ = static_cast<ElementsKind>(
2475 Smi::cast(type_cell->value())->value()); 2475 Smi::cast(type_cell->value())->value());
2476 } 2476 }
2477 2477
2478 Handle<JSGlobalPropertyCell> property_cell() const { 2478 Handle<Cell> property_cell() const {
2479 return type_cell_; 2479 return type_cell_;
2480 } 2480 }
2481 2481
2482 ElementsKind elements_kind() const { return elements_kind_; } 2482 ElementsKind elements_kind() const { return elements_kind_; }
2483 2483
2484 DECLARE_CONCRETE_INSTRUCTION(CallNewArray) 2484 DECLARE_CONCRETE_INSTRUCTION(CallNewArray)
2485 2485
2486 private: 2486 private:
2487 ElementsKind elements_kind_; 2487 ElementsKind elements_kind_;
2488 Handle<JSGlobalPropertyCell> type_cell_; 2488 Handle<Cell> type_cell_;
2489 }; 2489 };
2490 2490
2491 2491
2492 class HCallRuntime: public HCall<1> { 2492 class HCallRuntime: public HCall<1> {
2493 public: 2493 public:
2494 HCallRuntime(HValue* context, 2494 HCallRuntime(HValue* context,
2495 Handle<String> name, 2495 Handle<String> name,
2496 const Runtime::Function* c_function, 2496 const Runtime::Function* c_function,
2497 int argument_count) 2497 int argument_count)
2498 : HCall<1>(argument_count), c_function_(c_function), name_(name) { 2498 : HCall<1>(argument_count), c_function_(c_function), name_(name) {
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after
4821 4821
4822 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue) 4822 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue)
4823 4823
4824 private: 4824 private:
4825 HPhi* incoming_value_; 4825 HPhi* incoming_value_;
4826 }; 4826 };
4827 4827
4828 4828
4829 class HLoadGlobalCell: public HTemplateInstruction<0> { 4829 class HLoadGlobalCell: public HTemplateInstruction<0> {
4830 public: 4830 public:
4831 HLoadGlobalCell(Handle<JSGlobalPropertyCell> cell, PropertyDetails details) 4831 HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details)
4832 : cell_(cell), details_(details), unique_id_() { 4832 : cell_(cell), details_(details), unique_id_() {
4833 set_representation(Representation::Tagged()); 4833 set_representation(Representation::Tagged());
4834 SetFlag(kUseGVN); 4834 SetFlag(kUseGVN);
4835 SetGVNFlag(kDependsOnGlobalVars); 4835 SetGVNFlag(kDependsOnGlobalVars);
4836 } 4836 }
4837 4837
4838 Handle<JSGlobalPropertyCell> cell() const { return cell_; } 4838 Handle<Cell> cell() const { return cell_; }
4839 bool RequiresHoleCheck() const; 4839 bool RequiresHoleCheck() const;
4840 4840
4841 virtual void PrintDataTo(StringStream* stream); 4841 virtual void PrintDataTo(StringStream* stream);
4842 4842
4843 virtual intptr_t Hashcode() { 4843 virtual intptr_t Hashcode() {
4844 return unique_id_.Hashcode(); 4844 return unique_id_.Hashcode();
4845 } 4845 }
4846 4846
4847 virtual void FinalizeUniqueValueId() { 4847 virtual void FinalizeUniqueValueId() {
4848 unique_id_ = UniqueValueId(cell_); 4848 unique_id_ = UniqueValueId(cell_);
4849 } 4849 }
4850 4850
4851 virtual Representation RequiredInputRepresentation(int index) { 4851 virtual Representation RequiredInputRepresentation(int index) {
4852 return Representation::None(); 4852 return Representation::None();
4853 } 4853 }
4854 4854
4855 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) 4855 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell)
4856 4856
4857 protected: 4857 protected:
4858 virtual bool DataEquals(HValue* other) { 4858 virtual bool DataEquals(HValue* other) {
4859 HLoadGlobalCell* b = HLoadGlobalCell::cast(other); 4859 HLoadGlobalCell* b = HLoadGlobalCell::cast(other);
4860 return unique_id_ == b->unique_id_; 4860 return unique_id_ == b->unique_id_;
4861 } 4861 }
4862 4862
4863 private: 4863 private:
4864 virtual bool IsDeletable() const { return !RequiresHoleCheck(); } 4864 virtual bool IsDeletable() const { return !RequiresHoleCheck(); }
4865 4865
4866 Handle<JSGlobalPropertyCell> cell_; 4866 Handle<Cell> cell_;
4867 PropertyDetails details_; 4867 PropertyDetails details_;
4868 UniqueValueId unique_id_; 4868 UniqueValueId unique_id_;
4869 }; 4869 };
4870 4870
4871 4871
4872 class HLoadGlobalGeneric: public HTemplateInstruction<2> { 4872 class HLoadGlobalGeneric: public HTemplateInstruction<2> {
4873 public: 4873 public:
4874 HLoadGlobalGeneric(HValue* context, 4874 HLoadGlobalGeneric(HValue* context,
4875 HValue* global_object, 4875 HValue* global_object,
4876 Handle<Object> name, 4876 Handle<Object> name,
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
6583 virtual bool IsDeletable() const { return true; } 6583 virtual bool IsDeletable() const { return true; }
6584 }; 6584 };
6585 6585
6586 6586
6587 #undef DECLARE_INSTRUCTION 6587 #undef DECLARE_INSTRUCTION
6588 #undef DECLARE_CONCRETE_INSTRUCTION 6588 #undef DECLARE_CONCRETE_INSTRUCTION
6589 6589
6590 } } // namespace v8::internal 6590 } } // namespace v8::internal
6591 6591
6592 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6592 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698