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

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

Issue 10701157: Rename LChunkBase to LChunk, LChunk to LPlatformChunk and remove some unneeded explicit constructor… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « no previous file | src/arm/lithium-arm.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 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 } 2217 }
2218 2218
2219 LOperand* object() { return inputs_[0]; } 2219 LOperand* object() { return inputs_[0]; }
2220 LOperand* index() { return inputs_[1]; } 2220 LOperand* index() { return inputs_[1]; }
2221 2221
2222 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") 2222 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index")
2223 }; 2223 };
2224 2224
2225 2225
2226 class LChunkBuilder; 2226 class LChunkBuilder;
2227 class LChunk: public LChunkBase { 2227 class LPlatformChunk: public LChunk {
2228 public: 2228 public:
2229 explicit LChunk(CompilationInfo* info, HGraph* graph) 2229 LPlatformChunk(CompilationInfo* info, HGraph* graph)
2230 : LChunkBase(info, graph) { } 2230 : LChunk(info, graph) { }
2231 2231
2232 int GetNextSpillIndex(bool is_double); 2232 int GetNextSpillIndex(bool is_double);
2233 LOperand* GetNextSpillSlot(bool is_double); 2233 LOperand* GetNextSpillSlot(bool is_double);
2234 }; 2234 };
2235 2235
2236 2236
2237 class LChunkBuilder BASE_EMBEDDED { 2237 class LChunkBuilder BASE_EMBEDDED {
2238 public: 2238 public:
2239 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2239 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2240 : chunk_(NULL), 2240 : chunk_(NULL),
2241 info_(info), 2241 info_(info),
2242 graph_(graph), 2242 graph_(graph),
2243 zone_(graph->zone()), 2243 zone_(graph->zone()),
2244 status_(UNUSED), 2244 status_(UNUSED),
2245 current_instruction_(NULL), 2245 current_instruction_(NULL),
2246 current_block_(NULL), 2246 current_block_(NULL),
2247 next_block_(NULL), 2247 next_block_(NULL),
2248 argument_count_(0), 2248 argument_count_(0),
2249 allocator_(allocator), 2249 allocator_(allocator),
2250 position_(RelocInfo::kNoPosition), 2250 position_(RelocInfo::kNoPosition),
2251 instruction_pending_deoptimization_environment_(NULL), 2251 instruction_pending_deoptimization_environment_(NULL),
2252 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } 2252 pending_deoptimization_ast_id_(AstNode::kNoNumber) { }
2253 2253
2254 // Build the sequence for the graph. 2254 // Build the sequence for the graph.
2255 LChunk* Build(); 2255 LPlatformChunk* Build();
2256 2256
2257 // Declare methods that deal with the individual node types. 2257 // Declare methods that deal with the individual node types.
2258 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2258 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2259 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2259 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2260 #undef DECLARE_DO 2260 #undef DECLARE_DO
2261 2261
2262 static bool HasMagicNumberForDivisor(int32_t divisor); 2262 static bool HasMagicNumberForDivisor(int32_t divisor);
2263 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); 2263 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val);
2264 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); 2264 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val);
2265 2265
2266 private: 2266 private:
2267 enum Status { 2267 enum Status {
2268 UNUSED, 2268 UNUSED,
2269 BUILDING, 2269 BUILDING,
2270 DONE, 2270 DONE,
2271 ABORTED 2271 ABORTED
2272 }; 2272 };
2273 2273
2274 LChunk* chunk() const { return chunk_; } 2274 LPlatformChunk* chunk() const { return chunk_; }
2275 CompilationInfo* info() const { return info_; } 2275 CompilationInfo* info() const { return info_; }
2276 HGraph* graph() const { return graph_; } 2276 HGraph* graph() const { return graph_; }
2277 Zone* zone() const { return zone_; } 2277 Zone* zone() const { return zone_; }
2278 2278
2279 bool is_unused() const { return status_ == UNUSED; } 2279 bool is_unused() const { return status_ == UNUSED; }
2280 bool is_building() const { return status_ == BUILDING; } 2280 bool is_building() const { return status_ == BUILDING; }
2281 bool is_done() const { return status_ == DONE; } 2281 bool is_done() const { return status_ == DONE; }
2282 bool is_aborted() const { return status_ == ABORTED; } 2282 bool is_aborted() const { return status_ == ABORTED; }
2283 2283
2284 void Abort(const char* format, ...); 2284 void Abort(const char* format, ...);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 2364
2365 void VisitInstruction(HInstruction* current); 2365 void VisitInstruction(HInstruction* current);
2366 2366
2367 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); 2367 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2368 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); 2368 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2369 LInstruction* DoArithmeticD(Token::Value op, 2369 LInstruction* DoArithmeticD(Token::Value op,
2370 HArithmeticBinaryOperation* instr); 2370 HArithmeticBinaryOperation* instr);
2371 LInstruction* DoArithmeticT(Token::Value op, 2371 LInstruction* DoArithmeticT(Token::Value op,
2372 HArithmeticBinaryOperation* instr); 2372 HArithmeticBinaryOperation* instr);
2373 2373
2374 LChunk* chunk_; 2374 LPlatformChunk* chunk_;
2375 CompilationInfo* info_; 2375 CompilationInfo* info_;
2376 HGraph* const graph_; 2376 HGraph* const graph_;
2377 Zone* zone_; 2377 Zone* zone_;
2378 Status status_; 2378 Status status_;
2379 HInstruction* current_instruction_; 2379 HInstruction* current_instruction_;
2380 HBasicBlock* current_block_; 2380 HBasicBlock* current_block_;
2381 HBasicBlock* next_block_; 2381 HBasicBlock* next_block_;
2382 int argument_count_; 2382 int argument_count_;
2383 LAllocator* allocator_; 2383 LAllocator* allocator_;
2384 int position_; 2384 int position_;
2385 LInstruction* instruction_pending_deoptimization_environment_; 2385 LInstruction* instruction_pending_deoptimization_environment_;
2386 int pending_deoptimization_ast_id_; 2386 int pending_deoptimization_ast_id_;
2387 2387
2388 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2388 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2389 }; 2389 };
2390 2390
2391 #undef DECLARE_HYDROGEN_ACCESSOR 2391 #undef DECLARE_HYDROGEN_ACCESSOR
2392 #undef DECLARE_CONCRETE_INSTRUCTION 2392 #undef DECLARE_CONCRETE_INSTRUCTION
2393 2393
2394 } } // namespace v8::internal 2394 } } // namespace v8::internal
2395 2395
2396 #endif // V8_ARM_LITHIUM_ARM_H_ 2396 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698