| Index: runtime/vm/flow_graph_compiler_x64.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_compiler_x64.cc (revision 5205)
|
| +++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
|
| @@ -73,11 +73,11 @@
|
| void FlowGraphCompiler::LoadValue(Value* value) {
|
| if (value->IsConstant()) {
|
| ConstantVal* constant = value->AsConstant();
|
| - if (constant->instance().IsSmi()) {
|
| - int64_t imm = reinterpret_cast<int64_t>(constant->instance().raw());
|
| + if (constant->value().IsSmi()) {
|
| + int64_t imm = reinterpret_cast<int64_t>(constant->value().raw());
|
| __ movq(RAX, Immediate(imm));
|
| } else {
|
| - __ LoadObject(RAX, value->AsConstant()->instance());
|
| + __ LoadObject(RAX, value->AsConstant()->value());
|
| }
|
| } else {
|
| ASSERT(value->IsTemp());
|
| @@ -335,6 +335,19 @@
|
| }
|
|
|
|
|
| +void FlowGraphCompiler::VisitAllocateObject(AllocateObjectComp* comp) {
|
| + const Class& cls = Class::ZoneHandle(comp->constructor().owner());
|
| + const bool requires_type_arguments = cls.HasTypeArguments();
|
| + const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls));
|
| + const ExternalLabel label(cls.ToCString(), stub.EntryPoint());
|
| + GenerateCall(comp->token_index(), &label, PcDescriptors::kOther);
|
| + if (requires_type_arguments) {
|
| + __ popq(RCX); // Discard type arguments.
|
| + __ popq(RCX); // Discard instantiator type arguments.
|
| + }
|
| +}
|
| +
|
| +
|
| void FlowGraphCompiler::VisitBlocks(
|
| const GrowableArray<BlockEntryInstr*>& blocks) {
|
| for (intptr_t i = blocks.length() - 1; i >= 0; --i) {
|
|
|