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