Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 2079613003: [generators] Implement %GeneratorGetSourcePosition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rename again, and move subtraction to runtime Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698