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 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 | 1076 |
1077 DONT_CACHE_NODE(ModuleLiteral) | 1077 DONT_CACHE_NODE(ModuleLiteral) |
1078 | 1078 |
1079 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { | 1079 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { |
1080 increase_node_count(); | 1080 increase_node_count(); |
1081 if (node->is_jsruntime()) { | 1081 if (node->is_jsruntime()) { |
1082 // Don't try to inline JS runtime calls because we don't (currently) even | 1082 // Don't try to inline JS runtime calls because we don't (currently) even |
1083 // optimize them. | 1083 // optimize them. |
1084 add_flag(kDontInline); | 1084 add_flag(kDontInline); |
1085 } else if (node->function()->intrinsic_type == Runtime::INLINE && | 1085 } else if (node->function()->intrinsic_type == Runtime::INLINE && |
1086 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || | 1086 (node->name()->IsOneByteEqualTo( |
1087 node->name()->IsEqualTo(CStrVector("_Arguments")))) { | 1087 STATIC_ASCII_VECTOR("_ArgumentsLength")) || |
| 1088 node->name()->IsOneByteEqualTo(STATIC_ASCII_VECTOR("_Arguments")))) { |
1088 // Don't inline the %_ArgumentsLength or %_Arguments because their | 1089 // Don't inline the %_ArgumentsLength or %_Arguments because their |
1089 // implementation will not work. There is no stack frame to get them | 1090 // implementation will not work. There is no stack frame to get them |
1090 // from. | 1091 // from. |
1091 add_flag(kDontInline); | 1092 add_flag(kDontInline); |
1092 } | 1093 } |
1093 } | 1094 } |
1094 | 1095 |
1095 #undef REGULAR_NODE | 1096 #undef REGULAR_NODE |
1096 #undef DONT_OPTIMIZE_NODE | 1097 #undef DONT_OPTIMIZE_NODE |
1097 #undef DONT_INLINE_NODE | 1098 #undef DONT_INLINE_NODE |
(...skipping 12 matching lines...) Expand all Loading... |
1110 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1111 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); |
1111 str = arr; | 1112 str = arr; |
1112 } else { | 1113 } else { |
1113 str = DoubleToCString(handle_->Number(), buffer); | 1114 str = DoubleToCString(handle_->Number(), buffer); |
1114 } | 1115 } |
1115 return FACTORY->NewStringFromAscii(CStrVector(str)); | 1116 return FACTORY->NewStringFromAscii(CStrVector(str)); |
1116 } | 1117 } |
1117 | 1118 |
1118 | 1119 |
1119 } } // namespace v8::internal | 1120 } } // namespace v8::internal |
OLD | NEW |