OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 NestedStatement* current = nesting_stack_; | 1204 NestedStatement* current = nesting_stack_; |
1205 int stack_depth = 0; | 1205 int stack_depth = 0; |
1206 int context_length = 0; | 1206 int context_length = 0; |
1207 while (current != NULL) { | 1207 while (current != NULL) { |
1208 current = current->Exit(&stack_depth, &context_length); | 1208 current = current->Exit(&stack_depth, &context_length); |
1209 } | 1209 } |
1210 __ Drop(stack_depth); | 1210 __ Drop(stack_depth); |
1211 } | 1211 } |
1212 | 1212 |
1213 | 1213 |
1214 void FullCodeGenerator::EmitPropertyKey(ObjectLiteralProperty* property) { | 1214 void FullCodeGenerator::EmitPropertyKey(ObjectLiteralProperty* property, |
| 1215 BailoutId bailout_id) { |
1215 VisitForStackValue(property->key()); | 1216 VisitForStackValue(property->key()); |
1216 __ InvokeBuiltin(Builtins::TO_NAME, CALL_FUNCTION); | 1217 __ InvokeBuiltin(Builtins::TO_NAME, CALL_FUNCTION); |
| 1218 PrepareForBailoutForId(bailout_id, NO_REGISTERS); |
1217 __ Push(result_register()); | 1219 __ Push(result_register()); |
1218 } | 1220 } |
1219 | 1221 |
1220 | 1222 |
1221 void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { | 1223 void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { |
1222 Comment cmnt(masm_, "[ ReturnStatement"); | 1224 Comment cmnt(masm_, "[ ReturnStatement"); |
1223 SetStatementPosition(stmt); | 1225 SetStatementPosition(stmt); |
1224 Expression* expr = stmt->expression(); | 1226 Expression* expr = stmt->expression(); |
1225 VisitForAccumulatorValue(expr); | 1227 VisitForAccumulatorValue(expr); |
1226 EmitUnwindBeforeReturn(); | 1228 EmitUnwindBeforeReturn(); |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 } | 1828 } |
1827 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1829 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
1828 codegen_->scope_ = saved_scope_; | 1830 codegen_->scope_ = saved_scope_; |
1829 } | 1831 } |
1830 | 1832 |
1831 | 1833 |
1832 #undef __ | 1834 #undef __ |
1833 | 1835 |
1834 | 1836 |
1835 } } // namespace v8::internal | 1837 } } // namespace v8::internal |
OLD | NEW |