Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3349 function_state_(NULL), | 3349 function_state_(NULL), |
| 3350 initial_function_state_(this, info, NORMAL_RETURN, 0), | 3350 initial_function_state_(this, info, NORMAL_RETURN, 0), |
| 3351 ast_context_(NULL), | 3351 ast_context_(NULL), |
| 3352 break_scope_(NULL), | 3352 break_scope_(NULL), |
| 3353 inlined_count_(0), | 3353 inlined_count_(0), |
| 3354 globals_(10, info->zone()), | 3354 globals_(10, info->zone()), |
| 3355 osr_(new(info->zone()) HOsrBuilder(this)) { | 3355 osr_(new(info->zone()) HOsrBuilder(this)) { |
| 3356 // This is not initialized in the initializer list because the | 3356 // This is not initialized in the initializer list because the |
| 3357 // constructor for the initial state relies on function_state_ == NULL | 3357 // constructor for the initial state relies on function_state_ == NULL |
| 3358 // to know it's the initial state. | 3358 // to know it's the initial state. |
| 3359 function_state_= &initial_function_state_; | 3359 function_state_ = &initial_function_state_; |
|
ulan
2015/03/20 10:56:54
Nit: this probably belongs to another CL, but I am
Erik Corry
2015/03/20 11:39:23
git cl won't let me omit this change for some reas
| |
| 3360 InitializeAstVisitor(info->zone()); | 3360 InitializeAstVisitor(info->zone()); |
| 3361 if (FLAG_hydrogen_track_positions) { | 3361 if (FLAG_hydrogen_track_positions) { |
| 3362 SetSourcePosition(info->shared_info()->start_position()); | 3362 SetSourcePosition(info->shared_info()->start_position()); |
| 3363 } | 3363 } |
| 3364 } | 3364 } |
| 3365 | 3365 |
| 3366 | 3366 |
| 3367 HBasicBlock* HOptimizedGraphBuilder::CreateJoin(HBasicBlock* first, | 3367 HBasicBlock* HOptimizedGraphBuilder::CreateJoin(HBasicBlock* first, |
| 3368 HBasicBlock* second, | 3368 HBasicBlock* second, |
| 3369 BailoutId join_id) { | 3369 BailoutId join_id) { |
| (...skipping 6952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10322 shr = HShr::cast(left); | 10322 shr = HShr::cast(left); |
| 10323 } else { | 10323 } else { |
| 10324 return false; | 10324 return false; |
| 10325 } | 10325 } |
| 10326 if (shl->left() != shr->left()) return false; | 10326 if (shl->left() != shr->left()) return false; |
| 10327 | 10327 |
| 10328 if (!ShiftAmountsAllowReplaceByRotate(shl->right(), shr->right()) && | 10328 if (!ShiftAmountsAllowReplaceByRotate(shl->right(), shr->right()) && |
| 10329 !ShiftAmountsAllowReplaceByRotate(shr->right(), shl->right())) { | 10329 !ShiftAmountsAllowReplaceByRotate(shr->right(), shl->right())) { |
| 10330 return false; | 10330 return false; |
| 10331 } | 10331 } |
| 10332 *operand= shr->left(); | 10332 *operand = shr->left(); |
| 10333 *shift_amount = shr->right(); | 10333 *shift_amount = shr->right(); |
| 10334 return true; | 10334 return true; |
| 10335 } | 10335 } |
| 10336 | 10336 |
| 10337 | 10337 |
| 10338 bool CanBeZero(HValue* right) { | 10338 bool CanBeZero(HValue* right) { |
| 10339 if (right->IsConstant()) { | 10339 if (right->IsConstant()) { |
| 10340 HConstant* right_const = HConstant::cast(right); | 10340 HConstant* right_const = HConstant::cast(right); |
| 10341 if (right_const->HasInteger32Value() && | 10341 if (right_const->HasInteger32Value() && |
| 10342 (right_const->Integer32Value() & 0x1f) != 0) { | 10342 (right_const->Integer32Value() & 0x1f) != 0) { |
| (...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12739 if (ShouldProduceTraceOutput()) { | 12739 if (ShouldProduceTraceOutput()) { |
| 12740 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12740 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12741 } | 12741 } |
| 12742 | 12742 |
| 12743 #ifdef DEBUG | 12743 #ifdef DEBUG |
| 12744 graph_->Verify(false); // No full verify. | 12744 graph_->Verify(false); // No full verify. |
| 12745 #endif | 12745 #endif |
| 12746 } | 12746 } |
| 12747 | 12747 |
| 12748 } } // namespace v8::internal | 12748 } } // namespace v8::internal |
| OLD | NEW |