OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 7262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7273 | 7273 |
7274 | 7274 |
7275 bool HGraphBuilder::TryInlineGetter(Handle<JSFunction> getter, | 7275 bool HGraphBuilder::TryInlineGetter(Handle<JSFunction> getter, |
7276 Property* prop) { | 7276 Property* prop) { |
7277 return TryInline(CALL_AS_METHOD, | 7277 return TryInline(CALL_AS_METHOD, |
7278 getter, | 7278 getter, |
7279 0, | 7279 0, |
7280 NULL, | 7280 NULL, |
7281 prop->id(), | 7281 prop->id(), |
7282 prop->LoadId(), | 7282 prop->LoadId(), |
7283 NORMAL_RETURN); | 7283 GETTER_CALL_RETURN); |
7284 } | 7284 } |
7285 | 7285 |
7286 | 7286 |
7287 bool HGraphBuilder::TryInlineSetter(Handle<JSFunction> setter, | 7287 bool HGraphBuilder::TryInlineSetter(Handle<JSFunction> setter, |
7288 Assignment* assignment, | 7288 Assignment* assignment, |
7289 HValue* implicit_return_value) { | 7289 HValue* implicit_return_value) { |
7290 return TryInline(CALL_AS_METHOD, | 7290 return TryInline(CALL_AS_METHOD, |
7291 setter, | 7291 setter, |
7292 1, | 7292 1, |
7293 implicit_return_value, | 7293 implicit_return_value, |
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9587 | 9587 |
9588 HEnvironment* outer = Copy(); | 9588 HEnvironment* outer = Copy(); |
9589 outer->Drop(arguments + 1); // Including receiver. | 9589 outer->Drop(arguments + 1); // Including receiver. |
9590 outer->ClearHistory(); | 9590 outer->ClearHistory(); |
9591 | 9591 |
9592 if (inlining_kind == CONSTRUCT_CALL_RETURN) { | 9592 if (inlining_kind == CONSTRUCT_CALL_RETURN) { |
9593 // Create artificial constructor stub environment. The receiver should | 9593 // Create artificial constructor stub environment. The receiver should |
9594 // actually be the constructor function, but we pass the newly allocated | 9594 // actually be the constructor function, but we pass the newly allocated |
9595 // object instead, DoComputeConstructStubFrame() relies on that. | 9595 // object instead, DoComputeConstructStubFrame() relies on that. |
9596 outer = CreateStubEnvironment(outer, target, JS_CONSTRUCT, arguments); | 9596 outer = CreateStubEnvironment(outer, target, JS_CONSTRUCT, arguments); |
| 9597 } else if (inlining_kind == GETTER_CALL_RETURN) { |
| 9598 // We need an additional StackFrame::INTERNAL frame for restoring the |
| 9599 // correct context. |
| 9600 outer = CreateStubEnvironment(outer, target, JS_GETTER, arguments); |
9597 } else if (inlining_kind == SETTER_CALL_RETURN) { | 9601 } else if (inlining_kind == SETTER_CALL_RETURN) { |
9598 // We need an additional StackFrame::INTERNAL frame for temporarily saving | 9602 // We need an additional StackFrame::INTERNAL frame for temporarily saving |
9599 // the argument of the setter, see StoreStubCompiler::CompileStoreViaSetter. | 9603 // the argument of the setter, see StoreStubCompiler::CompileStoreViaSetter. |
9600 outer = CreateStubEnvironment(outer, target, JS_SETTER, arguments); | 9604 outer = CreateStubEnvironment(outer, target, JS_SETTER, arguments); |
9601 } | 9605 } |
9602 | 9606 |
9603 if (arity != arguments) { | 9607 if (arity != arguments) { |
9604 // Create artificial arguments adaptation environment. | 9608 // Create artificial arguments adaptation environment. |
9605 outer = CreateStubEnvironment(outer, target, ARGUMENTS_ADAPTOR, arguments); | 9609 outer = CreateStubEnvironment(outer, target, ARGUMENTS_ADAPTOR, arguments); |
9606 } | 9610 } |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9972 } | 9976 } |
9973 } | 9977 } |
9974 | 9978 |
9975 #ifdef DEBUG | 9979 #ifdef DEBUG |
9976 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 9980 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
9977 if (allocator_ != NULL) allocator_->Verify(); | 9981 if (allocator_ != NULL) allocator_->Verify(); |
9978 #endif | 9982 #endif |
9979 } | 9983 } |
9980 | 9984 |
9981 } } // namespace v8::internal | 9985 } } // namespace v8::internal |
OLD | NEW |