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

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

Issue 1162033005: Fix http://dartbug.com/23578: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update to ToT. Created 5 years, 6 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
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(int, optimization_counter_threshold); 27 DECLARE_FLAG(int, optimization_counter_threshold);
29 DECLARE_FLAG(bool, use_osr); 28 DECLARE_FLAG(bool, use_osr);
30 29
31 // Generic summary for call instructions that have all arguments pushed 30 // Generic summary for call instructions that have all arguments pushed
32 // on the stack and return the result in a fixed register V0. 31 // on the stack and return the result in a fixed register V0.
33 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 32 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
34 LocationSummary* result = new(zone) LocationSummary( 33 LocationSummary* result = new(zone) LocationSummary(
35 zone, 0, 0, LocationSummary::kCall); 34 zone, 0, 0, LocationSummary::kCall);
36 result->set_out(0, Location::RegisterLocation(V0)); 35 result->set_out(0, Location::RegisterLocation(V0));
37 return result; 36 return result;
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 static void EmitAssertBoolean(Register reg, 419 static void EmitAssertBoolean(Register reg,
421 intptr_t token_pos, 420 intptr_t token_pos,
422 intptr_t deopt_id, 421 intptr_t deopt_id,
423 LocationSummary* locs, 422 LocationSummary* locs,
424 FlowGraphCompiler* compiler) { 423 FlowGraphCompiler* compiler) {
425 // Check that the type of the value is allowed in conditional context. 424 // Check that the type of the value is allowed in conditional context.
426 // Call the runtime if the object is not bool::true or bool::false. 425 // Call the runtime if the object is not bool::true or bool::false.
427 ASSERT(locs->always_calls()); 426 ASSERT(locs->always_calls());
428 Label done; 427 Label done;
429 428
430 if (Isolate::Current()->TypeChecksEnabled()) { 429 if (Isolate::Current()->flags().type_checks()) {
431 __ BranchEqual(reg, Bool::True(), &done); 430 __ BranchEqual(reg, Bool::True(), &done);
432 __ BranchEqual(reg, Bool::False(), &done); 431 __ BranchEqual(reg, Bool::False(), &done);
433 } else { 432 } else {
434 ASSERT(FLAG_enable_asserts); 433 ASSERT(Isolate::Current()->flags().asserts());
435 __ BranchNotEqual(reg, Object::null_instance(), &done); 434 __ BranchNotEqual(reg, Object::null_instance(), &done);
436 } 435 }
437 436
438 __ Push(reg); // Push the source object. 437 __ Push(reg); // Push the source object.
439 compiler->GenerateRuntimeCall(token_pos, 438 compiler->GenerateRuntimeCall(token_pos,
440 deopt_id, 439 deopt_id,
441 kNonBoolTypeErrorRuntimeEntry, 440 kNonBoolTypeErrorRuntimeEntry,
442 1, 441 1,
443 locs); 442 locs);
444 // We should never return here. 443 // We should never return here.
(...skipping 5178 matching lines...) Expand 10 before | Expand all | Expand 10 after
5623 1, 5622 1,
5624 locs()); 5623 locs());
5625 __ lw(result, Address(SP, 1 * kWordSize)); 5624 __ lw(result, Address(SP, 1 * kWordSize));
5626 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5625 __ addiu(SP, SP, Immediate(2 * kWordSize));
5627 } 5626 }
5628 5627
5629 5628
5630 } // namespace dart 5629 } // namespace dart
5631 5630
5632 #endif // defined TARGET_ARCH_MIPS 5631 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698