| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/regexp_assembler_ir.h" | 5 #include "vm/regexp_assembler_ir.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 arguments->Add(arg1); | 530 arguments->Add(arg1); |
| 531 arguments->Add(arg2); | 531 arguments->Add(arg2); |
| 532 | 532 |
| 533 return StaticCall(function, arguments); | 533 return StaticCall(function, arguments); |
| 534 } | 534 } |
| 535 | 535 |
| 536 | 536 |
| 537 StaticCallInstr* IRRegExpMacroAssembler::StaticCall( | 537 StaticCallInstr* IRRegExpMacroAssembler::StaticCall( |
| 538 const Function& function, | 538 const Function& function, |
| 539 ZoneGrowableArray<PushArgumentInstr*>* arguments) const { | 539 ZoneGrowableArray<PushArgumentInstr*>* arguments) const { |
| 540 const intptr_t kTypeArgsLen = 0; |
| 540 return new (Z) | 541 return new (Z) |
| 541 StaticCallInstr(TokenPosition::kNoSource, function, Object::null_array(), | 542 StaticCallInstr(TokenPosition::kNoSource, function, kTypeArgsLen, |
| 542 arguments, ic_data_array_); | 543 Object::null_array(), arguments, ic_data_array_); |
| 543 } | 544 } |
| 544 | 545 |
| 545 | 546 |
| 546 InstanceCallInstr* IRRegExpMacroAssembler::InstanceCall( | 547 InstanceCallInstr* IRRegExpMacroAssembler::InstanceCall( |
| 547 const InstanceCallDescriptor& desc, | 548 const InstanceCallDescriptor& desc, |
| 548 PushArgumentInstr* arg1) const { | 549 PushArgumentInstr* arg1) const { |
| 549 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 550 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 550 new (Z) ZoneGrowableArray<PushArgumentInstr*>(1); | 551 new (Z) ZoneGrowableArray<PushArgumentInstr*>(1); |
| 551 arguments->Add(arg1); | 552 arguments->Add(arg1); |
| 552 | 553 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 578 arguments->Add(arg2); | 579 arguments->Add(arg2); |
| 579 arguments->Add(arg3); | 580 arguments->Add(arg3); |
| 580 | 581 |
| 581 return InstanceCall(desc, arguments); | 582 return InstanceCall(desc, arguments); |
| 582 } | 583 } |
| 583 | 584 |
| 584 | 585 |
| 585 InstanceCallInstr* IRRegExpMacroAssembler::InstanceCall( | 586 InstanceCallInstr* IRRegExpMacroAssembler::InstanceCall( |
| 586 const InstanceCallDescriptor& desc, | 587 const InstanceCallDescriptor& desc, |
| 587 ZoneGrowableArray<PushArgumentInstr*>* arguments) const { | 588 ZoneGrowableArray<PushArgumentInstr*>* arguments) const { |
| 588 return new (Z) InstanceCallInstr( | 589 const intptr_t kTypeArgsLen = 0; |
| 589 TokenPosition::kNoSource, desc.name, desc.token_kind, arguments, | 590 return new (Z) |
| 590 Object::null_array(), desc.checked_argument_count, ic_data_array_); | 591 InstanceCallInstr(TokenPosition::kNoSource, desc.name, desc.token_kind, |
| 592 arguments, kTypeArgsLen, Object::null_array(), |
| 593 desc.checked_argument_count, ic_data_array_); |
| 591 } | 594 } |
| 592 | 595 |
| 593 | 596 |
| 594 LoadLocalInstr* IRRegExpMacroAssembler::LoadLocal(LocalVariable* local) const { | 597 LoadLocalInstr* IRRegExpMacroAssembler::LoadLocal(LocalVariable* local) const { |
| 595 return new (Z) LoadLocalInstr(*local, TokenPosition::kNoSource); | 598 return new (Z) LoadLocalInstr(*local, TokenPosition::kNoSource); |
| 596 } | 599 } |
| 597 | 600 |
| 598 | 601 |
| 599 void IRRegExpMacroAssembler::StoreLocal(LocalVariable* local, Value* value) { | 602 void IRRegExpMacroAssembler::StoreLocal(LocalVariable* local, Value* value) { |
| 600 Do(new (Z) StoreLocalInstr(*local, value, TokenPosition::kNoSource)); | 603 Do(new (Z) StoreLocalInstr(*local, value, TokenPosition::kNoSource)); |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 | 1846 |
| 1844 return Bind(new (Z) LoadCodeUnitsInstr(pattern_val, index_val, characters, | 1847 return Bind(new (Z) LoadCodeUnitsInstr(pattern_val, index_val, characters, |
| 1845 specialization_cid_, | 1848 specialization_cid_, |
| 1846 TokenPosition::kNoSource)); | 1849 TokenPosition::kNoSource)); |
| 1847 } | 1850 } |
| 1848 | 1851 |
| 1849 | 1852 |
| 1850 #undef __ | 1853 #undef __ |
| 1851 | 1854 |
| 1852 } // namespace dart | 1855 } // namespace dart |
| OLD | NEW |