| OLD | NEW |
| 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 "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 __ popq(RBX); // Reciever. | 253 __ popq(RBX); // Reciever. |
| 254 __ pushq(RAX); | 254 __ pushq(RAX); |
| 255 __ pushq(RBX); | 255 __ pushq(RBX); |
| 256 __ pushq(RAX); | 256 __ pushq(RAX); |
| 257 EmitInstanceCall(comp->node_id(), comp->token_index(), function_name, 2, | 257 EmitInstanceCall(comp->node_id(), comp->token_index(), function_name, 2, |
| 258 Array::ZoneHandle(), 1); | 258 Array::ZoneHandle(), 1); |
| 259 __ popq(RAX); | 259 __ popq(RAX); |
| 260 } | 260 } |
| 261 | 261 |
| 262 | 262 |
| 263 void FlowGraphCompiler::VisitBooleanNegate(BooleanNegateComp* comp) { |
| 264 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); |
| 265 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); |
| 266 Label done; |
| 267 LoadValue(comp->value()); |
| 268 __ movq(RDX, RAX); |
| 269 __ LoadObject(RAX, bool_true); |
| 270 __ cmpq(RAX, RDX); |
| 271 __ j(NOT_EQUAL, &done, Assembler::kNearJump); |
| 272 __ LoadObject(RAX, bool_false); |
| 273 __ Bind(&done); |
| 274 } |
| 275 |
| 276 |
| 277 void FlowGraphCompiler::VisitInstanceOf(InstanceOfComp* comp) { |
| 278 Bailout("InstanceOf"); |
| 279 } |
| 280 |
| 281 |
| 263 void FlowGraphCompiler::VisitJoinEntry(JoinEntryInstr* instr) { | 282 void FlowGraphCompiler::VisitJoinEntry(JoinEntryInstr* instr) { |
| 264 Bailout("JoinEntryInstr"); | 283 Bailout("JoinEntryInstr"); |
| 265 } | 284 } |
| 266 | 285 |
| 267 | 286 |
| 268 void FlowGraphCompiler::VisitTargetEntry(TargetEntryInstr* instr) { | 287 void FlowGraphCompiler::VisitTargetEntry(TargetEntryInstr* instr) { |
| 269 // Since we don't handle branching control flow yet, there is nothing to do. | 288 // Since we don't handle branching control flow yet, there is nothing to do. |
| 270 } | 289 } |
| 271 | 290 |
| 272 | 291 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { | 507 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { |
| 489 // We don't compile exception handlers yet. | 508 // We don't compile exception handlers yet. |
| 490 code.set_exception_handlers( | 509 code.set_exception_handlers( |
| 491 ExceptionHandlers::Handle(ExceptionHandlers::New(0))); | 510 ExceptionHandlers::Handle(ExceptionHandlers::New(0))); |
| 492 } | 511 } |
| 493 | 512 |
| 494 | 513 |
| 495 } // namespace dart | 514 } // namespace dart |
| 496 | 515 |
| 497 #endif // defined TARGET_ARCH_X64 | 516 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |