OLD | NEW |
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/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 timer.Start(); | 270 timer.Start(); |
271 } | 271 } |
272 CodeStubGraphBuilder<Stub> builder(isolate, stub); | 272 CodeStubGraphBuilder<Stub> builder(isolate, stub); |
273 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 273 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
274 // TODO(yangguo) remove this once the code serializer handles code stubs. | 274 // TODO(yangguo) remove this once the code serializer handles code stubs. |
275 if (FLAG_serialize_toplevel) chunk->info()->PrepareForSerializing(); | 275 if (FLAG_serialize_toplevel) chunk->info()->PrepareForSerializing(); |
276 Handle<Code> code = chunk->Codegen(); | 276 Handle<Code> code = chunk->Codegen(); |
277 if (FLAG_profile_hydrogen_code_stub_compilation) { | 277 if (FLAG_profile_hydrogen_code_stub_compilation) { |
278 OFStream os(stdout); | 278 OFStream os(stdout); |
279 os << "[Lazy compilation of " << stub << " took " | 279 os << "[Lazy compilation of " << stub << " took " |
280 << timer.Elapsed().InMillisecondsF() << " ms]" << endl; | 280 << timer.Elapsed().InMillisecondsF() << " ms]" << std::endl; |
281 } | 281 } |
282 return code; | 282 return code; |
283 } | 283 } |
284 | 284 |
285 | 285 |
286 template <> | 286 template <> |
287 HValue* CodeStubGraphBuilder<ToNumberStub>::BuildCodeStub() { | 287 HValue* CodeStubGraphBuilder<ToNumberStub>::BuildCodeStub() { |
288 HValue* value = GetParameter(0); | 288 HValue* value = GetParameter(0); |
289 | 289 |
290 // Check if the parameter is already a SMI or heap number. | 290 // Check if the parameter is already a SMI or heap number. |
(...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 | 2002 |
2003 // Probe the stub cache. | 2003 // Probe the stub cache. |
2004 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 2004 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
2005 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 2005 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
2006 Add<HTailCallThroughMegamorphicCache>(receiver, name, flags); | 2006 Add<HTailCallThroughMegamorphicCache>(receiver, name, flags); |
2007 | 2007 |
2008 // We never continue. | 2008 // We never continue. |
2009 return graph()->GetConstant0(); | 2009 return graph()->GetConstant0(); |
2010 } | 2010 } |
2011 } } // namespace v8::internal | 2011 } } // namespace v8::internal |
OLD | NEW |