OLD | NEW |
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 8325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8336 Node* CodeStubAssembler::ArraySpeciesCreate(Node* context, Node* originalArray, | 8336 Node* CodeStubAssembler::ArraySpeciesCreate(Node* context, Node* originalArray, |
8337 Node* len) { | 8337 Node* len) { |
8338 // TODO(mvstanton): Install a fast path as well, which avoids the runtime | 8338 // TODO(mvstanton): Install a fast path as well, which avoids the runtime |
8339 // call. | 8339 // call. |
8340 Node* constructor = | 8340 Node* constructor = |
8341 CallRuntime(Runtime::kArraySpeciesConstructor, context, originalArray); | 8341 CallRuntime(Runtime::kArraySpeciesConstructor, context, originalArray); |
8342 return ConstructJS(CodeFactory::Construct(isolate()), context, constructor, | 8342 return ConstructJS(CodeFactory::Construct(isolate()), context, constructor, |
8343 len); | 8343 len); |
8344 } | 8344 } |
8345 | 8345 |
| 8346 Node* CodeStubAssembler::TypedArraySpeciesCreateByLength(Node* context, |
| 8347 Node* originalArray, |
| 8348 Node* len) { |
| 8349 // TODO(tebbi): Install a fast path as well, which avoids the runtime |
| 8350 // call. |
| 8351 return CallRuntime(Runtime::kTypedArraySpeciesCreateByLength, context, |
| 8352 UndefinedConstant(), originalArray, len); |
| 8353 } |
| 8354 |
8346 Node* CodeStubAssembler::IsDetachedBuffer(Node* buffer) { | 8355 Node* CodeStubAssembler::IsDetachedBuffer(Node* buffer) { |
8347 CSA_ASSERT(this, HasInstanceType(buffer, JS_ARRAY_BUFFER_TYPE)); | 8356 CSA_ASSERT(this, HasInstanceType(buffer, JS_ARRAY_BUFFER_TYPE)); |
8348 | 8357 |
8349 Node* buffer_bit_field = LoadObjectField( | 8358 Node* buffer_bit_field = LoadObjectField( |
8350 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); | 8359 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); |
8351 return IsSetWord32<JSArrayBuffer::WasNeutered>(buffer_bit_field); | 8360 return IsSetWord32<JSArrayBuffer::WasNeutered>(buffer_bit_field); |
8352 } | 8361 } |
8353 | 8362 |
8354 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc, | 8363 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc, |
8355 Node* fp, | 8364 Node* fp, |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8540 formatted.c_str(), TENURED); | 8549 formatted.c_str(), TENURED); |
8541 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), | 8550 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), |
8542 HeapConstant(string)); | 8551 HeapConstant(string)); |
8543 } | 8552 } |
8544 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); | 8553 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); |
8545 #endif | 8554 #endif |
8546 } | 8555 } |
8547 | 8556 |
8548 } // namespace internal | 8557 } // namespace internal |
8549 } // namespace v8 | 8558 } // namespace v8 |
OLD | NEW |