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

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

Issue 772513003: Revert r42145 to fix co19 tests (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language_arm64.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_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 "vm/cpu.h" 10 #include "vm/cpu.h"
11 #include "vm/dart_entry.h" 11 #include "vm/dart_entry.h"
12 #include "vm/flow_graph.h" 12 #include "vm/flow_graph.h"
13 #include "vm/flow_graph_compiler.h" 13 #include "vm/flow_graph_compiler.h"
14 #include "vm/flow_graph_range_analysis.h" 14 #include "vm/flow_graph_range_analysis.h"
15 #include "vm/locations.h" 15 #include "vm/locations.h"
16 #include "vm/object_store.h" 16 #include "vm/object_store.h"
17 #include "vm/parser.h" 17 #include "vm/parser.h"
18 #include "vm/simulator.h" 18 #include "vm/simulator.h"
19 #include "vm/stack_frame.h" 19 #include "vm/stack_frame.h"
20 #include "vm/stub_code.h" 20 #include "vm/stub_code.h"
21 #include "vm/symbols.h" 21 #include "vm/symbols.h"
22 22
23 #define __ compiler->assembler()-> 23 #define __ compiler->assembler()->
24 24
25 namespace dart { 25 namespace dart {
26 26
27 DECLARE_FLAG(bool, emit_edge_counters); 27 DECLARE_FLAG(bool, emit_edge_counters);
28 DECLARE_FLAG(bool, enable_asserts);
29 DECLARE_FLAG(bool, enable_type_checks);
30 DECLARE_FLAG(int, optimization_counter_threshold); 28 DECLARE_FLAG(int, optimization_counter_threshold);
31 DECLARE_FLAG(bool, propagate_ic_data); 29 DECLARE_FLAG(bool, propagate_ic_data);
32 DECLARE_FLAG(bool, use_osr); 30 DECLARE_FLAG(bool, use_osr);
33 31
34 // Generic summary for call instructions that have all arguments pushed 32 // Generic summary for call instructions that have all arguments pushed
35 // on the stack and return the result in a fixed register R0. 33 // on the stack and return the result in a fixed register R0.
36 LocationSummary* Instruction::MakeCallSummary(Isolate* isolate) { 34 LocationSummary* Instruction::MakeCallSummary(Isolate* isolate) {
37 LocationSummary* result = new(isolate) LocationSummary( 35 LocationSummary* result = new(isolate) LocationSummary(
38 isolate, 0, 0, LocationSummary::kCall); 36 isolate, 0, 0, LocationSummary::kCall);
39 result->set_out(0, Location::RegisterLocation(R0)); 37 result->set_out(0, Location::RegisterLocation(R0));
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 369
372 static void EmitAssertBoolean(Register reg, 370 static void EmitAssertBoolean(Register reg,
373 intptr_t token_pos, 371 intptr_t token_pos,
374 intptr_t deopt_id, 372 intptr_t deopt_id,
375 LocationSummary* locs, 373 LocationSummary* locs,
376 FlowGraphCompiler* compiler) { 374 FlowGraphCompiler* compiler) {
377 // Check that the type of the value is allowed in conditional context. 375 // Check that the type of the value is allowed in conditional context.
378 // Call the runtime if the object is not bool::true or bool::false. 376 // Call the runtime if the object is not bool::true or bool::false.
379 ASSERT(locs->always_calls()); 377 ASSERT(locs->always_calls());
380 Label done; 378 Label done;
381 379 __ CompareObject(reg, Bool::True());
382 if (FLAG_enable_type_checks) { 380 __ b(&done, EQ);
383 __ CompareObject(reg, Bool::True()); 381 __ CompareObject(reg, Bool::False());
384 __ b(&done, EQ); 382 __ b(&done, EQ);
385 __ CompareObject(reg, Bool::False());
386 __ b(&done, EQ);
387 } else {
388 ASSERT(FLAG_enable_asserts);
389 __ CompareObject(reg, Object::null_instance());
390 __ b(&done, NE);
391 }
392 383
393 __ Push(reg); // Push the source object. 384 __ Push(reg); // Push the source object.
394 compiler->GenerateRuntimeCall(token_pos, 385 compiler->GenerateRuntimeCall(token_pos,
395 deopt_id, 386 deopt_id,
396 kNonBoolTypeErrorRuntimeEntry, 387 kNonBoolTypeErrorRuntimeEntry,
397 1, 388 1,
398 locs); 389 locs);
399 // We should never return here. 390 // We should never return here.
400 __ bkpt(0); 391 __ bkpt(0);
401 __ Bind(&done); 392 __ Bind(&done);
(...skipping 6509 matching lines...) Expand 10 before | Expand all | Expand 10 after
6911 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 6902 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
6912 #if defined(DEBUG) 6903 #if defined(DEBUG)
6913 __ LoadImmediate(R4, kInvalidObjectPointer); 6904 __ LoadImmediate(R4, kInvalidObjectPointer);
6914 __ LoadImmediate(R5, kInvalidObjectPointer); 6905 __ LoadImmediate(R5, kInvalidObjectPointer);
6915 #endif 6906 #endif
6916 } 6907 }
6917 6908
6918 } // namespace dart 6909 } // namespace dart
6919 6910
6920 #endif // defined TARGET_ARCH_ARM 6911 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698