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

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

Issue 1739593002: Revert "Move precompilation-related flags to flags list." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
26 // Generic summary for call instructions that have all arguments pushed 32 // Generic summary for call instructions that have all arguments pushed
27 // on the stack and return the result in a fixed register RAX. 33 // on the stack and return the result in a fixed register RAX.
28 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 34 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
29 LocationSummary* result = new(zone) LocationSummary( 35 LocationSummary* result = new(zone) LocationSummary(
30 zone, 0, 0, LocationSummary::kCall); 36 zone, 0, 0, LocationSummary::kCall);
31 result->set_out(0, Location::RegisterLocation(RAX)); 37 result->set_out(0, Location::RegisterLocation(RAX));
32 return result; 38 return result;
33 } 39 }
34 40
35 41
(...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2114 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2109 // Allocate the array. R10 = length, RBX = element type. 2115 // Allocate the array. R10 = length, RBX = element type.
2110 const Register kLengthReg = R10; 2116 const Register kLengthReg = R10;
2111 const Register kElemTypeReg = RBX; 2117 const Register kElemTypeReg = RBX;
2112 const Register kResultReg = RAX; 2118 const Register kResultReg = RAX;
2113 ASSERT(locs()->in(0).reg() == kElemTypeReg); 2119 ASSERT(locs()->in(0).reg() == kElemTypeReg);
2114 ASSERT(locs()->in(1).reg() == kLengthReg); 2120 ASSERT(locs()->in(1).reg() == kLengthReg);
2115 2121
2116 Label slow_path, done; 2122 Label slow_path, done;
2117 if (compiler->is_optimizing() && 2123 if (compiler->is_optimizing() &&
2118 !FLAG_precompiled_mode && 2124 !FLAG_precompilation &&
2119 num_elements()->BindsToConstant() && 2125 num_elements()->BindsToConstant() &&
2120 num_elements()->BoundConstant().IsSmi()) { 2126 num_elements()->BoundConstant().IsSmi()) {
2121 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2127 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2122 if ((length >= 0) && (length <= Array::kMaxElements)) { 2128 if ((length >= 0) && (length <= Array::kMaxElements)) {
2123 Label slow_path, done; 2129 Label slow_path, done;
2124 InlineArrayAllocation(compiler, length, &slow_path, &done); 2130 InlineArrayAllocation(compiler, length, &slow_path, &done);
2125 __ Bind(&slow_path); 2131 __ Bind(&slow_path);
2126 __ PushObject(Object::null_object()); // Make room for the result. 2132 __ PushObject(Object::null_object()); // Make room for the result.
2127 __ pushq(kLengthReg); 2133 __ pushq(kLengthReg);
2128 __ pushq(kElemTypeReg); 2134 __ pushq(kElemTypeReg);
(...skipping 4267 matching lines...) Expand 10 before | Expand all | Expand 10 after
6396 __ Drop(1); 6402 __ Drop(1);
6397 __ popq(result); 6403 __ popq(result);
6398 } 6404 }
6399 6405
6400 6406
6401 } // namespace dart 6407 } // namespace dart
6402 6408
6403 #undef __ 6409 #undef __
6404 6410
6405 #endif // defined TARGET_ARCH_X64 6411 #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