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 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2945 | 2945 |
2946 Node* CodeStubAssembler::IsFixedDoubleArray(Node* object) { | 2946 Node* CodeStubAssembler::IsFixedDoubleArray(Node* object) { |
2947 return WordEqual(LoadMap(object), FixedDoubleArrayMapConstant()); | 2947 return WordEqual(LoadMap(object), FixedDoubleArrayMapConstant()); |
2948 } | 2948 } |
2949 | 2949 |
2950 Node* CodeStubAssembler::IsHashTable(Node* object) { | 2950 Node* CodeStubAssembler::IsHashTable(Node* object) { |
2951 return WordEqual(LoadMap(object), LoadRoot(Heap::kHashTableMapRootIndex)); | 2951 return WordEqual(LoadMap(object), LoadRoot(Heap::kHashTableMapRootIndex)); |
2952 } | 2952 } |
2953 | 2953 |
2954 Node* CodeStubAssembler::IsDictionary(Node* object) { | 2954 Node* CodeStubAssembler::IsDictionary(Node* object) { |
2955 return WordOr(IsHashTable(object), IsUnseededNumberDictionary(object)); | 2955 return Word32Or(IsHashTable(object), IsUnseededNumberDictionary(object)); |
2956 } | 2956 } |
2957 | 2957 |
2958 Node* CodeStubAssembler::IsUnseededNumberDictionary(Node* object) { | 2958 Node* CodeStubAssembler::IsUnseededNumberDictionary(Node* object) { |
2959 return WordEqual(LoadMap(object), | 2959 return WordEqual(LoadMap(object), |
2960 LoadRoot(Heap::kUnseededNumberDictionaryMapRootIndex)); | 2960 LoadRoot(Heap::kUnseededNumberDictionaryMapRootIndex)); |
2961 } | 2961 } |
2962 | 2962 |
2963 Node* CodeStubAssembler::StringCharCodeAt(Node* string, Node* index) { | 2963 Node* CodeStubAssembler::StringCharCodeAt(Node* string, Node* index) { |
2964 CSA_ASSERT(this, IsString(string)); | 2964 CSA_ASSERT(this, IsString(string)); |
2965 // Translate the {index} into a Word. | 2965 // Translate the {index} into a Word. |
(...skipping 5256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8222 | 8222 |
8223 Node* CodeStubAssembler::IsDebugActive() { | 8223 Node* CodeStubAssembler::IsDebugActive() { |
8224 Node* is_debug_active = Load( | 8224 Node* is_debug_active = Load( |
8225 MachineType::Uint8(), | 8225 MachineType::Uint8(), |
8226 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); | 8226 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); |
8227 return WordNotEqual(is_debug_active, Int32Constant(0)); | 8227 return WordNotEqual(is_debug_active, Int32Constant(0)); |
8228 } | 8228 } |
8229 | 8229 |
8230 } // namespace internal | 8230 } // namespace internal |
8231 } // namespace v8 | 8231 } // namespace v8 |
OLD | NEW |