| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 SmartArrayPointer<HParameter*> parameters_; | 71 SmartArrayPointer<HParameter*> parameters_; |
| 72 CompilationInfoWithZone info_; | 72 CompilationInfoWithZone info_; |
| 73 HContext* context_; | 73 HContext* context_; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 | 76 |
| 77 bool CodeStubGraphBuilderBase::BuildGraph() { | 77 bool CodeStubGraphBuilderBase::BuildGraph() { |
| 78 if (FLAG_trace_hydrogen) { | 78 if (FLAG_trace_hydrogen) { |
| 79 const char* name = CodeStub::MajorName(stub()->MajorKey(), false); |
| 79 PrintF("-----------------------------------------------------------\n"); | 80 PrintF("-----------------------------------------------------------\n"); |
| 80 PrintF("Compiling stub using hydrogen\n"); | 81 PrintF("Compiling stub %s using hydrogen\n", name); |
| 81 HTracer::Instance()->TraceCompilation(&info_); | 82 HTracer::Instance()->TraceCompilation(&info_); |
| 82 } | 83 } |
| 83 HBasicBlock* next_block = graph()->CreateBasicBlock(); | 84 HBasicBlock* next_block = graph()->CreateBasicBlock(); |
| 84 next_block->SetInitialEnvironment(graph()->start_environment()); | 85 next_block->SetInitialEnvironment(graph()->start_environment()); |
| 85 HGoto* jump = new(zone()) HGoto(next_block); | 86 HGoto* jump = new(zone()) HGoto(next_block); |
| 86 graph()->entry_block()->Finish(jump); | 87 graph()->entry_block()->Finish(jump); |
| 87 set_current_block(next_block); | 88 set_current_block(next_block); |
| 88 | 89 |
| 89 int major_key = stub()->MajorKey(); | 90 int major_key = stub()->MajorKey(); |
| 90 CodeStubInterfaceDescriptor* descriptor = | 91 CodeStubInterfaceDescriptor* descriptor = |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 245 |
| 245 | 246 |
| 246 Handle<Code> TransitionElementsKindStub::GenerateCode() { | 247 Handle<Code> TransitionElementsKindStub::GenerateCode() { |
| 247 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); | 248 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); |
| 248 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 249 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 249 return chunk->Codegen(Code::COMPILED_STUB); | 250 return chunk->Codegen(Code::COMPILED_STUB); |
| 250 } | 251 } |
| 251 | 252 |
| 252 | 253 |
| 253 } } // namespace v8::internal | 254 } } // namespace v8::internal |
| OLD | NEW |