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 1342 matching lines...) Loading... |
1353 } else { | 1353 } else { |
1354 // Load the payload of the global parameter cell. A hole indicates that the | 1354 // Load the payload of the global parameter cell. A hole indicates that the |
1355 // property has been deleted and that the store must be handled by the | 1355 // property has been deleted and that the store must be handled by the |
1356 // runtime. | 1356 // runtime. |
1357 IfBuilder builder(this); | 1357 IfBuilder builder(this); |
1358 HValue* hole_value = graph()->GetConstantHole(); | 1358 HValue* hole_value = graph()->GetConstantHole(); |
1359 builder.If<HCompareObjectEqAndBranch>(cell_contents, hole_value); | 1359 builder.If<HCompareObjectEqAndBranch>(cell_contents, hole_value); |
1360 builder.Then(); | 1360 builder.Then(); |
1361 builder.Deopt(Deoptimizer::kUnexpectedCellContentsInGlobalStore); | 1361 builder.Deopt(Deoptimizer::kUnexpectedCellContentsInGlobalStore); |
1362 builder.Else(); | 1362 builder.Else(); |
1363 HStoreNamedField* store = Add<HStoreNamedField>(cell, access, value); | 1363 Add<HStoreNamedField>(cell, access, value); |
1364 store->MarkReceiverAsCell(); | |
1365 builder.End(); | 1364 builder.End(); |
1366 } | 1365 } |
1367 | 1366 |
1368 return value; | 1367 return value; |
1369 } | 1368 } |
1370 | 1369 |
1371 | 1370 |
1372 Handle<Code> StoreGlobalStub::GenerateCode() { | 1371 Handle<Code> StoreGlobalStub::GenerateCode() { |
1373 return DoGenerateCode(this); | 1372 return DoGenerateCode(this); |
1374 } | 1373 } |
(...skipping 654 matching lines...) Loading... |
2029 // megamorphic case is handled as part of the default stub. | 2028 // megamorphic case is handled as part of the default stub. |
2030 DCHECK(!FLAG_vector_ics); | 2029 DCHECK(!FLAG_vector_ics); |
2031 | 2030 |
2032 // Probe the stub cache. | 2031 // Probe the stub cache. |
2033 Add<HTailCallThroughMegamorphicCache>(receiver, name); | 2032 Add<HTailCallThroughMegamorphicCache>(receiver, name); |
2034 | 2033 |
2035 // We never continue. | 2034 // We never continue. |
2036 return graph()->GetConstant0(); | 2035 return graph()->GetConstant0(); |
2037 } | 2036 } |
2038 } } // namespace v8::internal | 2037 } } // namespace v8::internal |
OLD | NEW |