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

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

Issue 2372113004: [turbofan] JSGenericLowering mostly uses builtins instead of code stubs now (Closed)
Patch Set: Ross' comments 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-number.cc ('k') | src/builtins/builtins-string.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/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/property-descriptor.h" 9 #include "src/property-descriptor.h"
10 10
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 HandleScope scope(isolate); 899 HandleScope scope(isolate);
900 Handle<Object> object = args.atOrUndefined(isolate, 1); 900 Handle<Object> object = args.atOrUndefined(isolate, 1);
901 if (object->IsJSReceiver()) { 901 if (object->IsJSReceiver()) {
902 MAYBE_RETURN(JSReceiver::SetIntegrityLevel(Handle<JSReceiver>::cast(object), 902 MAYBE_RETURN(JSReceiver::SetIntegrityLevel(Handle<JSReceiver>::cast(object),
903 SEALED, Object::THROW_ON_ERROR), 903 SEALED, Object::THROW_ON_ERROR),
904 isolate->heap()->exception()); 904 isolate->heap()->exception());
905 } 905 }
906 return *object; 906 return *object;
907 } 907 }
908 908
909 void Builtins::Generate_HasProperty(CodeStubAssembler* assembler) {
910 typedef HasPropertyDescriptor Descriptor;
911 typedef compiler::Node Node;
912
913 Node* key = assembler->Parameter(Descriptor::kKey);
914 Node* object = assembler->Parameter(Descriptor::kObject);
915 Node* context = assembler->Parameter(Descriptor::kContext);
916
917 assembler->Return(
918 assembler->HasProperty(object, key, context, Runtime::kHasProperty));
919 }
920
921 void Builtins::Generate_ForInFilter(CodeStubAssembler* assembler) {
922 typedef compiler::Node Node;
923 typedef ForInFilterDescriptor Descriptor;
924
925 Node* key = assembler->Parameter(Descriptor::kKey);
926 Node* object = assembler->Parameter(Descriptor::kObject);
927 Node* context = assembler->Parameter(Descriptor::kContext);
928
929 assembler->Return(assembler->ForInFilter(key, object, context));
930 }
931
932 void Builtins::Generate_InstanceOf(CodeStubAssembler* assembler) {
933 typedef compiler::Node Node;
934 typedef CompareDescriptor Descriptor;
935 Node* object = assembler->Parameter(Descriptor::kLeft);
936 Node* callable = assembler->Parameter(Descriptor::kRight);
937 Node* context = assembler->Parameter(Descriptor::kContext);
938
939 assembler->Return(assembler->InstanceOf(object, callable, context));
940 }
941
909 } // namespace internal 942 } // namespace internal
910 } // namespace v8 943 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-number.cc ('k') | src/builtins/builtins-string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698