| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 } | 410 } |
| 411 | 411 |
| 412 | 412 |
| 413 // ---------------------------------------------------------------------------- | 413 // ---------------------------------------------------------------------------- |
| 414 // Inlining support | 414 // Inlining support |
| 415 | 415 |
| 416 bool Declaration::IsInlineable() const { | 416 bool Declaration::IsInlineable() const { |
| 417 return proxy()->var()->IsStackAllocated(); | 417 return proxy()->var()->IsStackAllocated(); |
| 418 } | 418 } |
| 419 | 419 |
| 420 bool VariableDeclaration::IsInlineable() const { | 420 bool FunctionDeclaration::IsInlineable() const { |
| 421 return Declaration::IsInlineable() && fun() == NULL; | 421 return false; |
| 422 } | 422 } |
| 423 | 423 |
| 424 | 424 |
| 425 // ---------------------------------------------------------------------------- | 425 // ---------------------------------------------------------------------------- |
| 426 // Recording of type feedback | 426 // Recording of type feedback |
| 427 | 427 |
| 428 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 428 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 429 // Record type feedback from the oracle in the AST. | 429 // Record type feedback from the oracle in the AST. |
| 430 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); | 430 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); |
| 431 receiver_types_.Clear(); | 431 receiver_types_.Clear(); |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 entry_id_(AstNode::GetNextId(isolate)) { | 988 entry_id_(AstNode::GetNextId(isolate)) { |
| 989 } | 989 } |
| 990 | 990 |
| 991 | 991 |
| 992 #define INCREASE_NODE_COUNT(NodeType) \ | 992 #define INCREASE_NODE_COUNT(NodeType) \ |
| 993 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ | 993 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |
| 994 increase_node_count(); \ | 994 increase_node_count(); \ |
| 995 } | 995 } |
| 996 | 996 |
| 997 INCREASE_NODE_COUNT(VariableDeclaration) | 997 INCREASE_NODE_COUNT(VariableDeclaration) |
| 998 INCREASE_NODE_COUNT(FunctionDeclaration) |
| 998 INCREASE_NODE_COUNT(ModuleDeclaration) | 999 INCREASE_NODE_COUNT(ModuleDeclaration) |
| 999 INCREASE_NODE_COUNT(ModuleLiteral) | 1000 INCREASE_NODE_COUNT(ModuleLiteral) |
| 1000 INCREASE_NODE_COUNT(ModuleVariable) | 1001 INCREASE_NODE_COUNT(ModuleVariable) |
| 1001 INCREASE_NODE_COUNT(ModulePath) | 1002 INCREASE_NODE_COUNT(ModulePath) |
| 1002 INCREASE_NODE_COUNT(ModuleUrl) | 1003 INCREASE_NODE_COUNT(ModuleUrl) |
| 1003 INCREASE_NODE_COUNT(Block) | 1004 INCREASE_NODE_COUNT(Block) |
| 1004 INCREASE_NODE_COUNT(ExpressionStatement) | 1005 INCREASE_NODE_COUNT(ExpressionStatement) |
| 1005 INCREASE_NODE_COUNT(EmptyStatement) | 1006 INCREASE_NODE_COUNT(EmptyStatement) |
| 1006 INCREASE_NODE_COUNT(IfStatement) | 1007 INCREASE_NODE_COUNT(IfStatement) |
| 1007 INCREASE_NODE_COUNT(ContinueStatement) | 1008 INCREASE_NODE_COUNT(ContinueStatement) |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || | 1132 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || |
| 1132 node->name()->IsEqualTo(CStrVector("_Arguments")))) { | 1133 node->name()->IsEqualTo(CStrVector("_Arguments")))) { |
| 1133 // Don't inline the %_ArgumentsLength or %_Arguments because their | 1134 // Don't inline the %_ArgumentsLength or %_Arguments because their |
| 1134 // implementation will not work. There is no stack frame to get them | 1135 // implementation will not work. There is no stack frame to get them |
| 1135 // from. | 1136 // from. |
| 1136 add_flag(kDontInline); | 1137 add_flag(kDontInline); |
| 1137 } | 1138 } |
| 1138 } | 1139 } |
| 1139 | 1140 |
| 1140 } } // namespace v8::internal | 1141 } } // namespace v8::internal |
| OLD | NEW |