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

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 6348016: Record the lazy deoptimization environmnent only at LLazyBailout-instructions... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 315 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
316 LPointerMap* pointer_map() const { return pointer_map_.get(); } 316 LPointerMap* pointer_map() const { return pointer_map_.get(); }
317 bool HasPointerMap() const { return pointer_map_.is_set(); } 317 bool HasPointerMap() const { return pointer_map_.is_set(); }
318 318
319 virtual bool HasResult() const = 0; 319 virtual bool HasResult() const = 0;
320 320
321 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 321 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
322 HValue* hydrogen_value() const { return hydrogen_value_; } 322 HValue* hydrogen_value() const { return hydrogen_value_; }
323 323
324 void set_deoptimization_environment(LEnvironment* env) {
325 deoptimization_environment_.set(env);
326 }
327 LEnvironment* deoptimization_environment() const {
328 return deoptimization_environment_.get();
329 }
330 bool HasDeoptimizationEnvironment() const {
331 return deoptimization_environment_.is_set();
332 }
333
334 private: 324 private:
335 SetOncePointer<LEnvironment> environment_; 325 SetOncePointer<LEnvironment> environment_;
336 SetOncePointer<LPointerMap> pointer_map_; 326 SetOncePointer<LPointerMap> pointer_map_;
337 HValue* hydrogen_value_; 327 HValue* hydrogen_value_;
338 SetOncePointer<LEnvironment> deoptimization_environment_;
339 }; 328 };
340 329
341 330
342 template<typename ElementType, int NumElements> 331 template<typename ElementType, int NumElements>
343 class OperandContainer { 332 class OperandContainer {
344 public: 333 public:
345 OperandContainer() { 334 OperandContainer() {
346 for (int i = 0; i < NumElements; i++) elems_[i] = NULL; 335 for (int i = 0; i < NumElements; i++) elems_[i] = NULL;
347 } 336 }
348 int length() { return NumElements; } 337 int length() { return NumElements; }
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 LChunkBuilder(HGraph* graph, LAllocator* allocator) 1863 LChunkBuilder(HGraph* graph, LAllocator* allocator)
1875 : chunk_(NULL), 1864 : chunk_(NULL),
1876 graph_(graph), 1865 graph_(graph),
1877 status_(UNUSED), 1866 status_(UNUSED),
1878 current_instruction_(NULL), 1867 current_instruction_(NULL),
1879 current_block_(NULL), 1868 current_block_(NULL),
1880 next_block_(NULL), 1869 next_block_(NULL),
1881 argument_count_(0), 1870 argument_count_(0),
1882 allocator_(allocator), 1871 allocator_(allocator),
1883 position_(RelocInfo::kNoPosition), 1872 position_(RelocInfo::kNoPosition),
1884 instructions_pending_deoptimization_environment_(NULL),
1885 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } 1873 pending_deoptimization_ast_id_(AstNode::kNoNumber) { }
1886 1874
1887 // Build the sequence for the graph. 1875 // Build the sequence for the graph.
1888 LChunk* Build(); 1876 LChunk* Build();
1889 1877
1890 // Declare methods that deal with the individual node types. 1878 // Declare methods that deal with the individual node types.
1891 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 1879 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
1892 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 1880 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
1893 #undef DECLARE_DO 1881 #undef DECLARE_DO
1894 1882
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 1971
1984 // By default we assume that instruction sequences generated for calls 1972 // By default we assume that instruction sequences generated for calls
1985 // cannot deoptimize eagerly and we do not attach environment to this 1973 // cannot deoptimize eagerly and we do not attach environment to this
1986 // instruction. 1974 // instruction.
1987 LInstruction* MarkAsCall( 1975 LInstruction* MarkAsCall(
1988 LInstruction* instr, 1976 LInstruction* instr,
1989 HInstruction* hinstr, 1977 HInstruction* hinstr,
1990 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY); 1978 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY);
1991 LInstruction* MarkAsSaveDoubles(LInstruction* instr); 1979 LInstruction* MarkAsSaveDoubles(LInstruction* instr);
1992 1980
1993 LInstruction* SetInstructionPendingDeoptimizationEnvironment(
1994 LInstruction* instr, int ast_id);
1995 void ClearInstructionPendingDeoptimizationEnvironment();
1996
1997 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env); 1981 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env);
1998 1982
1999 void VisitInstruction(HInstruction* current); 1983 void VisitInstruction(HInstruction* current);
2000 1984
2001 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); 1985 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2002 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr); 1986 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr);
2003 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); 1987 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2004 LInstruction* DoArithmeticD(Token::Value op, 1988 LInstruction* DoArithmeticD(Token::Value op,
2005 HArithmeticBinaryOperation* instr); 1989 HArithmeticBinaryOperation* instr);
2006 LInstruction* DoArithmeticT(Token::Value op, 1990 LInstruction* DoArithmeticT(Token::Value op,
2007 HArithmeticBinaryOperation* instr); 1991 HArithmeticBinaryOperation* instr);
2008 1992
2009 LChunk* chunk_; 1993 LChunk* chunk_;
2010 HGraph* const graph_; 1994 HGraph* const graph_;
2011 Status status_; 1995 Status status_;
2012 HInstruction* current_instruction_; 1996 HInstruction* current_instruction_;
2013 HBasicBlock* current_block_; 1997 HBasicBlock* current_block_;
2014 HBasicBlock* next_block_; 1998 HBasicBlock* next_block_;
2015 int argument_count_; 1999 int argument_count_;
2016 LAllocator* allocator_; 2000 LAllocator* allocator_;
2017 int position_; 2001 int position_;
2018 LInstruction* instructions_pending_deoptimization_environment_;
2019 int pending_deoptimization_ast_id_; 2002 int pending_deoptimization_ast_id_;
2020 2003
2021 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2004 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2022 }; 2005 };
2023 2006
2024 #undef DECLARE_HYDROGEN_ACCESSOR 2007 #undef DECLARE_HYDROGEN_ACCESSOR
2025 #undef DECLARE_INSTRUCTION 2008 #undef DECLARE_INSTRUCTION
2026 #undef DECLARE_CONCRETE_INSTRUCTION 2009 #undef DECLARE_CONCRETE_INSTRUCTION
2027 2010
2028 } } // namespace v8::internal 2011 } } // namespace v8::internal
2029 2012
2030 #endif // V8_IA32_LITHIUM_IA32_H_ 2013 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698