| 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 8828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8839 Heap::kEmptyFixedArrayRootIndex); | 8839 Heap::kEmptyFixedArrayRootIndex); |
| 8840 StoreObjectFieldNoWriteBarrier(iterator, | 8840 StoreObjectFieldNoWriteBarrier(iterator, |
| 8841 JSArrayIterator::kIteratedObjectOffset, array); | 8841 JSArrayIterator::kIteratedObjectOffset, array); |
| 8842 StoreObjectFieldNoWriteBarrier(iterator, JSArrayIterator::kNextIndexOffset, | 8842 StoreObjectFieldNoWriteBarrier(iterator, JSArrayIterator::kNextIndexOffset, |
| 8843 SmiConstant(Smi::FromInt(0))); | 8843 SmiConstant(Smi::FromInt(0))); |
| 8844 StoreObjectFieldNoWriteBarrier( | 8844 StoreObjectFieldNoWriteBarrier( |
| 8845 iterator, JSArrayIterator::kIteratedObjectMapOffset, array_map); | 8845 iterator, JSArrayIterator::kIteratedObjectMapOffset, array_map); |
| 8846 return iterator; | 8846 return iterator; |
| 8847 } | 8847 } |
| 8848 | 8848 |
| 8849 Node* CodeStubAssembler::ArraySpeciesCreate(Node* context, Node* originalArray, | |
| 8850 Node* len) { | |
| 8851 // TODO(mvstanton): Install a fast path as well, which avoids the runtime | |
| 8852 // call. | |
| 8853 Node* constructor = | |
| 8854 CallRuntime(Runtime::kArraySpeciesConstructor, context, originalArray); | |
| 8855 return ConstructJS(CodeFactory::Construct(isolate()), context, constructor, | |
| 8856 len); | |
| 8857 } | |
| 8858 | |
| 8859 Node* CodeStubAssembler::IsDetachedBuffer(Node* buffer) { | 8849 Node* CodeStubAssembler::IsDetachedBuffer(Node* buffer) { |
| 8860 CSA_ASSERT(this, HasInstanceType(buffer, JS_ARRAY_BUFFER_TYPE)); | 8850 CSA_ASSERT(this, HasInstanceType(buffer, JS_ARRAY_BUFFER_TYPE)); |
| 8861 | 8851 |
| 8862 Node* buffer_bit_field = LoadObjectField( | 8852 Node* buffer_bit_field = LoadObjectField( |
| 8863 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); | 8853 buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32()); |
| 8864 return IsSetWord32<JSArrayBuffer::WasNeutered>(buffer_bit_field); | 8854 return IsSetWord32<JSArrayBuffer::WasNeutered>(buffer_bit_field); |
| 8865 } | 8855 } |
| 8866 | 8856 |
| 8867 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc, | 8857 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc, |
| 8868 Node* fp, | 8858 Node* fp, |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9080 formatted.c_str(), TENURED); | 9070 formatted.c_str(), TENURED); |
| 9081 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), | 9071 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), |
| 9082 HeapConstant(string)); | 9072 HeapConstant(string)); |
| 9083 } | 9073 } |
| 9084 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); | 9074 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); |
| 9085 #endif | 9075 #endif |
| 9086 } | 9076 } |
| 9087 | 9077 |
| 9088 } // namespace internal | 9078 } // namespace internal |
| 9089 } // namespace v8 | 9079 } // namespace v8 |
| OLD | NEW |