| 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
| (...skipping 8333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8344 HValue* receiver = environment()->ExpressionStackAt(1); | 8344 HValue* receiver = environment()->ExpressionStackAt(1); |
| 8345 if (!receiver->IsPhi() || receiver->OperandCount() != 1) return false; | 8345 if (!receiver->IsPhi() || receiver->OperandCount() != 1) return false; |
| 8346 if (cache->enumerable() != receiver->OperandAt(0)) return false; | 8346 if (cache->enumerable() != receiver->OperandAt(0)) return false; |
| 8347 Drop(3); // key, receiver, function | 8347 Drop(3); // key, receiver, function |
| 8348 Add<HCheckMapValue>(receiver, cache->map()); | 8348 Add<HCheckMapValue>(receiver, cache->map()); |
| 8349 ast_context()->ReturnValue(graph()->GetConstantTrue()); | 8349 ast_context()->ReturnValue(graph()->GetConstantTrue()); |
| 8350 return true; | 8350 return true; |
| 8351 } | 8351 } |
| 8352 case kStringCharCodeAt: | 8352 case kStringCharCodeAt: |
| 8353 case kStringCharAt: | 8353 case kStringCharAt: |
| 8354 if (argument_count == 2 && isolate()->IsStringBoundsCheckIntact()) { | 8354 if (argument_count == 2) { |
| 8355 HValue* index = Pop(); | 8355 HValue* index = Pop(); |
| 8356 HValue* string = Pop(); | 8356 HValue* string = Pop(); |
| 8357 Drop(1); // Function. | 8357 Drop(1); // Function. |
| 8358 HInstruction* char_code = | 8358 HInstruction* char_code = |
| 8359 BuildStringCharCodeAt(string, index); | 8359 BuildStringCharCodeAt(string, index); |
| 8360 if (id == kStringCharCodeAt) { | 8360 if (id == kStringCharCodeAt) { |
| 8361 ast_context()->ReturnInstruction(char_code, ast_id); | 8361 ast_context()->ReturnInstruction(char_code, ast_id); |
| 8362 return true; | 8362 return true; |
| 8363 } | 8363 } |
| 8364 AddInstruction(char_code); | 8364 AddInstruction(char_code); |
| (...skipping 4158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12523 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12523 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12524 } | 12524 } |
| 12525 | 12525 |
| 12526 #ifdef DEBUG | 12526 #ifdef DEBUG |
| 12527 graph_->Verify(false); // No full verify. | 12527 graph_->Verify(false); // No full verify. |
| 12528 #endif | 12528 #endif |
| 12529 } | 12529 } |
| 12530 | 12530 |
| 12531 } // namespace internal | 12531 } // namespace internal |
| 12532 } // namespace v8 | 12532 } // namespace v8 |
| OLD | NEW |