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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_mips.cc ('k') | runtime/vm/intrinsifier_arm.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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/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, allow_absolute_addresses);
27 DECLARE_FLAG(bool, emit_edge_counters);
28 DECLARE_FLAG(int, optimization_counter_threshold);
29 DECLARE_FLAG(bool, use_osr);
30 DECLARE_FLAG(bool, precompilation);
31
32 // Generic summary for call instructions that have all arguments pushed 26 // Generic summary for call instructions that have all arguments pushed
33 // on the stack and return the result in a fixed register RAX. 27 // on the stack and return the result in a fixed register RAX.
34 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 28 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
35 LocationSummary* result = new(zone) LocationSummary( 29 LocationSummary* result = new(zone) LocationSummary(
36 zone, 0, 0, LocationSummary::kCall); 30 zone, 0, 0, LocationSummary::kCall);
37 result->set_out(0, Location::RegisterLocation(RAX)); 31 result->set_out(0, Location::RegisterLocation(RAX));
38 return result; 32 return result;
39 } 33 }
40 34
41 35
(...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2108 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2115 // Allocate the array. R10 = length, RBX = element type. 2109 // Allocate the array. R10 = length, RBX = element type.
2116 const Register kLengthReg = R10; 2110 const Register kLengthReg = R10;
2117 const Register kElemTypeReg = RBX; 2111 const Register kElemTypeReg = RBX;
2118 const Register kResultReg = RAX; 2112 const Register kResultReg = RAX;
2119 ASSERT(locs()->in(0).reg() == kElemTypeReg); 2113 ASSERT(locs()->in(0).reg() == kElemTypeReg);
2120 ASSERT(locs()->in(1).reg() == kLengthReg); 2114 ASSERT(locs()->in(1).reg() == kLengthReg);
2121 2115
2122 Label slow_path, done; 2116 Label slow_path, done;
2123 if (compiler->is_optimizing() && 2117 if (compiler->is_optimizing() &&
2124 !FLAG_precompilation && 2118 !FLAG_precompiled_mode &&
2125 num_elements()->BindsToConstant() && 2119 num_elements()->BindsToConstant() &&
2126 num_elements()->BoundConstant().IsSmi()) { 2120 num_elements()->BoundConstant().IsSmi()) {
2127 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2121 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2128 if ((length >= 0) && (length <= Array::kMaxElements)) { 2122 if ((length >= 0) && (length <= Array::kMaxElements)) {
2129 Label slow_path, done; 2123 Label slow_path, done;
2130 InlineArrayAllocation(compiler, length, &slow_path, &done); 2124 InlineArrayAllocation(compiler, length, &slow_path, &done);
2131 __ Bind(&slow_path); 2125 __ Bind(&slow_path);
2132 __ PushObject(Object::null_object()); // Make room for the result. 2126 __ PushObject(Object::null_object()); // Make room for the result.
2133 __ pushq(kLengthReg); 2127 __ pushq(kLengthReg);
2134 __ pushq(kElemTypeReg); 2128 __ pushq(kElemTypeReg);
(...skipping 4267 matching lines...) Expand 10 before | Expand all | Expand 10 after
6402 __ Drop(1); 6396 __ Drop(1);
6403 __ popq(result); 6397 __ popq(result);
6404 } 6398 }
6405 6399
6406 6400
6407 } // namespace dart 6401 } // namespace dart
6408 6402
6409 #undef __ 6403 #undef __
6410 6404
6411 #endif // defined TARGET_ARCH_X64 6405 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698