OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 5819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5830 } else if (argument_count >= 2) { | 5830 } else if (argument_count >= 2) { |
5831 minor_key_ = ArgumentCountBits::encode(MORE_THAN_ONE); | 5831 minor_key_ = ArgumentCountBits::encode(MORE_THAN_ONE); |
5832 } else { | 5832 } else { |
5833 UNREACHABLE(); | 5833 UNREACHABLE(); |
5834 } | 5834 } |
5835 } | 5835 } |
5836 | 5836 |
5837 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) | 5837 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) |
5838 : PlatformCodeStub(isolate) {} | 5838 : PlatformCodeStub(isolate) {} |
5839 | 5839 |
5840 Representation RepresentationFromType(Type* type) { | 5840 Representation RepresentationFromType(AstType* type) { |
5841 if (type->Is(Type::UntaggedIntegral())) { | 5841 if (type->Is(AstType::UntaggedIntegral())) { |
5842 return Representation::Integer32(); | 5842 return Representation::Integer32(); |
5843 } | 5843 } |
5844 | 5844 |
5845 if (type->Is(Type::TaggedSigned())) { | 5845 if (type->Is(AstType::TaggedSigned())) { |
5846 return Representation::Smi(); | 5846 return Representation::Smi(); |
5847 } | 5847 } |
5848 | 5848 |
5849 if (type->Is(Type::UntaggedPointer())) { | 5849 if (type->Is(AstType::UntaggedPointer())) { |
5850 return Representation::External(); | 5850 return Representation::External(); |
5851 } | 5851 } |
5852 | 5852 |
5853 DCHECK(!type->Is(Type::Untagged())); | 5853 DCHECK(!type->Is(AstType::Untagged())); |
5854 return Representation::Tagged(); | 5854 return Representation::Tagged(); |
5855 } | 5855 } |
5856 | 5856 |
5857 Representation RepresentationFromMachineType(MachineType type) { | 5857 Representation RepresentationFromMachineType(MachineType type) { |
5858 if (type == MachineType::Int32()) { | 5858 if (type == MachineType::Int32()) { |
5859 return Representation::Integer32(); | 5859 return Representation::Integer32(); |
5860 } | 5860 } |
5861 | 5861 |
5862 if (type == MachineType::TaggedSigned()) { | 5862 if (type == MachineType::TaggedSigned()) { |
5863 return Representation::Smi(); | 5863 return Representation::Smi(); |
5864 } | 5864 } |
5865 | 5865 |
5866 if (type == MachineType::Pointer()) { | 5866 if (type == MachineType::Pointer()) { |
5867 return Representation::External(); | 5867 return Representation::External(); |
5868 } | 5868 } |
5869 | 5869 |
5870 return Representation::Tagged(); | 5870 return Representation::Tagged(); |
5871 } | 5871 } |
5872 | 5872 |
5873 } // namespace internal | 5873 } // namespace internal |
5874 } // namespace v8 | 5874 } // namespace v8 |
OLD | NEW |