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

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

Issue 2380543002: [stubs] Don't unconditionally canonicalize in ChangeFloat64ToTagged. (Closed)
Patch Set: REBASE 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 | « no previous file | 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"
11 #include "src/objects.h" 11 #include "src/objects.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 class CallInterfaceDescriptor; 16 class CallInterfaceDescriptor;
17 class StatsCounter; 17 class StatsCounter;
18 class StubCache; 18 class StubCache;
19 19
20 enum class CanonicalizationMode { kDontCanonicalize, kCanonicalize };
20 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; 21 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
21 22
22 enum class UnicodeEncoding { 23 enum class UnicodeEncoding {
23 // Different unicode encodings in a |word32|: 24 // Different unicode encodings in a |word32|:
24 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate 25 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate
25 UTF32, // full UTF32 code unit / Unicode codepoint 26 UTF32, // full UTF32 code unit / Unicode codepoint
26 }; 27 };
27 28
28 // Provides JavaScript-specific "macro-assembler" functionality on top of the 29 // Provides JavaScript-specific "macro-assembler" functionality on top of the
29 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, 30 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler,
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 compiler::Node* allocation_site); 421 compiler::Node* allocation_site);
421 422
422 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, 423 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context,
423 compiler::Node* value); 424 compiler::Node* value);
424 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, 425 compiler::Node* TruncateTaggedToWord32(compiler::Node* context,
425 compiler::Node* value); 426 compiler::Node* value);
426 // Truncate the floating point value of a HeapNumber to an Int32. 427 // Truncate the floating point value of a HeapNumber to an Int32.
427 compiler::Node* TruncateHeapNumberValueToWord32(compiler::Node* object); 428 compiler::Node* TruncateHeapNumberValueToWord32(compiler::Node* object);
428 429
429 // Conversions. 430 // Conversions.
430 compiler::Node* ChangeFloat64ToTagged(compiler::Node* value); 431 // Returns a tagged representation of the float64 {value}. Might optionally
432 // try to canonicalize to Smi representation if the {value} is in Smi range.
433 compiler::Node* ChangeFloat64ToTagged(
434 compiler::Node* value,
435 CanonicalizationMode mode = CanonicalizationMode::kDontCanonicalize);
431 compiler::Node* ChangeInt32ToTagged(compiler::Node* value); 436 compiler::Node* ChangeInt32ToTagged(compiler::Node* value);
432 compiler::Node* ChangeUint32ToTagged(compiler::Node* value); 437 compiler::Node* ChangeUint32ToTagged(compiler::Node* value);
433 438
434 // Type conversions. 439 // Type conversions.
435 // Throws a TypeError for {method_name} if {value} is not coercible to Object, 440 // Throws a TypeError for {method_name} if {value} is not coercible to Object,
436 // or returns the {value} converted to a String otherwise. 441 // or returns the {value} converted to a String otherwise.
437 compiler::Node* ToThisString(compiler::Node* context, compiler::Node* value, 442 compiler::Node* ToThisString(compiler::Node* context, compiler::Node* value,
438 char const* method_name); 443 char const* method_name);
439 // Throws a TypeError for {method_name} if {value} is neither of the given 444 // Throws a TypeError for {method_name} if {value} is neither of the given
440 // {primitive_type} nor a JSValue wrapping a value of {primitive_type}, or 445 // {primitive_type} nor a JSValue wrapping a value of {primitive_type}, or
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 Label* bailout); 840 Label* bailout);
836 841
837 static const int kElementLoopUnrollThreshold = 8; 842 static const int kElementLoopUnrollThreshold = 8;
838 }; 843 };
839 844
840 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 845 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
841 846
842 } // namespace internal 847 } // namespace internal
843 } // namespace v8 848 } // namespace v8
844 #endif // V8_CODE_STUB_ASSEMBLER_H_ 849 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698