OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 map_check.IfNot<HCompareObjectEqAndBranch>(expected_map, map); | 1333 map_check.IfNot<HCompareObjectEqAndBranch>(expected_map, map); |
1334 map_check.ThenDeopt(Deoptimizer::kUnknownMap); | 1334 map_check.ThenDeopt(Deoptimizer::kUnknownMap); |
1335 map_check.End(); | 1335 map_check.End(); |
1336 } | 1336 } |
1337 | 1337 |
1338 HValue* weak_cell = Add<HConstant>(isolate()->factory()->NewWeakCell( | 1338 HValue* weak_cell = Add<HConstant>(isolate()->factory()->NewWeakCell( |
1339 StoreGlobalStub::property_cell_placeholder(isolate()))); | 1339 StoreGlobalStub::property_cell_placeholder(isolate()))); |
1340 HValue* cell = Add<HLoadNamedField>(weak_cell, nullptr, | 1340 HValue* cell = Add<HLoadNamedField>(weak_cell, nullptr, |
1341 HObjectAccess::ForWeakCellValue()); | 1341 HObjectAccess::ForWeakCellValue()); |
1342 Add<HCheckHeapObject>(cell); | 1342 Add<HCheckHeapObject>(cell); |
1343 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); | 1343 HObjectAccess access = HObjectAccess::ForPropertyCellValue(); |
1344 HValue* cell_contents = Add<HLoadNamedField>(cell, nullptr, access); | 1344 HValue* cell_contents = Add<HLoadNamedField>(cell, nullptr, access); |
1345 | 1345 |
1346 if (stub->is_constant()) { | 1346 if (stub->is_constant()) { |
1347 IfBuilder builder(this); | 1347 IfBuilder builder(this); |
1348 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); | 1348 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); |
1349 builder.Then(); | 1349 builder.Then(); |
1350 builder.ElseDeopt( | 1350 builder.ElseDeopt( |
1351 Deoptimizer::kUnexpectedCellContentsInConstantGlobalStore); | 1351 Deoptimizer::kUnexpectedCellContentsInConstantGlobalStore); |
1352 builder.End(); | 1352 builder.End(); |
1353 } else { | 1353 } else { |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2028 // megamorphic case is handled as part of the default stub. | 2028 // megamorphic case is handled as part of the default stub. |
2029 DCHECK(!FLAG_vector_ics); | 2029 DCHECK(!FLAG_vector_ics); |
2030 | 2030 |
2031 // Probe the stub cache. | 2031 // Probe the stub cache. |
2032 Add<HTailCallThroughMegamorphicCache>(receiver, name); | 2032 Add<HTailCallThroughMegamorphicCache>(receiver, name); |
2033 | 2033 |
2034 // We never continue. | 2034 // We never continue. |
2035 return graph()->GetConstant0(); | 2035 return graph()->GetConstant0(); |
2036 } | 2036 } |
2037 } } // namespace v8::internal | 2037 } } // namespace v8::internal |
OLD | NEW |