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

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

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 261 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
262 Register obj = locs()->in(0).reg(); 262 Register obj = locs()->in(0).reg();
263 Register result = locs()->out().reg(); 263 Register result = locs()->out().reg();
264 264
265 __ TraceSimMsg("AssertBooleanInstr"); 265 __ TraceSimMsg("AssertBooleanInstr");
266 EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler); 266 EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler);
267 ASSERT(obj == result); 267 ASSERT(obj == result);
268 } 268 }
269 269
270 270
271 LocationSummary* ArgumentDefinitionTestInstr::MakeLocationSummary() const {
272 const intptr_t kNumInputs = 1;
273 const intptr_t kNumTemps = 0;
274 LocationSummary* locs =
275 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
276 locs->set_in(0, Location::RegisterLocation(T0));
277 locs->set_out(Location::RegisterLocation(T0));
278 return locs;
279 }
280
281
282 void ArgumentDefinitionTestInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
283 Register saved_args_desc = locs()->in(0).reg();
284 Register result = locs()->out().reg();
285
286 __ TraceSimMsg("ArgumentDefinitionTestInstr");
287
288 __ addiu(SP, SP, Immediate(-4 * kWordSize));
289 // Push the result place holder initialized to NULL.
290 __ LoadObject(TMP1, Object::ZoneHandle());
291 __ sw(TMP1, Address(SP, 3 * kWordSize));
292 __ LoadImmediate(TMP1, Smi::RawValue(formal_parameter_index()));
293 __ sw(TMP1, Address(SP, 2 * kWordSize));
294 __ LoadObject(TMP1, formal_parameter_name());
295 __ sw(TMP1, Address(SP, 1 * kWordSize));
296 __ sw(saved_args_desc, Address(SP, 0 * kWordSize));
297 compiler->GenerateCallRuntime(token_pos(),
298 deopt_id(),
299 kArgumentDefinitionTestRuntimeEntry,
300 locs());
301 __ lw(result, Address(SP, 3 * kWordSize)); // Pop bool result.
302 __ addiu(SP, SP, Immediate(4 * kWordSize));
303 }
304
305
306 LocationSummary* EqualityCompareInstr::MakeLocationSummary() const { 271 LocationSummary* EqualityCompareInstr::MakeLocationSummary() const {
307 const intptr_t kNumInputs = 2; 272 const intptr_t kNumInputs = 2;
308 if (receiver_class_id() == kMintCid) { 273 if (receiver_class_id() == kMintCid) {
309 const intptr_t kNumTemps = 1; 274 const intptr_t kNumTemps = 1;
310 LocationSummary* locs = 275 LocationSummary* locs =
311 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 276 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
312 locs->set_in(0, Location::RequiresFpuRegister()); 277 locs->set_in(0, Location::RequiresFpuRegister());
313 locs->set_in(1, Location::RequiresFpuRegister()); 278 locs->set_in(1, Location::RequiresFpuRegister());
314 locs->set_temp(0, Location::RequiresRegister()); 279 locs->set_temp(0, Location::RequiresRegister());
315 locs->set_out(Location::RequiresRegister()); 280 locs->set_out(Location::RequiresRegister());
(...skipping 3453 matching lines...) Expand 10 before | Expand all | Expand 10 after
3769 compiler->GenerateCall(token_pos(), 3734 compiler->GenerateCall(token_pos(),
3770 &label, 3735 &label,
3771 PcDescriptors::kOther, 3736 PcDescriptors::kOther,
3772 locs()); 3737 locs());
3773 __ Drop(2); // Discard type arguments and receiver. 3738 __ Drop(2); // Discard type arguments and receiver.
3774 } 3739 }
3775 3740
3776 } // namespace dart 3741 } // namespace dart
3777 3742
3778 #endif // defined TARGET_ARCH_MIPS 3743 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698