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

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

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