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

Unified Diff: src/objects.cc

Issue 2517143003: Remove some leftovers of full-codegen's generators implementation. (Closed)
Patch Set: GENERATOR_CONTINUATION in arm64 Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index f0b9b04cdb0673abbc9ef48b93a0813ffd28ea63..8d6303d37d43d5d990693d2962127d209323e172 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -19748,24 +19748,15 @@ void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
int JSGeneratorObject::source_position() const {
CHECK(is_suspended());
+ DCHECK(function()->shared()->HasBytecodeArray());
+ DCHECK(!function()->shared()->HasBaselineCode());
AbstractCode* code;
int code_offset;
- if (function()->shared()->HasBytecodeArray()) {
- // New-style generators.
- DCHECK(!function()->shared()->HasBaselineCode());
- code_offset = Smi::cast(input_or_debug_pos())->value();
- // The stored bytecode offset is relative to a different base than what
- // is used in the source position table, hence the subtraction.
- code_offset -= BytecodeArray::kHeaderSize - kHeapObjectTag;
- code = AbstractCode::cast(function()->shared()->bytecode_array());
- } else {
- // Old-style generators.
- DCHECK(function()->shared()->HasBaselineCode());
- code_offset = continuation();
- CHECK(0 <= code_offset);
- CHECK(code_offset < function()->code()->instruction_size());
- code = AbstractCode::cast(function()->shared()->code());
- }
+ code_offset = Smi::cast(input_or_debug_pos())->value();
Michael Starzinger 2016/11/21 15:56:16 nit: Declaration and definition of {code_offset} c
neis 2016/11/22 13:18:53 Done.
+ // The stored bytecode offset is relative to a different base than what
+ // is used in the source position table, hence the subtraction.
+ code_offset -= BytecodeArray::kHeaderSize - kHeapObjectTag;
+ code = AbstractCode::cast(function()->shared()->bytecode_array());
Michael Starzinger 2016/11/21 15:56:16 nit: Declaration and definition of {code} can go i
neis 2016/11/22 13:18:53 Done.
return code->SourcePosition(code_offset);
}
« no previous file with comments | « src/objects.h ('k') | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698