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 10179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10190 Add<HPushArguments>(obj, key, Add<HConstant>(function_language_mode())); | 10190 Add<HPushArguments>(obj, key, Add<HConstant>(function_language_mode())); |
10191 // TODO(olivf) InvokeFunction produces a check for the parameter count, | 10191 // TODO(olivf) InvokeFunction produces a check for the parameter count, |
10192 // even though we are certain to pass the correct number of arguments here. | 10192 // even though we are certain to pass the correct number of arguments here. |
10193 HInstruction* instr = New<HInvokeFunction>(function, 3); | 10193 HInstruction* instr = New<HInvokeFunction>(function, 3); |
10194 return ast_context()->ReturnInstruction(instr, expr->id()); | 10194 return ast_context()->ReturnInstruction(instr, expr->id()); |
10195 } else if (proxy != NULL) { | 10195 } else if (proxy != NULL) { |
10196 Variable* var = proxy->var(); | 10196 Variable* var = proxy->var(); |
10197 if (var->IsUnallocated()) { | 10197 if (var->IsUnallocated()) { |
10198 Bailout(kDeleteWithGlobalVariable); | 10198 Bailout(kDeleteWithGlobalVariable); |
10199 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 10199 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
10200 // Result of deleting non-global variables is false. 'this' is not really | 10200 // Result of deleting non-global variables is false. 'this' is not |
10201 // a variable, though we implement it as one. The subexpression does not | 10201 // really a variable, though we implement it as one. The |
10202 // have side effects. | 10202 // subexpression does not have side effects. |
10203 HValue* value = var->HasThisName(isolate()) ? graph()->GetConstantTrue() | 10203 HValue* value = var->is_this() |
10204 : graph()->GetConstantFalse(); | 10204 ? graph()->GetConstantTrue() |
| 10205 : graph()->GetConstantFalse(); |
10205 return ast_context()->ReturnValue(value); | 10206 return ast_context()->ReturnValue(value); |
10206 } else { | 10207 } else { |
10207 Bailout(kDeleteWithNonGlobalVariable); | 10208 Bailout(kDeleteWithNonGlobalVariable); |
10208 } | 10209 } |
10209 } else { | 10210 } else { |
10210 // Result of deleting non-property, non-variable reference is true. | 10211 // Result of deleting non-property, non-variable reference is true. |
10211 // Evaluate the subexpression for side effects. | 10212 // Evaluate the subexpression for side effects. |
10212 CHECK_ALIVE(VisitForEffect(expr->expression())); | 10213 CHECK_ALIVE(VisitForEffect(expr->expression())); |
10213 return ast_context()->ReturnValue(graph()->GetConstantTrue()); | 10214 return ast_context()->ReturnValue(graph()->GetConstantTrue()); |
10214 } | 10215 } |
(...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13174 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13175 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13175 } | 13176 } |
13176 | 13177 |
13177 #ifdef DEBUG | 13178 #ifdef DEBUG |
13178 graph_->Verify(false); // No full verify. | 13179 graph_->Verify(false); // No full verify. |
13179 #endif | 13180 #endif |
13180 } | 13181 } |
13181 | 13182 |
13182 } // namespace internal | 13183 } // namespace internal |
13183 } // namespace v8 | 13184 } // namespace v8 |
OLD | NEW |