| 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.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 current->Exit(&context_length); | 1000 current->Exit(&context_length); |
| 1001 DCHECK_EQ(-1, context_length); | 1001 DCHECK_EQ(-1, context_length); |
| 1002 current->AsTryFinally()->deferred_commands()->RecordReturn(); | 1002 current->AsTryFinally()->deferred_commands()->RecordReturn(); |
| 1003 return; | 1003 return; |
| 1004 } | 1004 } |
| 1005 current = current->Exit(&context_length); | 1005 current = current->Exit(&context_length); |
| 1006 } | 1006 } |
| 1007 EmitReturnSequence(); | 1007 EmitReturnSequence(); |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
| 1011 SetExpressionPosition(prop); |
| 1012 Literal* key = prop->key()->AsLiteral(); |
| 1013 DCHECK(!key->value()->IsSmi()); |
| 1014 DCHECK(!prop->IsSuperAccess()); |
| 1015 |
| 1016 __ Move(LoadDescriptor::NameRegister(), key->value()); |
| 1017 __ Move(LoadDescriptor::SlotRegister(), |
| 1018 SmiFromSlot(prop->PropertyFeedbackSlot())); |
| 1019 CallLoadIC(NOT_INSIDE_TYPEOF); |
| 1020 } |
| 1021 |
| 1010 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { | 1022 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { |
| 1011 // Stack: receiver, home_object | 1023 // Stack: receiver, home_object |
| 1012 SetExpressionPosition(prop); | 1024 SetExpressionPosition(prop); |
| 1013 Literal* key = prop->key()->AsLiteral(); | 1025 Literal* key = prop->key()->AsLiteral(); |
| 1014 DCHECK(!key->value()->IsSmi()); | 1026 DCHECK(!key->value()->IsSmi()); |
| 1015 DCHECK(prop->IsSuperAccess()); | 1027 DCHECK(prop->IsSuperAccess()); |
| 1016 | 1028 |
| 1017 PushOperand(key->value()); | 1029 PushOperand(key->value()); |
| 1018 CallRuntimeWithOperands(Runtime::kLoadFromSuper); | 1030 CallRuntimeWithOperands(Runtime::kLoadFromSuper); |
| 1019 } | 1031 } |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1895 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1884 var->initializer_position() >= proxy->position(); | 1896 var->initializer_position() >= proxy->position(); |
| 1885 } | 1897 } |
| 1886 | 1898 |
| 1887 | 1899 |
| 1888 #undef __ | 1900 #undef __ |
| 1889 | 1901 |
| 1890 | 1902 |
| 1891 } // namespace internal | 1903 } // namespace internal |
| 1892 } // namespace v8 | 1904 } // namespace v8 |
| OLD | NEW |