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

Side by Side Diff: src/builtins/builtins-date.cc

Issue 2407303002: [stubs] Renames WordIsSmi to TaggedIsSmi, introducing an appropriate bitcast of the parameter. (Closed)
Patch Set: Renamed TaggedValueIsSmi to TaggedIsSmi. 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-conversion.cc ('k') | src/builtins/builtins-generator.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 #include "src/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/dateparser-inl.h" 8 #include "src/dateparser-inl.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 void Builtins::Generate_DatePrototype_GetField(CodeStubAssembler* assembler, 912 void Builtins::Generate_DatePrototype_GetField(CodeStubAssembler* assembler,
913 int field_index) { 913 int field_index) {
914 typedef CodeStubAssembler::Label Label; 914 typedef CodeStubAssembler::Label Label;
915 typedef compiler::Node Node; 915 typedef compiler::Node Node;
916 916
917 Node* receiver = assembler->Parameter(0); 917 Node* receiver = assembler->Parameter(0);
918 Node* context = assembler->Parameter(3); 918 Node* context = assembler->Parameter(3);
919 919
920 Label receiver_not_date(assembler, Label::kDeferred); 920 Label receiver_not_date(assembler, Label::kDeferred);
921 921
922 assembler->GotoIf(assembler->WordIsSmi(receiver), &receiver_not_date); 922 assembler->GotoIf(assembler->TaggedIsSmi(receiver), &receiver_not_date);
923 Node* receiver_instance_type = assembler->LoadInstanceType(receiver); 923 Node* receiver_instance_type = assembler->LoadInstanceType(receiver);
924 assembler->GotoIf( 924 assembler->GotoIf(
925 assembler->Word32NotEqual(receiver_instance_type, 925 assembler->Word32NotEqual(receiver_instance_type,
926 assembler->Int32Constant(JS_DATE_TYPE)), 926 assembler->Int32Constant(JS_DATE_TYPE)),
927 &receiver_not_date); 927 &receiver_not_date);
928 928
929 // Load the specified date field, falling back to the runtime as necessary. 929 // Load the specified date field, falling back to the runtime as necessary.
930 if (field_index == JSDate::kDateValue) { 930 if (field_index == JSDate::kDateValue) {
931 assembler->Return( 931 assembler->Return(
932 assembler->LoadObjectField(receiver, JSDate::kValueOffset)); 932 assembler->LoadObjectField(receiver, JSDate::kValueOffset));
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 } 1056 }
1057 1057
1058 // static 1058 // static
1059 void Builtins::Generate_DatePrototypeGetUTCSeconds( 1059 void Builtins::Generate_DatePrototypeGetUTCSeconds(
1060 CodeStubAssembler* assembler) { 1060 CodeStubAssembler* assembler) {
1061 Generate_DatePrototype_GetField(assembler, JSDate::kSecondUTC); 1061 Generate_DatePrototype_GetField(assembler, JSDate::kSecondUTC);
1062 } 1062 }
1063 1063
1064 } // namespace internal 1064 } // namespace internal
1065 } // namespace v8 1065 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-conversion.cc ('k') | src/builtins/builtins-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698