Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: runtime/vm/intermediate_language_dbc.cc

Issue 1922173003: Adds LoadClassIdInstr to DBC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/globals.h" // Needed here to get TARGET_ARCH_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 M(ExtractNthOutput) \ 101 M(ExtractNthOutput) \
102 M(BinaryUint32Op) \ 102 M(BinaryUint32Op) \
103 M(ShiftUint32Op) \ 103 M(ShiftUint32Op) \
104 M(UnaryUint32Op) \ 104 M(UnaryUint32Op) \
105 M(UnboxedIntConverter) \ 105 M(UnboxedIntConverter) \
106 M(GrowRegExpStack) \ 106 M(GrowRegExpStack) \
107 M(BoxInteger32) \ 107 M(BoxInteger32) \
108 M(UnboxInteger32) \ 108 M(UnboxInteger32) \
109 M(CheckedSmiOp) \ 109 M(CheckedSmiOp) \
110 M(CheckArrayBound) \ 110 M(CheckArrayBound) \
111 M(CheckSmi) \ 111 M(CheckSmi) \
112 M(LoadClassId) \ 112 M(CheckClassId) \
113 M(CheckClassId) \ 113 M(CheckClass) \
114 M(CheckClass) \ 114 M(BinarySmiOp) \
115 M(BinarySmiOp) \ 115 M(TestSmi) \
116 M(TestSmi) \ 116 M(RelationalOp) \
117 M(RelationalOp) \ 117 M(EqualityCompare) \
118 M(EqualityCompare) \ 118 M(LoadIndexed)
119 M(LoadIndexed) \ 119
120 // Location summaries actually are not used by the unoptimizing DBC compiler 120 // Location summaries actually are not used by the unoptimizing DBC compiler
121 // because we don't allocate any registers. 121 // because we don't allocate any registers.
122 static LocationSummary* CreateLocationSummary(Zone* zone, 122 static LocationSummary* CreateLocationSummary(Zone* zone,
123 intptr_t num_inputs, 123 intptr_t num_inputs,
124 bool has_result) { 124 bool has_result) {
125 const intptr_t kNumTemps = 0; 125 const intptr_t kNumTemps = 0;
126 LocationSummary* locs = new(zone) LocationSummary( 126 LocationSummary* locs = new(zone) LocationSummary(
127 zone, num_inputs, kNumTemps, LocationSummary::kNoCall); 127 zone, num_inputs, kNumTemps, LocationSummary::kNoCall);
128 for (intptr_t i = 0; i < num_inputs; i++) { 128 for (intptr_t i = 0; i < num_inputs; i++) {
129 locs->set_in(i, Location::RequiresRegister()); 129 locs->set_in(i, Location::RequiresRegister());
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 if (HasTemp()) { 231 if (HasTemp()) {
232 __ StoreLocal( 232 __ StoreLocal(
233 (local().index() > 0) ? (-local().index()) : (-local().index() - 1)); 233 (local().index() > 0) ? (-local().index()) : (-local().index() - 1));
234 } else { 234 } else {
235 __ PopLocal( 235 __ PopLocal(
236 (local().index() > 0) ? (-local().index()) : (-local().index() - 1)); 236 (local().index() > 0) ? (-local().index()) : (-local().index() - 1));
237 } 237 }
238 } 238 }
239 239
240 240
241 EMIT_NATIVE_CODE(LoadClassId, 1, true) {
242 if (compiler->is_optimizing()) {
243 __ LoadClassId(locs()->out(0).reg(), locs()->in(0).reg());
244 } else {
245 __ LoadClassIdTOS();
246 }
247 }
248
249
241 EMIT_NATIVE_CODE(Constant, 0, true) { 250 EMIT_NATIVE_CODE(Constant, 0, true) {
242 const intptr_t kidx = __ AddConstant(value()); 251 const intptr_t kidx = __ AddConstant(value());
243 if (compiler->is_optimizing()) { 252 if (compiler->is_optimizing()) {
244 __ LoadConstant(locs()->out(0).reg(), kidx); 253 __ LoadConstant(locs()->out(0).reg(), kidx);
245 } else { 254 } else {
246 __ PushConstant(kidx); 255 __ PushConstant(kidx);
247 } 256 }
248 } 257 }
249 258
250 259
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 return kUnboxedFloat64x2; 703 return kUnboxedFloat64x2;
695 default: 704 default:
696 UNREACHABLE(); 705 UNREACHABLE();
697 return kTagged; 706 return kTagged;
698 } 707 }
699 } 708 }
700 709
701 } // namespace dart 710 } // namespace dart
702 711
703 #endif // defined TARGET_ARCH_DBC 712 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698