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

Side by Side Diff: runtime/vm/intermediate_language_mips.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/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 "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
11 #include "vm/flow_graph.h" 11 #include "vm/flow_graph.h"
12 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
13 #include "vm/flow_graph_range_analysis.h" 13 #include "vm/flow_graph_range_analysis.h"
14 #include "vm/locations.h" 14 #include "vm/locations.h"
15 #include "vm/object_store.h" 15 #include "vm/object_store.h"
16 #include "vm/parser.h" 16 #include "vm/parser.h"
17 #include "vm/simulator.h" 17 #include "vm/simulator.h"
18 #include "vm/stack_frame.h" 18 #include "vm/stack_frame.h"
19 #include "vm/stub_code.h" 19 #include "vm/stub_code.h"
20 #include "vm/symbols.h" 20 #include "vm/symbols.h"
21 21
22 #define __ compiler->assembler()-> 22 #define __ compiler->assembler()->
23 23
24 namespace dart { 24 namespace dart {
25 25
26 DECLARE_FLAG(bool, emit_edge_counters); 26 DECLARE_FLAG(bool, emit_edge_counters);
27 DECLARE_FLAG(bool, enable_asserts);
28 DECLARE_FLAG(bool, enable_type_checks);
29 DECLARE_FLAG(int, optimization_counter_threshold); 27 DECLARE_FLAG(int, optimization_counter_threshold);
30 DECLARE_FLAG(bool, propagate_ic_data); 28 DECLARE_FLAG(bool, propagate_ic_data);
31 DECLARE_FLAG(bool, use_osr); 29 DECLARE_FLAG(bool, use_osr);
32 30
33 // Generic summary for call instructions that have all arguments pushed 31 // Generic summary for call instructions that have all arguments pushed
34 // on the stack and return the result in a fixed register V0. 32 // on the stack and return the result in a fixed register V0.
35 LocationSummary* Instruction::MakeCallSummary(Isolate* isolate) { 33 LocationSummary* Instruction::MakeCallSummary(Isolate* isolate) {
36 LocationSummary* result = new(isolate) LocationSummary( 34 LocationSummary* result = new(isolate) LocationSummary(
37 isolate, 0, 0, LocationSummary::kCall); 35 isolate, 0, 0, LocationSummary::kCall);
38 result->set_out(0, Location::RegisterLocation(V0)); 36 result->set_out(0, Location::RegisterLocation(V0));
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 391
394 static void EmitAssertBoolean(Register reg, 392 static void EmitAssertBoolean(Register reg,
395 intptr_t token_pos, 393 intptr_t token_pos,
396 intptr_t deopt_id, 394 intptr_t deopt_id,
397 LocationSummary* locs, 395 LocationSummary* locs,
398 FlowGraphCompiler* compiler) { 396 FlowGraphCompiler* compiler) {
399 // Check that the type of the value is allowed in conditional context. 397 // Check that the type of the value is allowed in conditional context.
400 // Call the runtime if the object is not bool::true or bool::false. 398 // Call the runtime if the object is not bool::true or bool::false.
401 ASSERT(locs->always_calls()); 399 ASSERT(locs->always_calls());
402 Label done; 400 Label done;
403 401 __ BranchEqual(reg, Bool::True(), &done);
404 if (FLAG_enable_type_checks) { 402 __ BranchEqual(reg, Bool::False(), &done);
405 __ BranchEqual(reg, Bool::True(), &done);
406 __ BranchEqual(reg, Bool::False(), &done);
407 } else {
408 ASSERT(FLAG_enable_asserts);
409 __ BranchNotEqual(reg, Object::null_instance(), &done);
410 }
411 403
412 __ Push(reg); // Push the source object. 404 __ Push(reg); // Push the source object.
413 compiler->GenerateRuntimeCall(token_pos, 405 compiler->GenerateRuntimeCall(token_pos,
414 deopt_id, 406 deopt_id,
415 kNonBoolTypeErrorRuntimeEntry, 407 kNonBoolTypeErrorRuntimeEntry,
416 1, 408 1,
417 locs); 409 locs);
418 // We should never return here. 410 // We should never return here.
419 __ break_(0); 411 __ break_(0);
420 __ Bind(&done); 412 __ Bind(&done);
(...skipping 5144 matching lines...) Expand 10 before | Expand all | Expand 10 after
5565 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 5557 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
5566 #if defined(DEBUG) 5558 #if defined(DEBUG)
5567 __ LoadImmediate(S4, kInvalidObjectPointer); 5559 __ LoadImmediate(S4, kInvalidObjectPointer);
5568 __ LoadImmediate(S5, kInvalidObjectPointer); 5560 __ LoadImmediate(S5, kInvalidObjectPointer);
5569 #endif 5561 #endif
5570 } 5562 }
5571 5563
5572 } // namespace dart 5564 } // namespace dart
5573 5565
5574 #endif // defined TARGET_ARCH_MIPS 5566 #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