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

Side by Side Diff: runtime/vm/intermediate_language_arm.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
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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 258 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
259 Register obj = locs()->in(0).reg(); 259 Register obj = locs()->in(0).reg();
260 Register result = locs()->out().reg(); 260 Register result = locs()->out().reg();
261 261
262 EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler); 262 EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler);
263 ASSERT(obj == result); 263 ASSERT(obj == result);
264 } 264 }
265 265
266 266
267 LocationSummary* ArgumentDefinitionTestInstr::MakeLocationSummary() const {
268 const intptr_t kNumInputs = 1;
269 const intptr_t kNumTemps = 0;
270 LocationSummary* locs =
271 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
272 locs->set_in(0, Location::RegisterLocation(R0));
273 locs->set_out(Location::RegisterLocation(R0));
274 return locs;
275 }
276
277
278 void ArgumentDefinitionTestInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
279 Register saved_args_desc = locs()->in(0).reg();
280 Register result = locs()->out().reg();
281
282 // Push the result place holder initialized to NULL.
283 __ PushObject(Object::ZoneHandle());
284 __ LoadImmediate(IP, Smi::RawValue(formal_parameter_index()));
285 __ Push(IP);
286 __ PushObject(formal_parameter_name());
287 __ Push(saved_args_desc);
288 compiler->GenerateCallRuntime(token_pos(),
289 deopt_id(),
290 kArgumentDefinitionTestRuntimeEntry,
291 locs());
292 __ Drop(3);
293 __ Pop(result); // Pop bool result.
294 }
295
296
297 static Condition TokenKindToSmiCondition(Token::Kind kind) { 267 static Condition TokenKindToSmiCondition(Token::Kind kind) {
298 switch (kind) { 268 switch (kind) {
299 case Token::kEQ: return EQ; 269 case Token::kEQ: return EQ;
300 case Token::kNE: return NE; 270 case Token::kNE: return NE;
301 case Token::kLT: return LT; 271 case Token::kLT: return LT;
302 case Token::kGT: return GT; 272 case Token::kGT: return GT;
303 case Token::kLTE: return LE; 273 case Token::kLTE: return LE;
304 case Token::kGTE: return GE; 274 case Token::kGTE: return GE;
305 default: 275 default:
306 UNREACHABLE(); 276 UNREACHABLE();
(...skipping 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after
3627 compiler->GenerateCall(token_pos(), 3597 compiler->GenerateCall(token_pos(),
3628 &label, 3598 &label,
3629 PcDescriptors::kOther, 3599 PcDescriptors::kOther,
3630 locs()); 3600 locs());
3631 __ Drop(2); // Discard type arguments and receiver. 3601 __ Drop(2); // Discard type arguments and receiver.
3632 } 3602 }
3633 3603
3634 } // namespace dart 3604 } // namespace dart
3635 3605
3636 #endif // defined TARGET_ARCH_ARM 3606 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698