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

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

Issue 10264011: Materialize all constant operands on the stack in the non-optimizing compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 1219
1220 void FlowGraphCompiler::VisitBind(BindInstr* instr) { 1220 void FlowGraphCompiler::VisitBind(BindInstr* instr) {
1221 instr->computation()->Accept(this); 1221 instr->computation()->Accept(this);
1222 __ pushq(RAX); 1222 __ pushq(RAX);
1223 } 1223 }
1224 1224
1225 1225
1226 void FlowGraphCompiler::VisitReturn(ReturnInstr* instr) { 1226 void FlowGraphCompiler::VisitReturn(ReturnInstr* instr) {
1227 LoadValue(RAX, instr->value()); 1227 LoadValue(RAX, instr->value());
1228 1228
1229 #ifdef DEBUG
Kevin Millikin (Google) 2012/04/30 14:54:53 This assert doesn't work anymore because we can ha
srdjan 2012/05/01 00:56:10 This assert code is/was essential for tracking/loc
1230 // Check that the entry stack size matches the exit stack size.
1231 __ movq(R10, RBP);
1232 __ subq(R10, RSP);
1233 __ cmpq(R10, Immediate(StackSize() * kWordSize));
1234 Label stack_ok;
1235 __ j(EQUAL, &stack_ok, Assembler::kNearJump);
1236 __ Stop("Exit stack size does not match the entry stack size.");
1237 __ Bind(&stack_ok);
1238 #endif // DEBUG.
1239
1240 if (FLAG_trace_functions) { 1229 if (FLAG_trace_functions) {
1241 __ pushq(RAX); // Preserve result. 1230 __ pushq(RAX); // Preserve result.
1242 const Function& function = 1231 const Function& function =
1243 Function::ZoneHandle(parsed_function_.function().raw()); 1232 Function::ZoneHandle(parsed_function_.function().raw());
1244 __ LoadObject(RBX, function); 1233 __ LoadObject(RBX, function);
1245 __ pushq(RBX); 1234 __ pushq(RBX);
1246 GenerateCallRuntime(AstNode::kNoId, 1235 GenerateCallRuntime(AstNode::kNoId,
1247 0, 1236 0,
1248 CatchClauseNode::kInvalidTryIndex, 1237 CatchClauseNode::kInvalidTryIndex,
1249 kTraceFunctionExitRuntimeEntry); 1238 kTraceFunctionExitRuntimeEntry);
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 ASSERT(exception_handlers_list_ != NULL); 1711 ASSERT(exception_handlers_list_ != NULL);
1723 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( 1712 const ExceptionHandlers& handlers = ExceptionHandlers::Handle(
1724 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); 1713 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint()));
1725 code.set_exception_handlers(handlers); 1714 code.set_exception_handlers(handlers);
1726 } 1715 }
1727 1716
1728 1717
1729 } // namespace dart 1718 } // namespace dart
1730 1719
1731 #endif // defined TARGET_ARCH_X64 1720 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/flow_graph_builder.cc ('K') | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698