| 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/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/field-index.h" | 8 #include "src/field-index.h" |
| 9 #include "src/hydrogen.h" | 9 #include "src/hydrogen.h" |
| 10 #include "src/lithium.h" | 10 #include "src/lithium.h" |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 | 532 |
| 533 | 533 |
| 534 Handle<Code> CreateAllocationSiteStub::GenerateCode() { | 534 Handle<Code> CreateAllocationSiteStub::GenerateCode() { |
| 535 return DoGenerateCode(this); | 535 return DoGenerateCode(this); |
| 536 } | 536 } |
| 537 | 537 |
| 538 | 538 |
| 539 template <> | 539 template <> |
| 540 HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() { | 540 HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() { |
| 541 HInstruction* load = BuildUncheckedMonomorphicElementAccess( | 541 HInstruction* load = BuildUncheckedMonomorphicElementAccess( |
| 542 GetParameter(0), GetParameter(1), NULL, | 542 GetParameter(KeyedLoadIC::kReceiverIndex), |
| 543 casted_stub()->is_js_array(), casted_stub()->elements_kind(), | 543 GetParameter(KeyedLoadIC::kNameIndex), |
| 544 LOAD, NEVER_RETURN_HOLE, STANDARD_STORE); | 544 NULL, |
| 545 casted_stub()->is_js_array(), |
| 546 casted_stub()->elements_kind(), |
| 547 LOAD, |
| 548 NEVER_RETURN_HOLE, |
| 549 STANDARD_STORE); |
| 545 return load; | 550 return load; |
| 546 } | 551 } |
| 547 | 552 |
| 548 | 553 |
| 549 Handle<Code> KeyedLoadFastElementStub::GenerateCode() { | 554 Handle<Code> KeyedLoadFastElementStub::GenerateCode() { |
| 550 return DoGenerateCode(this); | 555 return DoGenerateCode(this); |
| 551 } | 556 } |
| 552 | 557 |
| 553 | 558 |
| 554 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( | 559 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 } | 1369 } |
| 1365 | 1370 |
| 1366 | 1371 |
| 1367 Handle<Code> FastNewContextStub::GenerateCode() { | 1372 Handle<Code> FastNewContextStub::GenerateCode() { |
| 1368 return DoGenerateCode(this); | 1373 return DoGenerateCode(this); |
| 1369 } | 1374 } |
| 1370 | 1375 |
| 1371 | 1376 |
| 1372 template<> | 1377 template<> |
| 1373 HValue* CodeStubGraphBuilder<KeyedLoadDictionaryElementStub>::BuildCodeStub() { | 1378 HValue* CodeStubGraphBuilder<KeyedLoadDictionaryElementStub>::BuildCodeStub() { |
| 1374 HValue* receiver = GetParameter(0); | 1379 HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex); |
| 1375 HValue* key = GetParameter(1); | 1380 HValue* key = GetParameter(KeyedLoadIC::kNameIndex); |
| 1376 | 1381 |
| 1377 Add<HCheckSmi>(key); | 1382 Add<HCheckSmi>(key); |
| 1378 | 1383 |
| 1379 HValue* elements = AddLoadElements(receiver); | 1384 HValue* elements = AddLoadElements(receiver); |
| 1380 | 1385 |
| 1381 HValue* hash = BuildElementIndexHash(key); | 1386 HValue* hash = BuildElementIndexHash(key); |
| 1382 | 1387 |
| 1383 return BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash); | 1388 return BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash); |
| 1384 } | 1389 } |
| 1385 | 1390 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 BuildElementsKindLimitCheck(if_builder, bit_field2, kind); | 1502 BuildElementsKindLimitCheck(if_builder, bit_field2, kind); |
| 1498 | 1503 |
| 1499 Push(BuildUncheckedMonomorphicElementAccess(receiver, key, NULL, | 1504 Push(BuildUncheckedMonomorphicElementAccess(receiver, key, NULL, |
| 1500 false, kind, | 1505 false, kind, |
| 1501 LOAD, NEVER_RETURN_HOLE, | 1506 LOAD, NEVER_RETURN_HOLE, |
| 1502 STANDARD_STORE)); | 1507 STANDARD_STORE)); |
| 1503 } | 1508 } |
| 1504 | 1509 |
| 1505 | 1510 |
| 1506 HValue* CodeStubGraphBuilder<KeyedLoadGenericElementStub>::BuildCodeStub() { | 1511 HValue* CodeStubGraphBuilder<KeyedLoadGenericElementStub>::BuildCodeStub() { |
| 1507 HValue* receiver = GetParameter(0); | 1512 HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex); |
| 1508 HValue* key = GetParameter(1); | 1513 HValue* key = GetParameter(KeyedLoadIC::kNameIndex); |
| 1509 | 1514 |
| 1510 // Split into a smi/integer case and unique string case. | 1515 // Split into a smi/integer case and unique string case. |
| 1511 HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(), | 1516 HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(), |
| 1512 graph()->CreateBasicBlock()); | 1517 graph()->CreateBasicBlock()); |
| 1513 | 1518 |
| 1514 BuildKeyedIndexCheck(key, &index_name_split_continuation); | 1519 BuildKeyedIndexCheck(key, &index_name_split_continuation); |
| 1515 | 1520 |
| 1516 IfBuilder index_name_split(this, &index_name_split_continuation); | 1521 IfBuilder index_name_split(this, &index_name_split_continuation); |
| 1517 index_name_split.Then(); | 1522 index_name_split.Then(); |
| 1518 { | 1523 { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 return Pop(); | 1706 return Pop(); |
| 1702 } | 1707 } |
| 1703 | 1708 |
| 1704 | 1709 |
| 1705 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { | 1710 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { |
| 1706 return DoGenerateCode(this); | 1711 return DoGenerateCode(this); |
| 1707 } | 1712 } |
| 1708 | 1713 |
| 1709 | 1714 |
| 1710 } } // namespace v8::internal | 1715 } } // namespace v8::internal |
| OLD | NEW |