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

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

Issue 5964005: Shorten live ranges of argument subexpressions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1396 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1397 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 1397 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1398 1398
1399 virtual void PrintDataTo(StringStream* stream) const; 1399 virtual void PrintDataTo(StringStream* stream) const;
1400 1400
1401 Handle<String> name() const {return hydrogen()->name(); } 1401 Handle<String> name() const {return hydrogen()->name(); }
1402 int arity() const { return hydrogen()->argument_count() - 1; } 1402 int arity() const { return hydrogen()->argument_count() - 1; }
1403 }; 1403 };
1404 1404
1405 1405
1406 class LCallKnownGlobal: public LInstruction { 1406 class LCallKnownGlobal: public LUnaryOperation {
1407 public: 1407 public:
1408 explicit LCallKnownGlobal(LOperand* receiver) : LUnaryOperation(receiver) { }
1409
1408 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") 1410 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
1409 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) 1411 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
1410 1412
1411 virtual void PrintDataTo(StringStream* stream) const; 1413 virtual void PrintDataTo(StringStream* stream) const;
1412 1414
1413 Handle<JSFunction> target() const { return hydrogen()->target(); } 1415 Handle<JSFunction> target() const { return hydrogen()->target(); }
1414 int arity() const { return hydrogen()->argument_count() - 1; } 1416 int arity() const { return hydrogen()->argument_count() - 1; }
1415 }; 1417 };
1416 1418
1417 1419
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 void VisitInstruction(HInstruction* current); 2099 void VisitInstruction(HInstruction* current);
2098 2100
2099 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); 2101 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2100 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr); 2102 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr);
2101 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); 2103 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2102 LInstruction* DoArithmeticD(Token::Value op, 2104 LInstruction* DoArithmeticD(Token::Value op,
2103 HArithmeticBinaryOperation* instr); 2105 HArithmeticBinaryOperation* instr);
2104 LInstruction* DoArithmeticT(Token::Value op, 2106 LInstruction* DoArithmeticT(Token::Value op,
2105 HArithmeticBinaryOperation* instr); 2107 HArithmeticBinaryOperation* instr);
2106 2108
2109 void DecrementArgumentCount(int amount) {
2110 ASSERT(amount <= argument_count_);
2111 argument_count_ -= amount;
2112 }
2113
2107 LChunk* chunk_; 2114 LChunk* chunk_;
2108 HGraph* const graph_; 2115 HGraph* const graph_;
2109 Status status_; 2116 Status status_;
2110 HInstruction* current_instruction_; 2117 HInstruction* current_instruction_;
2111 HBasicBlock* current_block_; 2118 HBasicBlock* current_block_;
2112 HBasicBlock* next_block_; 2119 HBasicBlock* next_block_;
2113 int argument_count_; 2120 int argument_count_;
2114 LAllocator* allocator_; 2121 LAllocator* allocator_;
2115 int position_; 2122 int position_;
2116 LInstruction* instructions_pending_deoptimization_environment_; 2123 LInstruction* instructions_pending_deoptimization_environment_;
2117 int pending_deoptimization_ast_id_; 2124 int pending_deoptimization_ast_id_;
2118 2125
2119 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2126 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2120 }; 2127 };
2121 2128
2122 #undef DECLARE_HYDROGEN_ACCESSOR 2129 #undef DECLARE_HYDROGEN_ACCESSOR
2123 #undef DECLARE_INSTRUCTION 2130 #undef DECLARE_INSTRUCTION
2124 #undef DECLARE_CONCRETE_INSTRUCTION 2131 #undef DECLARE_CONCRETE_INSTRUCTION
2125 2132
2126 } } // namespace v8::internal 2133 } } // namespace v8::internal
2127 2134
2128 #endif // V8_IA32_LITHIUM_IA32_H_ 2135 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698