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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 6546050: Change the baseline compiler to match the Hydrogen graph builder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after
3407 3407
3408 case Token::VOID: { 3408 case Token::VOID: {
3409 Comment cmnt(masm_, "[ UnaryOperation (VOID)"); 3409 Comment cmnt(masm_, "[ UnaryOperation (VOID)");
3410 VisitForEffect(expr->expression()); 3410 VisitForEffect(expr->expression());
3411 context()->Plug(Heap::kUndefinedValueRootIndex); 3411 context()->Plug(Heap::kUndefinedValueRootIndex);
3412 break; 3412 break;
3413 } 3413 }
3414 3414
3415 case Token::NOT: { 3415 case Token::NOT: {
3416 Comment cmnt(masm_, "[ UnaryOperation (NOT)"); 3416 Comment cmnt(masm_, "[ UnaryOperation (NOT)");
3417 Label materialize_true, materialize_false; 3417 if (context()->IsEffect()) {
3418 Label* if_true = NULL; 3418 // Unary NOT has no side effects so it's only necessary to visit the
3419 Label* if_false = NULL; 3419 // subexpression. Match the optimizing compiler by not branching.
3420 Label* fall_through = NULL; 3420 VisitForEffect(expr->expression());
3421 } else {
3422 Label materialize_true, materialize_false;
3423 Label* if_true = NULL;
3424 Label* if_false = NULL;
3425 Label* fall_through = NULL;
3421 3426
3422 // Notice that the labels are swapped. 3427 // Notice that the labels are swapped.
3423 context()->PrepareTest(&materialize_true, &materialize_false, 3428 context()->PrepareTest(&materialize_true, &materialize_false,
3424 &if_false, &if_true, &fall_through); 3429 &if_false, &if_true, &fall_through);
3425 if (context()->IsTest()) ForwardBailoutToChild(expr); 3430 if (context()->IsTest()) ForwardBailoutToChild(expr);
3426 VisitForControl(expr->expression(), if_true, if_false, fall_through); 3431 VisitForControl(expr->expression(), if_true, if_false, fall_through);
3427 context()->Plug(if_false, if_true); // Labels swapped. 3432 context()->Plug(if_false, if_true); // Labels swapped.
3433 }
3428 break; 3434 break;
3429 } 3435 }
3430 3436
3431 case Token::TYPEOF: { 3437 case Token::TYPEOF: {
3432 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 3438 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
3433 { StackValueContext context(this); 3439 { StackValueContext context(this);
3434 VisitForTypeofValue(expr->expression()); 3440 VisitForTypeofValue(expr->expression());
3435 } 3441 }
3436 __ CallRuntime(Runtime::kTypeof, 1); 3442 __ CallRuntime(Runtime::kTypeof, 1);
3437 context()->Plug(r0); 3443 context()->Plug(r0);
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
4019 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4025 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4020 __ add(pc, r1, Operand(masm_->CodeObject())); 4026 __ add(pc, r1, Operand(masm_->CodeObject()));
4021 } 4027 }
4022 4028
4023 4029
4024 #undef __ 4030 #undef __
4025 4031
4026 } } // namespace v8::internal 4032 } } // namespace v8::internal
4027 4033
4028 #endif // V8_TARGET_ARCH_ARM 4034 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698