| Index: runtime/vm/flow_graph_compiler_x64.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_compiler_x64.cc (revision 5256)
|
| +++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
|
| @@ -73,11 +73,11 @@
|
| void FlowGraphCompiler::LoadValue(Register dst, 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(dst, Immediate(imm));
|
| } else {
|
| - __ LoadObject(dst, value->AsConstant()->instance());
|
| + __ LoadObject(dst, value->AsConstant()->value());
|
| }
|
| } else {
|
| ASSERT(value->IsTemp());
|
| @@ -332,6 +332,18 @@
|
| }
|
|
|
|
|
| +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);
|
| + for (intptr_t i = 0; i < comp->arguments().length(); i++) {
|
| + __ popq(RCX); // Discard allocation argument
|
| + }
|
| +}
|
| +
|
| +
|
| void FlowGraphCompiler::VisitCreateArray(CreateArrayComp* comp) {
|
| // 1. Allocate the array. R10 = length, RBX = element type.
|
| __ movq(R10, Immediate(Smi::RawValue(comp->ElementCount())));
|
|
|