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

Unified Diff: src/code-stub-assembler.h

Issue 2361363002: [stubs] Add TruncationMode argument to ToInteger (Closed)
Patch Set: Simplify Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-string.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 39c0fe690c8a9e27a031d5f831099189edb4c0d0..6558a91411bf4c2708390cfb056676daaea877b5 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -486,8 +486,14 @@ class CodeStubAssembler : public compiler::CodeAssembler {
// Convert any object to a Number.
compiler::Node* ToNumber(compiler::Node* context, compiler::Node* input);
+ enum ToIntegerTruncationMode {
+ kNoTruncation,
+ kTruncateMinusZero,
+ };
+
// Convert any object to an Integer.
- compiler::Node* ToInteger(compiler::Node* context, compiler::Node* input);
+ compiler::Node* ToInteger(compiler::Node* context, compiler::Node* input,
+ ToIntegerTruncationMode mode = kNoTruncation);
// Returns a node that contains a decoded (unsigned!) value of a bit
// field |T| in |word32|. Returns result as an uint32 node.
« 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