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

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

Issue 1731743003: Move precompilation-related flags to flags list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make print_stop_message default false to fix build Created 4 years, 9 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
« 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/compiler.h" 10 #include "vm/compiler.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, allow_absolute_addresses);
28 DECLARE_FLAG(bool, emit_edge_counters);
29 DECLARE_FLAG(int, optimization_counter_threshold);
30 DECLARE_FLAG(bool, precompilation);
31 DECLARE_FLAG(bool, use_osr);
32
33 // Generic summary for call instructions that have all arguments pushed 27 // Generic summary for call instructions that have all arguments pushed
34 // on the stack and return the result in a fixed register V0. 28 // on the stack and return the result in a fixed register V0.
35 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 29 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
36 LocationSummary* result = new(zone) LocationSummary( 30 LocationSummary* result = new(zone) LocationSummary(
37 zone, 0, 0, LocationSummary::kCall); 31 zone, 0, 0, LocationSummary::kCall);
38 result->set_out(0, Location::RegisterLocation(V0)); 32 result->set_out(0, Location::RegisterLocation(V0));
39 return result; 33 return result;
40 } 34 }
41 35
42 36
(...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2219 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2226 __ Comment("CreateArrayInstr"); 2220 __ Comment("CreateArrayInstr");
2227 const Register kLengthReg = A1; 2221 const Register kLengthReg = A1;
2228 const Register kElemTypeReg = A0; 2222 const Register kElemTypeReg = A0;
2229 const Register kResultReg = V0; 2223 const Register kResultReg = V0;
2230 ASSERT(locs()->in(0).reg() == kElemTypeReg); 2224 ASSERT(locs()->in(0).reg() == kElemTypeReg);
2231 ASSERT(locs()->in(1).reg() == kLengthReg); 2225 ASSERT(locs()->in(1).reg() == kLengthReg);
2232 2226
2233 Label slow_path, done; 2227 Label slow_path, done;
2234 if (compiler->is_optimizing() && 2228 if (compiler->is_optimizing() &&
2235 !FLAG_precompilation && 2229 !FLAG_precompiled_mode &&
2236 num_elements()->BindsToConstant() && 2230 num_elements()->BindsToConstant() &&
2237 num_elements()->BoundConstant().IsSmi()) { 2231 num_elements()->BoundConstant().IsSmi()) {
2238 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2232 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2239 if ((length >= 0) && (length <= Array::kMaxElements)) { 2233 if ((length >= 0) && (length <= Array::kMaxElements)) {
2240 Label slow_path, done; 2234 Label slow_path, done;
2241 InlineArrayAllocation(compiler, length, &slow_path, &done); 2235 InlineArrayAllocation(compiler, length, &slow_path, &done);
2242 __ Bind(&slow_path); 2236 __ Bind(&slow_path);
2243 __ PushObject(Object::null_object()); // Make room for the result. 2237 __ PushObject(Object::null_object()); // Make room for the result.
2244 __ Push(kLengthReg); // length. 2238 __ Push(kLengthReg); // length.
2245 __ Push(kElemTypeReg); 2239 __ Push(kElemTypeReg);
(...skipping 3357 matching lines...) Expand 10 before | Expand all | Expand 10 after
5603 1, 5597 1,
5604 locs()); 5598 locs());
5605 __ lw(result, Address(SP, 1 * kWordSize)); 5599 __ lw(result, Address(SP, 1 * kWordSize));
5606 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5600 __ addiu(SP, SP, Immediate(2 * kWordSize));
5607 } 5601 }
5608 5602
5609 5603
5610 } // namespace dart 5604 } // namespace dart
5611 5605
5612 #endif // defined TARGET_ARCH_MIPS 5606 #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