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

Side by Side Diff: src/hydrogen.cc

Issue 893073006: Add map-based read barrier to WeakCell Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 years, 10 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/heap/mark-compact.cc ('k') | src/hydrogen-instructions.h » ('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 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 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after
3061 if (type->NumClasses() == 1) { 3061 if (type->NumClasses() == 1) {
3062 BuildCheckHeapObject(value); 3062 BuildCheckHeapObject(value);
3063 // For ICs, the map checked below is a sentinel map that gets replaced by 3063 // For ICs, the map checked below is a sentinel map that gets replaced by
3064 // the monomorphic map when the code is used as a template to generate a 3064 // the monomorphic map when the code is used as a template to generate a
3065 // new IC. For optimized functions, there is no sentinel map, the map 3065 // new IC. For optimized functions, there is no sentinel map, the map
3066 // emitted below is the actual monomorphic map. 3066 // emitted below is the actual monomorphic map.
3067 if (map_embedding == kEmbedMapsViaWeakCells) { 3067 if (map_embedding == kEmbedMapsViaWeakCells) {
3068 HValue* cell = 3068 HValue* cell =
3069 Add<HConstant>(Map::WeakCellForMap(type->Classes().Current())); 3069 Add<HConstant>(Map::WeakCellForMap(type->Classes().Current()));
3070 HValue* expected_map = Add<HLoadNamedField>( 3070 HValue* expected_map = Add<HLoadNamedField>(
3071 cell, nullptr, HObjectAccess::ForWeakCellValue()); 3071 cell, nullptr, HObjectAccess::ForWeakCellValueComparison());
3072 HValue* map = 3072 HValue* map =
3073 Add<HLoadNamedField>(value, nullptr, HObjectAccess::ForMap()); 3073 Add<HLoadNamedField>(value, nullptr, HObjectAccess::ForMap());
3074 IfBuilder map_check(this); 3074 IfBuilder map_check(this);
3075 map_check.IfNot<HCompareObjectEqAndBranch>(expected_map, map); 3075 map_check.IfNot<HCompareObjectEqAndBranch>(expected_map, map);
3076 map_check.ThenDeopt(Deoptimizer::kUnknownMap); 3076 map_check.ThenDeopt(Deoptimizer::kUnknownMap);
3077 map_check.End(); 3077 map_check.End();
3078 } else { 3078 } else {
3079 DCHECK(map_embedding == kEmbedMapsDirectly); 3079 DCHECK(map_embedding == kEmbedMapsDirectly);
3080 Add<HCheckMaps>(value, type->Classes().Current()); 3080 Add<HCheckMaps>(value, type->Classes().Current());
3081 } 3081 }
(...skipping 10406 matching lines...) Expand 10 before | Expand all | Expand 10 after
13488 if (ShouldProduceTraceOutput()) { 13488 if (ShouldProduceTraceOutput()) {
13489 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13489 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13490 } 13490 }
13491 13491
13492 #ifdef DEBUG 13492 #ifdef DEBUG
13493 graph_->Verify(false); // No full verify. 13493 graph_->Verify(false); // No full verify.
13494 #endif 13494 #endif
13495 } 13495 }
13496 13496
13497 } } // namespace v8::internal 13497 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698