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

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

Issue 2949813002: [turbofan] Introduce new JSConstructWithArrayLike operator. (Closed)
Patch Set: Address feedback. Created 3 years, 6 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/code-stub-assembler.h ('k') | src/compiler/js-call-reducer.h » ('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 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 3186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 3197
3198 Node* CodeStubAssembler::IsCallable(Node* object) { 3198 Node* CodeStubAssembler::IsCallable(Node* object) {
3199 return IsCallableMap(LoadMap(object)); 3199 return IsCallableMap(LoadMap(object));
3200 } 3200 }
3201 3201
3202 Node* CodeStubAssembler::IsConstructorMap(Node* map) { 3202 Node* CodeStubAssembler::IsConstructorMap(Node* map) {
3203 CSA_ASSERT(this, IsMap(map)); 3203 CSA_ASSERT(this, IsMap(map));
3204 return IsSetWord32(LoadMapBitField(map), 1 << Map::kIsConstructor); 3204 return IsSetWord32(LoadMapBitField(map), 1 << Map::kIsConstructor);
3205 } 3205 }
3206 3206
3207 Node* CodeStubAssembler::IsConstructor(Node* object) {
3208 return IsConstructorMap(LoadMap(object));
3209 }
3210
3207 Node* CodeStubAssembler::IsSpecialReceiverInstanceType(Node* instance_type) { 3211 Node* CodeStubAssembler::IsSpecialReceiverInstanceType(Node* instance_type) {
3208 STATIC_ASSERT(JS_GLOBAL_OBJECT_TYPE <= LAST_SPECIAL_RECEIVER_TYPE); 3212 STATIC_ASSERT(JS_GLOBAL_OBJECT_TYPE <= LAST_SPECIAL_RECEIVER_TYPE);
3209 return Int32LessThanOrEqual(instance_type, 3213 return Int32LessThanOrEqual(instance_type,
3210 Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)); 3214 Int32Constant(LAST_SPECIAL_RECEIVER_TYPE));
3211 } 3215 }
3212 3216
3213 Node* CodeStubAssembler::IsStringInstanceType(Node* instance_type) { 3217 Node* CodeStubAssembler::IsStringInstanceType(Node* instance_type) {
3214 STATIC_ASSERT(INTERNALIZED_STRING_TYPE == FIRST_TYPE); 3218 STATIC_ASSERT(INTERNALIZED_STRING_TYPE == FIRST_TYPE);
3215 return Int32LessThan(instance_type, Int32Constant(FIRST_NONSTRING_TYPE)); 3219 return Int32LessThan(instance_type, Int32Constant(FIRST_NONSTRING_TYPE));
3216 } 3220 }
(...skipping 6143 matching lines...) Expand 10 before | Expand all | Expand 10 after
9360 formatted.c_str(), TENURED); 9364 formatted.c_str(), TENURED);
9361 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), 9365 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(),
9362 HeapConstant(string)); 9366 HeapConstant(string));
9363 } 9367 }
9364 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); 9368 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value);
9365 #endif 9369 #endif
9366 } 9370 }
9367 9371
9368 } // namespace internal 9372 } // namespace internal
9369 } // namespace v8 9373 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/compiler/js-call-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698