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

Side by Side Diff: src/hydrogen.cc

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add more tests and fix some bugs Created 5 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 10587 matching lines...) Expand 10 before | Expand all | Expand 10 after
10598 break; 10598 break;
10599 case Token::SHR: 10599 case Token::SHR:
10600 instr = AddUncasted<HShr>(left, right); 10600 instr = AddUncasted<HShr>(left, right);
10601 if (instr->IsShr() && CanBeZero(right)) { 10601 if (instr->IsShr() && CanBeZero(right)) {
10602 graph()->RecordUint32Instruction(instr); 10602 graph()->RecordUint32Instruction(instr);
10603 } 10603 }
10604 break; 10604 break;
10605 case Token::SHL: 10605 case Token::SHL:
10606 instr = AddUncasted<HShl>(left, right); 10606 instr = AddUncasted<HShl>(left, right);
10607 break; 10607 break;
10608 case Token::EXP:
10609 instr = AddUncasted<HPower>(left, right);
10610 break;
10608 default: 10611 default:
10609 UNREACHABLE(); 10612 UNREACHABLE();
10610 } 10613 }
10611 } 10614 }
10612 10615
10613 if (instr->IsBinaryOperation()) { 10616 if (instr->IsBinaryOperation()) {
10614 HBinaryOperation* binop = HBinaryOperation::cast(instr); 10617 HBinaryOperation* binop = HBinaryOperation::cast(instr);
10615 binop->set_observed_input_representation(1, left_rep); 10618 binop->set_observed_input_representation(1, left_rep);
10616 binop->set_observed_input_representation(2, right_rep); 10619 binop->set_observed_input_representation(2, right_rep);
10617 binop->initialize_output_representation(result_rep); 10620 binop->initialize_output_representation(result_rep);
(...skipping 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after
13437 if (ShouldProduceTraceOutput()) { 13440 if (ShouldProduceTraceOutput()) {
13438 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13441 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13439 } 13442 }
13440 13443
13441 #ifdef DEBUG 13444 #ifdef DEBUG
13442 graph_->Verify(false); // No full verify. 13445 graph_->Verify(false); // No full verify.
13443 #endif 13446 #endif
13444 } 13447 }
13445 13448
13446 } } // namespace v8::internal 13449 } } // namespace v8::internal
OLDNEW
« src/compiler/typer.cc ('K') | « src/full-codegen.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698