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

Side by Side Diff: src/code-stub-assembler.h

Issue 2364473006: [stubs] Extract ToInteger to CodeStubAssembler (Closed)
Patch Set: 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/builtins/builtins-string.cc ('k') | src/code-stub-assembler.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 compiler::Node* StringToNumber(compiler::Node* context, 479 compiler::Node* StringToNumber(compiler::Node* context,
480 compiler::Node* input); 480 compiler::Node* input);
481 // Convert an object to a name. 481 // Convert an object to a name.
482 compiler::Node* ToName(compiler::Node* context, compiler::Node* input); 482 compiler::Node* ToName(compiler::Node* context, compiler::Node* input);
483 // Convert a Non-Number object to a Number. 483 // Convert a Non-Number object to a Number.
484 compiler::Node* NonNumberToNumber(compiler::Node* context, 484 compiler::Node* NonNumberToNumber(compiler::Node* context,
485 compiler::Node* input); 485 compiler::Node* input);
486 // Convert any object to a Number. 486 // Convert any object to a Number.
487 compiler::Node* ToNumber(compiler::Node* context, compiler::Node* input); 487 compiler::Node* ToNumber(compiler::Node* context, compiler::Node* input);
488 488
489 // Convert any object to an Integer.
490 compiler::Node* ToInteger(compiler::Node* context, compiler::Node* input);
491
489 // Returns a node that contains a decoded (unsigned!) value of a bit 492 // Returns a node that contains a decoded (unsigned!) value of a bit
490 // field |T| in |word32|. Returns result as an uint32 node. 493 // field |T| in |word32|. Returns result as an uint32 node.
491 template <typename T> 494 template <typename T>
492 compiler::Node* BitFieldDecode(compiler::Node* word32) { 495 compiler::Node* BitFieldDecode(compiler::Node* word32) {
493 return BitFieldDecode(word32, T::kShift, T::kMask); 496 return BitFieldDecode(word32, T::kShift, T::kMask);
494 } 497 }
495 498
496 // Returns a node that contains a decoded (unsigned!) value of a bit 499 // Returns a node that contains a decoded (unsigned!) value of a bit
497 // field |T| in |word32|. Returns result as a word-size node. 500 // field |T| in |word32|. Returns result as a word-size node.
498 template <typename T> 501 template <typename T>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 Label* bailout); 830 Label* bailout);
828 831
829 static const int kElementLoopUnrollThreshold = 8; 832 static const int kElementLoopUnrollThreshold = 8;
830 }; 833 };
831 834
832 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 835 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
833 836
834 } // namespace internal 837 } // namespace internal
835 } // namespace v8 838 } // namespace v8
836 #endif // V8_CODE_STUB_ASSEMBLER_H_ 839 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-string.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698