| 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 Handle<Code> code = chunk->Codegen(); | 321 Handle<Code> code = chunk->Codegen(); |
| 322 if (FLAG_profile_hydrogen_code_stub_compilation) { | 322 if (FLAG_profile_hydrogen_code_stub_compilation) { |
| 323 OFStream os(stdout); | 323 OFStream os(stdout); |
| 324 os << "[Lazy compilation of " << stub << " took " | 324 os << "[Lazy compilation of " << stub << " took " |
| 325 << timer.Elapsed().InMillisecondsF() << " ms]" << std::endl; | 325 << timer.Elapsed().InMillisecondsF() << " ms]" << std::endl; |
| 326 } | 326 } |
| 327 return code; | 327 return code; |
| 328 } | 328 } |
| 329 | 329 |
| 330 | 330 |
| 331 template <> | |
| 332 HValue* CodeStubGraphBuilder<NumberToStringStub>::BuildCodeStub() { | |
| 333 info()->MarkAsSavesCallerDoubles(); | |
| 334 HValue* number = GetParameter(Descriptor::kArgument); | |
| 335 return BuildNumberToString(number, AstType::Number()); | |
| 336 } | |
| 337 | |
| 338 | |
| 339 Handle<Code> NumberToStringStub::GenerateCode() { | |
| 340 return DoGenerateCode(this); | |
| 341 } | |
| 342 | |
| 343 HValue* CodeStubGraphBuilderBase::BuildPushElement(HValue* object, HValue* argc, | 331 HValue* CodeStubGraphBuilderBase::BuildPushElement(HValue* object, HValue* argc, |
| 344 HValue* argument_elements, | 332 HValue* argument_elements, |
| 345 ElementsKind kind) { | 333 ElementsKind kind) { |
| 346 // Precheck whether all elements fit into the array. | 334 // Precheck whether all elements fit into the array. |
| 347 if (!IsFastObjectElementsKind(kind)) { | 335 if (!IsFastObjectElementsKind(kind)) { |
| 348 LoopBuilder builder(this, context(), LoopBuilder::kPostIncrement); | 336 LoopBuilder builder(this, context(), LoopBuilder::kPostIncrement); |
| 349 HValue* start = graph()->GetConstant0(); | 337 HValue* start = graph()->GetConstant0(); |
| 350 HValue* key = builder.BeginBody(start, argc, Token::LT); | 338 HValue* key = builder.BeginBody(start, argc, Token::LT); |
| 351 { | 339 { |
| 352 HInstruction* argument = | 340 HInstruction* argument = |
| (...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 return Pop(); | 1447 return Pop(); |
| 1460 } | 1448 } |
| 1461 | 1449 |
| 1462 | 1450 |
| 1463 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 1451 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
| 1464 return DoGenerateCode(this); | 1452 return DoGenerateCode(this); |
| 1465 } | 1453 } |
| 1466 | 1454 |
| 1467 } // namespace internal | 1455 } // namespace internal |
| 1468 } // namespace v8 | 1456 } // namespace v8 |
| OLD | NEW |