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_; |
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 6968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10338 shr = HShr::cast(left); | 10338 shr = HShr::cast(left); |
10339 } else { | 10339 } else { |
10340 return false; | 10340 return false; |
10341 } | 10341 } |
10342 if (shl->left() != shr->left()) return false; | 10342 if (shl->left() != shr->left()) return false; |
10343 | 10343 |
10344 if (!ShiftAmountsAllowReplaceByRotate(shl->right(), shr->right()) && | 10344 if (!ShiftAmountsAllowReplaceByRotate(shl->right(), shr->right()) && |
10345 !ShiftAmountsAllowReplaceByRotate(shr->right(), shl->right())) { | 10345 !ShiftAmountsAllowReplaceByRotate(shr->right(), shl->right())) { |
10346 return false; | 10346 return false; |
10347 } | 10347 } |
10348 *operand= shr->left(); | 10348 *operand = shr->left(); |
10349 *shift_amount = shr->right(); | 10349 *shift_amount = shr->right(); |
10350 return true; | 10350 return true; |
10351 } | 10351 } |
10352 | 10352 |
10353 | 10353 |
10354 bool CanBeZero(HValue* right) { | 10354 bool CanBeZero(HValue* right) { |
10355 if (right->IsConstant()) { | 10355 if (right->IsConstant()) { |
10356 HConstant* right_const = HConstant::cast(right); | 10356 HConstant* right_const = HConstant::cast(right); |
10357 if (right_const->HasInteger32Value() && | 10357 if (right_const->HasInteger32Value() && |
10358 (right_const->Integer32Value() & 0x1f) != 0) { | 10358 (right_const->Integer32Value() & 0x1f) != 0) { |
(...skipping 2709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13068 if (ShouldProduceTraceOutput()) { | 13068 if (ShouldProduceTraceOutput()) { |
13069 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13069 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13070 } | 13070 } |
13071 | 13071 |
13072 #ifdef DEBUG | 13072 #ifdef DEBUG |
13073 graph_->Verify(false); // No full verify. | 13073 graph_->Verify(false); // No full verify. |
13074 #endif | 13074 #endif |
13075 } | 13075 } |
13076 | 13076 |
13077 } } // namespace v8::internal | 13077 } } // namespace v8::internal |
OLD | NEW |