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

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

Issue 9615025: Implement '==', '!=' and instanceof (without code generation). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.h » ('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) 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 __ popq(RBX); // Reciever. 268 __ popq(RBX); // Reciever.
269 __ pushq(RAX); 269 __ pushq(RAX);
270 __ pushq(RBX); 270 __ pushq(RBX);
271 __ pushq(RAX); 271 __ pushq(RAX);
272 EmitInstanceCall(comp->node_id(), comp->token_index(), function_name, 2, 272 EmitInstanceCall(comp->node_id(), comp->token_index(), function_name, 2,
273 Array::ZoneHandle(), 1); 273 Array::ZoneHandle(), 1);
274 __ popq(RAX); 274 __ popq(RAX);
275 } 275 }
276 276
277 277
278 void FlowGraphCompiler::VisitBooleanNegate(BooleanNegateComp* comp) {
279 const Bool& bool_true = Bool::ZoneHandle(Bool::True());
280 const Bool& bool_false = Bool::ZoneHandle(Bool::False());
281 Label done;
282 __ popq(RDX);
Kevin Millikin (Google) 2012/03/07 10:22:38 We can't assume comp->value() is on the stack. He
srdjan 2012/03/07 21:00:51 Fixed, added tests, also create BooleanNegateComp
283 __ LoadObject(RAX, bool_true);
284 __ cmpq(RAX, RDX);
285 __ j(NOT_EQUAL, &done, Assembler::kNearJump);
286 __ LoadObject(RAX, bool_false);
287 __ Bind(&done);
288 }
289
290
291 void FlowGraphCompiler::VisitInstanceOf(InstanceOfComp* comp) {
292 Bailout("InstanceOf");
293 }
294
295
278 void FlowGraphCompiler::VisitJoinEntry(JoinEntryInstr* instr) { 296 void FlowGraphCompiler::VisitJoinEntry(JoinEntryInstr* instr) {
279 Bailout("JoinEntryInstr"); 297 Bailout("JoinEntryInstr");
280 } 298 }
281 299
282 300
283 void FlowGraphCompiler::VisitTargetEntry(TargetEntryInstr* instr) { 301 void FlowGraphCompiler::VisitTargetEntry(TargetEntryInstr* instr) {
284 // Since we don't handle branching control flow yet, there is nothing to do. 302 // Since we don't handle branching control flow yet, there is nothing to do.
285 } 303 }
286 304
287 305
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { 499 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) {
482 // We don't compile exception handlers yet. 500 // We don't compile exception handlers yet.
483 code.set_exception_handlers( 501 code.set_exception_handlers(
484 ExceptionHandlers::Handle(ExceptionHandlers::New(0))); 502 ExceptionHandlers::Handle(ExceptionHandlers::New(0)));
485 } 503 }
486 504
487 505
488 } // namespace dart 506 } // namespace dart
489 507
490 #endif // defined TARGET_ARCH_X64 508 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698