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

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

Issue 2397223002: [stubs] Port NumberToString stub to TF (Closed)
Patch Set: Merge with ToT Created 4 years, 2 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
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/schedule.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/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
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
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
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/schedule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698