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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 334763003: Start using OStreams. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Reformatted. Feedback addressed. Created 6 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 | « src/code-stubs.cc ('k') | src/codegen.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/field-index.h" 8 #include "src/field-index.h"
9 #include "src/hydrogen.h" 9 #include "src/hydrogen.h"
10 #include "src/lithium.h" 10 #include "src/lithium.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 return stub->GenerateLightweightMissCode(); 263 return stub->GenerateLightweightMissCode();
264 } 264 }
265 base::ElapsedTimer timer; 265 base::ElapsedTimer timer;
266 if (FLAG_profile_hydrogen_code_stub_compilation) { 266 if (FLAG_profile_hydrogen_code_stub_compilation) {
267 timer.Start(); 267 timer.Start();
268 } 268 }
269 CodeStubGraphBuilder<Stub> builder(isolate, stub); 269 CodeStubGraphBuilder<Stub> builder(isolate, stub);
270 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); 270 LChunk* chunk = OptimizeGraph(builder.CreateGraph());
271 Handle<Code> code = chunk->Codegen(); 271 Handle<Code> code = chunk->Codegen();
272 if (FLAG_profile_hydrogen_code_stub_compilation) { 272 if (FLAG_profile_hydrogen_code_stub_compilation) {
273 double ms = timer.Elapsed().InMillisecondsF(); 273 OFStream os(stdout);
274 PrintF("[Lazy compilation of %s took %0.3f ms]\n", 274 os << "[Lazy compilation of " << stub << " took "
275 stub->GetName().get(), ms); 275 << timer.Elapsed().InMillisecondsF() << " ms]" << endl;
276 } 276 }
277 return code; 277 return code;
278 } 278 }
279 279
280 280
281 template <> 281 template <>
282 HValue* CodeStubGraphBuilder<ToNumberStub>::BuildCodeStub() { 282 HValue* CodeStubGraphBuilder<ToNumberStub>::BuildCodeStub() {
283 HValue* value = GetParameter(0); 283 HValue* value = GetParameter(0);
284 284
285 // Check if the parameter is already a SMI or heap number. 285 // Check if the parameter is already a SMI or heap number.
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 return Pop(); 1704 return Pop();
1705 } 1705 }
1706 1706
1707 1707
1708 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { 1708 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() {
1709 return DoGenerateCode(this); 1709 return DoGenerateCode(this);
1710 } 1710 }
1711 1711
1712 1712
1713 } } // namespace v8::internal 1713 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698