| 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/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
| 10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
| (...skipping 11376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11387 HHasInPrototypeChainAndBranch* result = | 11387 HHasInPrototypeChainAndBranch* result = |
| 11388 New<HHasInPrototypeChainAndBranch>(left, prototype); | 11388 New<HHasInPrototypeChainAndBranch>(left, prototype); |
| 11389 return ast_context()->ReturnControl(result, expr->id()); | 11389 return ast_context()->ReturnControl(result, expr->id()); |
| 11390 } | 11390 } |
| 11391 } | 11391 } |
| 11392 | 11392 |
| 11393 HInstanceOf* result = New<HInstanceOf>(left, right); | 11393 HInstanceOf* result = New<HInstanceOf>(left, right); |
| 11394 return ast_context()->ReturnInstruction(result, expr->id()); | 11394 return ast_context()->ReturnInstruction(result, expr->id()); |
| 11395 | 11395 |
| 11396 } else if (op == Token::IN) { | 11396 } else if (op == Token::IN) { |
| 11397 HValue* function = AddLoadJSBuiltin(Context::IN_BUILTIN_INDEX); | |
| 11398 Add<HPushArguments>(left, right); | 11397 Add<HPushArguments>(left, right); |
| 11399 // TODO(olivf) InvokeFunction produces a check for the parameter count, | 11398 HInstruction* result = |
| 11400 // even though we are certain to pass the correct number of arguments here. | 11399 New<HCallRuntime>(Runtime::FunctionForId(Runtime::kHasProperty), 2); |
| 11401 HInstruction* result = New<HInvokeFunction>(function, 2); | |
| 11402 return ast_context()->ReturnInstruction(result, expr->id()); | 11400 return ast_context()->ReturnInstruction(result, expr->id()); |
| 11403 } | 11401 } |
| 11404 | 11402 |
| 11405 PushBeforeSimulateBehavior push_behavior = | 11403 PushBeforeSimulateBehavior push_behavior = |
| 11406 ast_context()->IsEffect() ? NO_PUSH_BEFORE_SIMULATE | 11404 ast_context()->IsEffect() ? NO_PUSH_BEFORE_SIMULATE |
| 11407 : PUSH_BEFORE_SIMULATE; | 11405 : PUSH_BEFORE_SIMULATE; |
| 11408 HControlInstruction* compare = BuildCompareInstruction( | 11406 HControlInstruction* compare = BuildCompareInstruction( |
| 11409 op, left, right, left_type, right_type, combined_type, | 11407 op, left, right, left_type, right_type, combined_type, |
| 11410 ScriptPositionToSourcePosition(expr->left()->position()), | 11408 ScriptPositionToSourcePosition(expr->left()->position()), |
| 11411 ScriptPositionToSourcePosition(expr->right()->position()), | 11409 ScriptPositionToSourcePosition(expr->right()->position()), |
| (...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13446 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13444 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13447 } | 13445 } |
| 13448 | 13446 |
| 13449 #ifdef DEBUG | 13447 #ifdef DEBUG |
| 13450 graph_->Verify(false); // No full verify. | 13448 graph_->Verify(false); // No full verify. |
| 13451 #endif | 13449 #endif |
| 13452 } | 13450 } |
| 13453 | 13451 |
| 13454 } // namespace internal | 13452 } // namespace internal |
| 13455 } // namespace v8 | 13453 } // namespace v8 |
| OLD | NEW |