OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Returns function of generator activation. | 141 // Returns function of generator activation. |
142 RUNTIME_FUNCTION(Runtime_GeneratorGetFunction) { | 142 RUNTIME_FUNCTION(Runtime_GeneratorGetFunction) { |
143 HandleScope scope(isolate); | 143 HandleScope scope(isolate); |
144 DCHECK(args.length() == 1); | 144 DCHECK(args.length() == 1); |
145 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); | 145 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); |
146 | 146 |
147 return generator->function(); | 147 return generator->function(); |
148 } | 148 } |
149 | 149 |
150 | 150 |
151 // Returns context of generator activation. | |
152 RUNTIME_FUNCTION(Runtime_GeneratorGetContext) { | |
153 HandleScope scope(isolate); | |
154 DCHECK(args.length() == 1); | |
155 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); | |
156 | |
157 return generator->context(); | |
158 } | |
159 | |
160 | |
161 // Returns receiver of generator activation. | 151 // Returns receiver of generator activation. |
162 RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) { | 152 RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) { |
163 HandleScope scope(isolate); | 153 HandleScope scope(isolate); |
164 DCHECK(args.length() == 1); | 154 DCHECK(args.length() == 1); |
165 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); | 155 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); |
166 | 156 |
167 return generator->receiver(); | 157 return generator->receiver(); |
168 } | 158 } |
169 | 159 |
170 | 160 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 return nullptr; | 206 return nullptr; |
217 } | 207 } |
218 | 208 |
219 RUNTIME_FUNCTION(Runtime_GeneratorThrow) { | 209 RUNTIME_FUNCTION(Runtime_GeneratorThrow) { |
220 UNREACHABLE(); | 210 UNREACHABLE(); |
221 return nullptr; | 211 return nullptr; |
222 } | 212 } |
223 | 213 |
224 } // namespace internal | 214 } // namespace internal |
225 } // namespace v8 | 215 } // namespace v8 |
OLD | NEW |