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

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

Issue 2573573004: [stubs] Enable graph verification for builtins. (Closed)
Patch Set: Created 4 years 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
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-utils.h" 5 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/code-stub-assembler.h" 7 #include "src/code-stub-assembler.h"
8 #include "src/dateparser-inl.h" 8 #include "src/dateparser-inl.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 assembler->Return(assembler->LoadObjectField( 946 assembler->Return(assembler->LoadObjectField(
947 receiver, JSDate::kValueOffset + field_index * kPointerSize)); 947 receiver, JSDate::kValueOffset + field_index * kPointerSize));
948 948
949 assembler->Bind(&stamp_mismatch); 949 assembler->Bind(&stamp_mismatch);
950 } 950 }
951 951
952 Node* field_index_smi = assembler->SmiConstant(Smi::FromInt(field_index)); 952 Node* field_index_smi = assembler->SmiConstant(Smi::FromInt(field_index));
953 Node* function = assembler->ExternalConstant( 953 Node* function = assembler->ExternalConstant(
954 ExternalReference::get_date_field_function(assembler->isolate())); 954 ExternalReference::get_date_field_function(assembler->isolate()));
955 Node* result = assembler->CallCFunction2( 955 Node* result = assembler->CallCFunction2(
956 MachineType::AnyTagged(), MachineType::Pointer(), 956 MachineType::AnyTagged(), MachineType::AnyTagged(),
957 MachineType::AnyTagged(), function, receiver, field_index_smi); 957 MachineType::AnyTagged(), function, receiver, field_index_smi);
958 assembler->Return(result); 958 assembler->Return(result);
959 } 959 }
960 960
961 // Raise a TypeError if the receiver is not a date. 961 // Raise a TypeError if the receiver is not a date.
962 assembler->Bind(&receiver_not_date); 962 assembler->Bind(&receiver_not_date);
963 { 963 {
964 Node* result = assembler->CallRuntime(Runtime::kThrowNotDateError, context); 964 Node* result = assembler->CallRuntime(Runtime::kThrowNotDateError, context);
965 assembler->Return(result); 965 assembler->Return(result);
966 } 966 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 1089
1090 // static 1090 // static
1091 void Builtins::Generate_DatePrototypeGetUTCSeconds( 1091 void Builtins::Generate_DatePrototypeGetUTCSeconds(
1092 compiler::CodeAssemblerState* state) { 1092 compiler::CodeAssemblerState* state) {
1093 CodeStubAssembler assembler(state); 1093 CodeStubAssembler assembler(state);
1094 Generate_DatePrototype_GetField(&assembler, JSDate::kSecondUTC); 1094 Generate_DatePrototype_GetField(&assembler, JSDate::kSecondUTC);
1095 } 1095 }
1096 1096
1097 } // namespace internal 1097 } // namespace internal
1098 } // namespace v8 1098 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698