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 8951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8962 Heap::kEmptyFixedArrayRootIndex); | 8962 Heap::kEmptyFixedArrayRootIndex); |
8963 StoreObjectFieldNoWriteBarrier(iterator, | 8963 StoreObjectFieldNoWriteBarrier(iterator, |
8964 JSArrayIterator::kIteratedObjectOffset, array); | 8964 JSArrayIterator::kIteratedObjectOffset, array); |
8965 StoreObjectFieldNoWriteBarrier(iterator, JSArrayIterator::kNextIndexOffset, | 8965 StoreObjectFieldNoWriteBarrier(iterator, JSArrayIterator::kNextIndexOffset, |
8966 SmiConstant(Smi::FromInt(0))); | 8966 SmiConstant(Smi::FromInt(0))); |
8967 StoreObjectFieldNoWriteBarrier( | 8967 StoreObjectFieldNoWriteBarrier( |
8968 iterator, JSArrayIterator::kIteratedObjectMapOffset, array_map); | 8968 iterator, JSArrayIterator::kIteratedObjectMapOffset, array_map); |
8969 return iterator; | 8969 return iterator; |
8970 } | 8970 } |
8971 | 8971 |
| 8972 Node* CodeStubAssembler::TypedArraySpeciesCreateByLength(Node* context, |
| 8973 Node* originalArray, |
| 8974 Node* len) { |
| 8975 // TODO(tebbi): Install a fast path as well, which avoids the runtime |
| 8976 // call. |
| 8977 return CallRuntime(Runtime::kTypedArraySpeciesCreateByLength, context, |
| 8978 UndefinedConstant(), originalArray, len); |
| 8979 } |
| 8980 |
8972 Node* CodeStubAssembler::IsDetachedBuffer(Node* buffer) { | 8981 Node* CodeStubAssembler::IsDetachedBuffer(Node* buffer) { |
8973 CSA_ASSERT(this, HasInstanceType(buffer, JS_ARRAY_BUFFER_TYPE)); | 8982 CSA_ASSERT(this, HasInstanceType(buffer, JS_ARRAY_BUFFER_TYPE)); |
8974 | 8983 |
8975 Node* buffer_bit_field = LoadObjectField( | 8984 Node* buffer_bit_field = LoadObjectField( |
8976 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); | 8985 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); |
8977 return IsSetWord32<JSArrayBuffer::WasNeutered>(buffer_bit_field); | 8986 return IsSetWord32<JSArrayBuffer::WasNeutered>(buffer_bit_field); |
8978 } | 8987 } |
8979 | 8988 |
8980 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc, | 8989 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc, |
8981 Node* fp, | 8990 Node* fp, |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9193 formatted.c_str(), TENURED); | 9202 formatted.c_str(), TENURED); |
9194 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), | 9203 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), |
9195 HeapConstant(string)); | 9204 HeapConstant(string)); |
9196 } | 9205 } |
9197 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); | 9206 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); |
9198 #endif | 9207 #endif |
9199 } | 9208 } |
9200 | 9209 |
9201 } // namespace internal | 9210 } // namespace internal |
9202 } // namespace v8 | 9211 } // namespace v8 |
OLD | NEW |