Chromium Code Reviews| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 | 235 |
| 236 private: | 236 private: |
| 237 void AddBlock(HBasicBlock* block); | 237 void AddBlock(HBasicBlock* block); |
| 238 | 238 |
| 239 ZoneList<HBasicBlock*> back_edges_; | 239 ZoneList<HBasicBlock*> back_edges_; |
| 240 HBasicBlock* loop_header_; | 240 HBasicBlock* loop_header_; |
| 241 ZoneList<HBasicBlock*> blocks_; | 241 ZoneList<HBasicBlock*> blocks_; |
| 242 HStackCheck* stack_check_; | 242 HStackCheck* stack_check_; |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 | |
| 246 class MarkedTransitionElementsGroup; | |
|
danno
2012/11/28 14:42:10
Marked has a meaning in the GC space, "bookmarked"
| |
| 245 class BoundsCheckTable; | 247 class BoundsCheckTable; |
| 246 class HGraph: public ZoneObject { | 248 class HGraph: public ZoneObject { |
| 247 public: | 249 public: |
| 248 explicit HGraph(CompilationInfo* info); | 250 explicit HGraph(CompilationInfo* info); |
| 249 | 251 |
| 250 Isolate* isolate() { return isolate_; } | 252 Isolate* isolate() { return isolate_; } |
| 251 Zone* zone() const { return zone_; } | 253 Zone* zone() const { return zone_; } |
| 252 CompilationInfo* info() const { return info_; } | 254 CompilationInfo* info() const { return info_; } |
| 253 | 255 |
| 254 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } | 256 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 363 return is_recursive_; | 365 return is_recursive_; |
| 364 } | 366 } |
| 365 | 367 |
| 366 void RecordUint32Instruction(HInstruction* instr) { | 368 void RecordUint32Instruction(HInstruction* instr) { |
| 367 if (uint32_instructions_ == NULL) { | 369 if (uint32_instructions_ == NULL) { |
| 368 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); | 370 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); |
| 369 } | 371 } |
| 370 uint32_instructions_->Add(instr, zone()); | 372 uint32_instructions_->Add(instr, zone()); |
| 371 } | 373 } |
| 372 | 374 |
| 375 void AddMarkedTransitionElementsGroup( | |
| 376 MarkedTransitionElementsGroup* group) { | |
| 377 marked_transitions_.Add(group, zone()); | |
| 378 } | |
| 379 | |
| 373 private: | 380 private: |
| 374 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, | 381 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, |
| 375 Handle<Object> value); | 382 Handle<Object> value); |
| 376 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer, | 383 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer, |
| 377 int32_t integer_value); | 384 int32_t integer_value); |
| 378 | 385 |
| 379 void MarkAsDeoptimizingRecursively(HBasicBlock* block); | 386 void MarkAsDeoptimizingRecursively(HBasicBlock* block); |
| 387 void InsertElementsTransitions(); | |
| 380 void InsertTypeConversions(HInstruction* instr); | 388 void InsertTypeConversions(HInstruction* instr); |
| 381 void PropagateMinusZeroChecks(HValue* value, BitVector* visited); | 389 void PropagateMinusZeroChecks(HValue* value, BitVector* visited); |
| 382 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); | 390 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); |
| 383 void InsertRepresentationChangeForUse(HValue* value, | 391 void InsertRepresentationChangeForUse(HValue* value, |
| 384 HValue* use_value, | 392 HValue* use_value, |
| 385 int use_index, | 393 int use_index, |
| 386 Representation to); | 394 Representation to); |
| 387 void InsertRepresentationChangesForValue(HValue* value); | 395 void InsertRepresentationChangesForValue(HValue* value); |
| 388 void InferTypes(ZoneList<HValue*>* worklist); | 396 void InferTypes(ZoneList<HValue*>* worklist); |
| 389 void InitializeInferredTypes(int from_inclusive, int to_inclusive); | 397 void InitializeInferredTypes(int from_inclusive, int to_inclusive); |
| 390 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor); | 398 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor); |
| 391 void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table); | 399 void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table); |
| 392 | 400 |
| 393 Isolate* isolate_; | 401 Isolate* isolate_; |
| 394 int next_block_id_; | 402 int next_block_id_; |
| 395 HBasicBlock* entry_block_; | 403 HBasicBlock* entry_block_; |
| 396 HEnvironment* start_environment_; | 404 HEnvironment* start_environment_; |
| 397 ZoneList<HBasicBlock*> blocks_; | 405 ZoneList<HBasicBlock*> blocks_; |
| 398 ZoneList<HValue*> values_; | 406 ZoneList<HValue*> values_; |
| 399 ZoneList<HPhi*>* phi_list_; | 407 ZoneList<HPhi*>* phi_list_; |
| 400 ZoneList<HInstruction*>* uint32_instructions_; | 408 ZoneList<HInstruction*>* uint32_instructions_; |
| 409 ZoneList<MarkedTransitionElementsGroup*> marked_transitions_; | |
| 401 SetOncePointer<HConstant> undefined_constant_; | 410 SetOncePointer<HConstant> undefined_constant_; |
| 402 SetOncePointer<HConstant> constant_1_; | 411 SetOncePointer<HConstant> constant_1_; |
| 403 SetOncePointer<HConstant> constant_minus1_; | 412 SetOncePointer<HConstant> constant_minus1_; |
| 404 SetOncePointer<HConstant> constant_true_; | 413 SetOncePointer<HConstant> constant_true_; |
| 405 SetOncePointer<HConstant> constant_false_; | 414 SetOncePointer<HConstant> constant_false_; |
| 406 SetOncePointer<HConstant> constant_hole_; | 415 SetOncePointer<HConstant> constant_hole_; |
| 407 SetOncePointer<HArgumentsObject> arguments_object_; | 416 SetOncePointer<HArgumentsObject> arguments_object_; |
| 408 | 417 |
| 409 SetOncePointer<HBasicBlock> osr_loop_entry_; | 418 SetOncePointer<HBasicBlock> osr_loop_entry_; |
| 410 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; | 419 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1137 HInstruction* BuildBinaryOperation(BinaryOperation* expr, | 1146 HInstruction* BuildBinaryOperation(BinaryOperation* expr, |
| 1138 HValue* left, | 1147 HValue* left, |
| 1139 HValue* right); | 1148 HValue* right); |
| 1140 HInstruction* BuildIncrement(bool returns_original_input, | 1149 HInstruction* BuildIncrement(bool returns_original_input, |
| 1141 CountOperation* expr); | 1150 CountOperation* expr); |
| 1142 HInstruction* BuildFastElementAccess(HValue* elements, | 1151 HInstruction* BuildFastElementAccess(HValue* elements, |
| 1143 HValue* checked_key, | 1152 HValue* checked_key, |
| 1144 HValue* val, | 1153 HValue* val, |
| 1145 HValue* dependency, | 1154 HValue* dependency, |
| 1146 ElementsKind elements_kind, | 1155 ElementsKind elements_kind, |
| 1147 bool is_store); | 1156 bool is_store, |
| 1157 bool defer_initialization); | |
| 1148 | 1158 |
| 1149 HInstruction* TryBuildConsolidatedElementLoad(HValue* object, | 1159 HInstruction* TryBuildConsolidatedElementLoad(HValue* object, |
| 1150 HValue* key, | 1160 HValue* key, |
| 1151 HValue* val, | 1161 HValue* val, |
| 1152 SmallMapList* maps); | 1162 SmallMapList* maps); |
| 1153 | 1163 |
| 1154 HInstruction* BuildUncheckedMonomorphicElementAccess(HValue* object, | 1164 HInstruction* BuildUncheckedMonomorphicElementAccess(HValue* object, |
| 1155 HValue* key, | 1165 HValue* key, |
| 1156 HValue* val, | 1166 HValue* val, |
| 1157 HCheckMaps* mapcheck, | 1167 HCheckMaps* mapcheck, |
| 1158 Handle<Map> map, | 1168 Handle<Map> map, |
| 1159 bool is_store); | 1169 bool is_store, |
| 1170 bool defer_initialization); | |
| 1160 | 1171 |
| 1161 HInstruction* BuildMonomorphicElementAccess(HValue* object, | 1172 HInstruction* BuildMonomorphicElementAccess(HValue* object, |
| 1162 HValue* key, | 1173 HValue* key, |
| 1163 HValue* val, | 1174 HValue* val, |
| 1164 HValue* dependency, | 1175 HValue* dependency, |
| 1165 Handle<Map> map, | 1176 Handle<Map> map, |
| 1166 bool is_store); | 1177 bool is_store, |
| 1178 HCheckMaps** checkmap_instr = NULL); | |
| 1167 | 1179 |
| 1168 HValue* HandlePolymorphicElementAccess(HValue* object, | 1180 HValue* HandlePolymorphicElementAccess(HValue* object, |
| 1169 HValue* key, | 1181 HValue* key, |
| 1170 HValue* val, | 1182 HValue* val, |
| 1171 Expression* prop, | 1183 Expression* prop, |
| 1172 BailoutId ast_id, | 1184 BailoutId ast_id, |
| 1173 int position, | 1185 int position, |
| 1174 bool is_store, | 1186 bool is_store, |
| 1175 bool* has_side_effects); | 1187 bool* has_side_effects); |
| 1176 | 1188 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1516 const char* filename_; | 1528 const char* filename_; |
| 1517 HeapStringAllocator string_allocator_; | 1529 HeapStringAllocator string_allocator_; |
| 1518 StringStream trace_; | 1530 StringStream trace_; |
| 1519 int indent_; | 1531 int indent_; |
| 1520 }; | 1532 }; |
| 1521 | 1533 |
| 1522 | 1534 |
| 1523 } } // namespace v8::internal | 1535 } } // namespace v8::internal |
| 1524 | 1536 |
| 1525 #endif // V8_HYDROGEN_H_ | 1537 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |