OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/bytecode-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 RegisterAllocationScope register_scope(this); | 2227 RegisterAllocationScope register_scope(this); |
2228 | 2228 |
2229 // Update state to indicate that we have finished resuming. Loop headers | 2229 // Update state to indicate that we have finished resuming. Loop headers |
2230 // rely on this. | 2230 // rely on this. |
2231 builder() | 2231 builder() |
2232 ->LoadLiteral(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)) | 2232 ->LoadLiteral(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)) |
2233 .StoreAccumulatorInRegister(generator_state_); | 2233 .StoreAccumulatorInRegister(generator_state_); |
2234 | 2234 |
2235 Register input = register_allocator()->NewRegister(); | 2235 Register input = register_allocator()->NewRegister(); |
2236 builder() | 2236 builder() |
2237 ->CallRuntime(Runtime::kInlineGeneratorGetInput, generator, 1) | 2237 ->CallRuntime(Runtime::kInlineGeneratorGetInputOrDebugPos, generator, 1) |
2238 .StoreAccumulatorInRegister(input); | 2238 .StoreAccumulatorInRegister(input); |
2239 | 2239 |
2240 Register resume_mode = register_allocator()->NewRegister(); | 2240 Register resume_mode = register_allocator()->NewRegister(); |
2241 builder() | 2241 builder() |
2242 ->CallRuntime(Runtime::kInlineGeneratorGetResumeMode, generator, 1) | 2242 ->CallRuntime(Runtime::kInlineGeneratorGetResumeMode, generator, 1) |
2243 .StoreAccumulatorInRegister(resume_mode); | 2243 .StoreAccumulatorInRegister(resume_mode); |
2244 | 2244 |
2245 // Now dispatch on resume mode. | 2245 // Now dispatch on resume mode. |
2246 | 2246 |
2247 BytecodeLabel resume_with_next; | 2247 BytecodeLabel resume_with_next; |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3179 return execution_context()->scope()->language_mode(); | 3179 return execution_context()->scope()->language_mode(); |
3180 } | 3180 } |
3181 | 3181 |
3182 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3182 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
3183 return TypeFeedbackVector::GetIndex(slot); | 3183 return TypeFeedbackVector::GetIndex(slot); |
3184 } | 3184 } |
3185 | 3185 |
3186 } // namespace interpreter | 3186 } // namespace interpreter |
3187 } // namespace internal | 3187 } // namespace internal |
3188 } // namespace v8 | 3188 } // namespace v8 |
OLD | NEW |