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

Side by Side Diff: src/objects.cc

Issue 2517143003: Remove some leftovers of full-codegen's generators implementation. (Closed)
Patch Set: Address feedback. 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 unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/parsing/parser.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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 19738 matching lines...) Expand 10 before | Expand all | Expand 10 after
19749 if (cell->value() != *new_value) { 19749 if (cell->value() != *new_value) {
19750 cell->set_value(*new_value); 19750 cell->set_value(*new_value);
19751 Isolate* isolate = cell->GetIsolate(); 19751 Isolate* isolate = cell->GetIsolate();
19752 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19752 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19753 isolate, DependentCode::kPropertyCellChangedGroup); 19753 isolate, DependentCode::kPropertyCellChangedGroup);
19754 } 19754 }
19755 } 19755 }
19756 19756
19757 int JSGeneratorObject::source_position() const { 19757 int JSGeneratorObject::source_position() const {
19758 CHECK(is_suspended()); 19758 CHECK(is_suspended());
19759 AbstractCode* code; 19759 DCHECK(function()->shared()->HasBytecodeArray());
19760 int code_offset; 19760 DCHECK(!function()->shared()->HasBaselineCode());
19761 if (function()->shared()->HasBytecodeArray()) { 19761 int code_offset = Smi::cast(input_or_debug_pos())->value();
19762 // New-style generators. 19762 // The stored bytecode offset is relative to a different base than what
19763 DCHECK(!function()->shared()->HasBaselineCode()); 19763 // is used in the source position table, hence the subtraction.
19764 code_offset = Smi::cast(input_or_debug_pos())->value(); 19764 code_offset -= BytecodeArray::kHeaderSize - kHeapObjectTag;
19765 // The stored bytecode offset is relative to a different base than what 19765 AbstractCode* code =
19766 // is used in the source position table, hence the subtraction. 19766 AbstractCode::cast(function()->shared()->bytecode_array());
19767 code_offset -= BytecodeArray::kHeaderSize - kHeapObjectTag;
19768 code = AbstractCode::cast(function()->shared()->bytecode_array());
19769 } else {
19770 // Old-style generators.
19771 DCHECK(function()->shared()->HasBaselineCode());
19772 code_offset = continuation();
19773 CHECK(0 <= code_offset);
19774 CHECK(code_offset < function()->code()->instruction_size());
19775 code = AbstractCode::cast(function()->shared()->code());
19776 }
19777 return code->SourcePosition(code_offset); 19767 return code->SourcePosition(code_offset);
19778 } 19768 }
19779 19769
19780 // static 19770 // static
19781 AccessCheckInfo* AccessCheckInfo::Get(Isolate* isolate, 19771 AccessCheckInfo* AccessCheckInfo::Get(Isolate* isolate,
19782 Handle<JSObject> receiver) { 19772 Handle<JSObject> receiver) {
19783 DisallowHeapAllocation no_gc; 19773 DisallowHeapAllocation no_gc;
19784 DCHECK(receiver->map()->is_access_check_needed()); 19774 DCHECK(receiver->map()->is_access_check_needed());
19785 Object* maybe_constructor = receiver->map()->GetConstructor(); 19775 Object* maybe_constructor = receiver->map()->GetConstructor();
19786 // Might happen for a detached context. 19776 // Might happen for a detached context.
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
20435 // depend on this. 20425 // depend on this.
20436 return DICTIONARY_ELEMENTS; 20426 return DICTIONARY_ELEMENTS;
20437 } 20427 }
20438 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20428 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20439 return kind; 20429 return kind;
20440 } 20430 }
20441 } 20431 }
20442 20432
20443 } // namespace internal 20433 } // namespace internal
20444 } // namespace v8 20434 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698