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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
6 | 6 |
7 #include "src/ast/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { | 1053 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { |
1054 SetExpressionPosition(prop); | 1054 SetExpressionPosition(prop); |
1055 | 1055 |
1056 EmitLoadSlot(LoadDescriptor::SlotRegister(), prop->PropertyFeedbackSlot()); | 1056 EmitLoadSlot(LoadDescriptor::SlotRegister(), prop->PropertyFeedbackSlot()); |
1057 | 1057 |
1058 Handle<Code> code = CodeFactory::KeyedLoadIC(isolate()).code(); | 1058 Handle<Code> code = CodeFactory::KeyedLoadIC(isolate()).code(); |
1059 __ Call(code, RelocInfo::CODE_TARGET); | 1059 __ Call(code, RelocInfo::CODE_TARGET); |
1060 RestoreContext(); | 1060 RestoreContext(); |
1061 } | 1061 } |
1062 | 1062 |
1063 void FullCodeGenerator::EmitPropertyKey(LiteralProperty* property, | |
1064 BailoutId bailout_id) { | |
1065 VisitForStackValue(property->key()); | |
1066 CallRuntimeWithOperands(Runtime::kToName); | |
1067 PrepareForBailoutForId(bailout_id, BailoutState::TOS_REGISTER); | |
1068 PushOperand(result_register()); | |
1069 } | |
1070 | |
1071 void FullCodeGenerator::EmitLoadSlot(Register destination, | 1063 void FullCodeGenerator::EmitLoadSlot(Register destination, |
1072 FeedbackVectorSlot slot) { | 1064 FeedbackVectorSlot slot) { |
1073 DCHECK(!slot.IsInvalid()); | 1065 DCHECK(!slot.IsInvalid()); |
1074 __ Move(destination, SmiFromSlot(slot)); | 1066 __ Move(destination, SmiFromSlot(slot)); |
1075 } | 1067 } |
1076 | 1068 |
1077 void FullCodeGenerator::EmitPushSlot(FeedbackVectorSlot slot) { | 1069 void FullCodeGenerator::EmitPushSlot(FeedbackVectorSlot slot) { |
1078 __ Push(SmiFromSlot(slot)); | 1070 __ Push(SmiFromSlot(slot)); |
1079 } | 1071 } |
1080 | 1072 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 return info_->has_simple_parameters(); | 1600 return info_->has_simple_parameters(); |
1609 } | 1601 } |
1610 | 1602 |
1611 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1603 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
1612 | 1604 |
1613 #undef __ | 1605 #undef __ |
1614 | 1606 |
1615 | 1607 |
1616 } // namespace internal | 1608 } // namespace internal |
1617 } // namespace v8 | 1609 } // namespace v8 |
OLD | NEW |