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 | 4 |
5 #include "src/builtins/builtins-utils.h" | 5 #include "src/builtins/builtins-utils.h" |
6 #include "src/builtins/builtins.h" | 6 #include "src/builtins/builtins.h" |
7 #include "src/code-stub-assembler.h" | 7 #include "src/code-stub-assembler.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 assembler.Return(assembler.LoadObjectField(receiver, object_offset)); | 49 assembler.Return(assembler.LoadObjectField(receiver, object_offset)); |
50 | 50 |
51 assembler.Bind(&if_receiverisneutered); | 51 assembler.Bind(&if_receiverisneutered); |
52 { | 52 { |
53 // The {receiver}s buffer was neutered, default to zero. | 53 // The {receiver}s buffer was neutered, default to zero. |
54 assembler.Return(assembler.SmiConstant(0)); | 54 assembler.Return(assembler.SmiConstant(0)); |
55 } | 55 } |
56 | 56 |
57 assembler.Bind(&if_receiverisincompatible); | 57 assembler.Bind(&if_receiverisincompatible); |
58 { | 58 { |
59 // The {receiver} is not a valid JSGeneratorObject. | 59 // The {receiver} is not a valid JSTypedArray. |
60 Node* result = assembler.CallRuntime( | 60 Node* result = assembler.CallRuntime( |
61 Runtime::kThrowIncompatibleMethodReceiver, context, | 61 Runtime::kThrowIncompatibleMethodReceiver, context, |
62 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked( | 62 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked( |
63 method_name, TENURED)), | 63 method_name, TENURED)), |
64 receiver); | 64 receiver); |
65 assembler.Return(result); // Never reached. | 65 assembler.Return(result); // Never reached. |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 } // namespace | 69 } // namespace |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 162 } |
163 | 163 |
164 void Builtins::Generate_TypedArrayPrototypeKeys( | 164 void Builtins::Generate_TypedArrayPrototypeKeys( |
165 compiler::CodeAssemblerState* state) { | 165 compiler::CodeAssemblerState* state) { |
166 Generate_TypedArrayPrototypeIterationMethod<IterationKind::kKeys>( | 166 Generate_TypedArrayPrototypeIterationMethod<IterationKind::kKeys>( |
167 state, "%TypedArray%.prototype.keys()"); | 167 state, "%TypedArray%.prototype.keys()"); |
168 } | 168 } |
169 | 169 |
170 } // namespace internal | 170 } // namespace internal |
171 } // namespace v8 | 171 } // namespace v8 |
OLD | NEW |