| OLD | NEW |
| 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 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2298 | 2298 |
| 2299 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") | 2299 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") |
| 2300 }; | 2300 }; |
| 2301 | 2301 |
| 2302 | 2302 |
| 2303 class LChunkBuilder; | 2303 class LChunkBuilder; |
| 2304 class LChunk: public ZoneObject { | 2304 class LChunk: public ZoneObject { |
| 2305 public: | 2305 public: |
| 2306 LChunk(CompilationInfo* info, HGraph* graph) | 2306 LChunk(CompilationInfo* info, HGraph* graph) |
| 2307 : spill_slot_count_(0), | 2307 : spill_slot_count_(0), |
| 2308 num_double_slots_(0), |
| 2308 info_(info), | 2309 info_(info), |
| 2309 graph_(graph), | 2310 graph_(graph), |
| 2310 instructions_(32), | 2311 instructions_(32), |
| 2311 pointer_maps_(8), | 2312 pointer_maps_(8), |
| 2312 inlined_closures_(1) { } | 2313 inlined_closures_(1) { } |
| 2313 | 2314 |
| 2314 void AddInstruction(LInstruction* instruction, HBasicBlock* block); | 2315 void AddInstruction(LInstruction* instruction, HBasicBlock* block); |
| 2315 LConstantOperand* DefineConstantOperand(HConstant* constant); | 2316 LConstantOperand* DefineConstantOperand(HConstant* constant); |
| 2316 Handle<Object> LookupLiteral(LConstantOperand* operand) const; | 2317 Handle<Object> LookupLiteral(LConstantOperand* operand) const; |
| 2317 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; | 2318 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; |
| 2318 | 2319 |
| 2319 int GetNextSpillIndex(bool is_double); | 2320 int GetNextSpillIndex(bool is_double); |
| 2320 LOperand* GetNextSpillSlot(bool is_double); | 2321 LOperand* GetNextSpillSlot(bool is_double); |
| 2321 | 2322 |
| 2322 int ParameterAt(int index); | 2323 int ParameterAt(int index); |
| 2323 int GetParameterStackSlot(int index) const; | 2324 int GetParameterStackSlot(int index) const; |
| 2324 int spill_slot_count() const { return spill_slot_count_; } | 2325 int spill_slot_count() const { return spill_slot_count_; } |
| 2326 int num_double_slots() const { return num_double_slots_; } |
| 2325 CompilationInfo* info() const { return info_; } | 2327 CompilationInfo* info() const { return info_; } |
| 2326 HGraph* graph() const { return graph_; } | 2328 HGraph* graph() const { return graph_; } |
| 2327 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } | 2329 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } |
| 2328 void AddGapMove(int index, LOperand* from, LOperand* to); | 2330 void AddGapMove(int index, LOperand* from, LOperand* to); |
| 2329 LGap* GetGapAt(int index) const; | 2331 LGap* GetGapAt(int index) const; |
| 2330 bool IsGapAt(int index) const; | 2332 bool IsGapAt(int index) const; |
| 2331 int NearestGapPos(int index) const; | 2333 int NearestGapPos(int index) const; |
| 2332 void MarkEmptyBlocks(); | 2334 void MarkEmptyBlocks(); |
| 2333 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } | 2335 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } |
| 2334 LLabel* GetLabel(int block_id) const { | 2336 LLabel* GetLabel(int block_id) const { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2352 const ZoneList<Handle<JSFunction> >* inlined_closures() const { | 2354 const ZoneList<Handle<JSFunction> >* inlined_closures() const { |
| 2353 return &inlined_closures_; | 2355 return &inlined_closures_; |
| 2354 } | 2356 } |
| 2355 | 2357 |
| 2356 void AddInlinedClosure(Handle<JSFunction> closure) { | 2358 void AddInlinedClosure(Handle<JSFunction> closure) { |
| 2357 inlined_closures_.Add(closure); | 2359 inlined_closures_.Add(closure); |
| 2358 } | 2360 } |
| 2359 | 2361 |
| 2360 private: | 2362 private: |
| 2361 int spill_slot_count_; | 2363 int spill_slot_count_; |
| 2364 int num_double_slots_; |
| 2362 CompilationInfo* info_; | 2365 CompilationInfo* info_; |
| 2363 HGraph* const graph_; | 2366 HGraph* const graph_; |
| 2364 ZoneList<LInstruction*> instructions_; | 2367 ZoneList<LInstruction*> instructions_; |
| 2365 ZoneList<LPointerMap*> pointer_maps_; | 2368 ZoneList<LPointerMap*> pointer_maps_; |
| 2366 ZoneList<Handle<JSFunction> > inlined_closures_; | 2369 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 2367 }; | 2370 }; |
| 2368 | 2371 |
| 2369 | 2372 |
| 2370 class LChunkBuilder BASE_EMBEDDED { | 2373 class LChunkBuilder BASE_EMBEDDED { |
| 2371 public: | 2374 public: |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2520 | 2523 |
| 2521 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2524 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2522 }; | 2525 }; |
| 2523 | 2526 |
| 2524 #undef DECLARE_HYDROGEN_ACCESSOR | 2527 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2525 #undef DECLARE_CONCRETE_INSTRUCTION | 2528 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2526 | 2529 |
| 2527 } } // namespace v8::internal | 2530 } } // namespace v8::internal |
| 2528 | 2531 |
| 2529 #endif // V8_IA32_LITHIUM_IA32_H_ | 2532 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |