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/hydrogen.cc

Issue 1083923005: fix bad rebase in r27966 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 6577 matching lines...) Expand 10 before | Expand all | Expand 10 after
6588 DCHECK(instr->HasObservableSideEffects()); 6588 DCHECK(instr->HasObservableSideEffects());
6589 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE); 6589 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE);
6590 return; 6590 return;
6591 } 6591 }
6592 } 6592 }
6593 6593
6594 LookupIterator it(global, var->name(), LookupIterator::OWN); 6594 LookupIterator it(global, var->name(), LookupIterator::OWN);
6595 GlobalPropertyAccess type = LookupGlobalProperty(var, &it, STORE); 6595 GlobalPropertyAccess type = LookupGlobalProperty(var, &it, STORE);
6596 if (type == kUseCell) { 6596 if (type == kUseCell) {
6597 Handle<PropertyCell> cell = it.GetPropertyCell(); 6597 Handle<PropertyCell> cell = it.GetPropertyCell();
6598 top_info()->dependencies()->AssumePropertyCell(cell);
6599 auto cell_type = it.property_details().cell_type(); 6598 auto cell_type = it.property_details().cell_type();
6600 if (cell_type == PropertyCellType::kConstant || 6599 if (cell_type == PropertyCellType::kConstant ||
6601 cell_type == PropertyCellType::kUndefined) { 6600 cell_type == PropertyCellType::kUndefined) {
6602 Handle<Object> constant(cell->value(), isolate()); 6601 Handle<Object> constant(cell->value(), isolate());
6603 if (value->IsConstant()) { 6602 if (value->IsConstant()) {
6604 HConstant* c_value = HConstant::cast(value); 6603 HConstant* c_value = HConstant::cast(value);
6605 if (!constant.is_identical_to(c_value->handle(isolate()))) { 6604 if (!constant.is_identical_to(c_value->handle(isolate()))) {
6606 Add<HDeoptimize>(Deoptimizer::kConstantGlobalVariableAssignment, 6605 Add<HDeoptimize>(Deoptimizer::kConstantGlobalVariableAssignment,
6607 Deoptimizer::EAGER); 6606 Deoptimizer::EAGER);
6608 } 6607 }
(...skipping 29 matching lines...) Expand all
6638 access = access.WithRepresentation(Representation::HeapObject()); 6637 access = access.WithRepresentation(Representation::HeapObject());
6639 } else { 6638 } else {
6640 auto dictionary = handle(global->property_dictionary()); 6639 auto dictionary = handle(global->property_dictionary());
6641 cell = PropertyCell::InvalidateEntry(dictionary, 6640 cell = PropertyCell::InvalidateEntry(dictionary,
6642 it.dictionary_entry()); 6641 it.dictionary_entry());
6643 } 6642 }
6644 break; 6643 break;
6645 } 6644 }
6646 } 6645 }
6647 } 6646 }
6647 top_info()->dependencies()->AssumePropertyCell(cell);
6648 HInstruction* instr = Add<HStoreNamedField>(cell_constant, access, value); 6648 HInstruction* instr = Add<HStoreNamedField>(cell_constant, access, value);
6649 instr->ClearChangesFlag(kInobjectFields); 6649 instr->ClearChangesFlag(kInobjectFields);
6650 instr->SetChangesFlag(kGlobalVars); 6650 instr->SetChangesFlag(kGlobalVars);
6651 if (instr->HasObservableSideEffects()) { 6651 if (instr->HasObservableSideEffects()) {
6652 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE); 6652 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE);
6653 } 6653 }
6654 } else { 6654 } else {
6655 HValue* global_object = Add<HLoadNamedField>( 6655 HValue* global_object = Add<HLoadNamedField>(
6656 context(), nullptr, 6656 context(), nullptr,
6657 HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); 6657 HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX));
(...skipping 6377 matching lines...) Expand 10 before | Expand all | Expand 10 after
13035 if (ShouldProduceTraceOutput()) { 13035 if (ShouldProduceTraceOutput()) {
13036 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13036 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13037 } 13037 }
13038 13038
13039 #ifdef DEBUG 13039 #ifdef DEBUG
13040 graph_->Verify(false); // No full verify. 13040 graph_->Verify(false); // No full verify.
13041 #endif 13041 #endif
13042 } 13042 }
13043 13043
13044 } } // namespace v8::internal 13044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698