| 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 8047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8058 ASSERT_EQ(1, call->arguments()->length()); | 8058 ASSERT_EQ(1, call->arguments()->length()); |
| 8059 CHECK_ALIVE(VisitArgumentList(call->arguments())); | 8059 CHECK_ALIVE(VisitArgumentList(call->arguments())); |
| 8060 HValue* context = environment()->LookupContext(); | 8060 HValue* context = environment()->LookupContext(); |
| 8061 HCallStub* result = | 8061 HCallStub* result = |
| 8062 new(zone()) HCallStub(context, CodeStub::NumberToString, 1); | 8062 new(zone()) HCallStub(context, CodeStub::NumberToString, 1); |
| 8063 Drop(1); | 8063 Drop(1); |
| 8064 return ast_context()->ReturnInstruction(result, call->id()); | 8064 return ast_context()->ReturnInstruction(result, call->id()); |
| 8065 } | 8065 } |
| 8066 | 8066 |
| 8067 | 8067 |
| 8068 // Fast swapping of elements. Takes three expressions, the object and two | |
| 8069 // indices. This should only be used if the indices are known to be | |
| 8070 // non-negative and within bounds of the elements array at the call site. | |
| 8071 void HGraphBuilder::GenerateSwapElements(CallRuntime* call) { | |
| 8072 return Bailout("inlined runtime function: SwapElements"); | |
| 8073 } | |
| 8074 | |
| 8075 | |
| 8076 // Fast call for custom callbacks. | 8068 // Fast call for custom callbacks. |
| 8077 void HGraphBuilder::GenerateCallFunction(CallRuntime* call) { | 8069 void HGraphBuilder::GenerateCallFunction(CallRuntime* call) { |
| 8078 // 1 ~ The function to call is not itself an argument to the call. | 8070 // 1 ~ The function to call is not itself an argument to the call. |
| 8079 int arg_count = call->arguments()->length() - 1; | 8071 int arg_count = call->arguments()->length() - 1; |
| 8080 ASSERT(arg_count >= 1); // There's always at least a receiver. | 8072 ASSERT(arg_count >= 1); // There's always at least a receiver. |
| 8081 | 8073 |
| 8082 for (int i = 0; i < arg_count; ++i) { | 8074 for (int i = 0; i < arg_count; ++i) { |
| 8083 CHECK_ALIVE(VisitArgument(call->arguments()->at(i))); | 8075 CHECK_ALIVE(VisitArgument(call->arguments()->at(i))); |
| 8084 } | 8076 } |
| 8085 CHECK_ALIVE(VisitForValue(call->arguments()->last())); | 8077 CHECK_ALIVE(VisitForValue(call->arguments()->last())); |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8790 } | 8782 } |
| 8791 } | 8783 } |
| 8792 | 8784 |
| 8793 #ifdef DEBUG | 8785 #ifdef DEBUG |
| 8794 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 8786 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 8795 if (allocator_ != NULL) allocator_->Verify(); | 8787 if (allocator_ != NULL) allocator_->Verify(); |
| 8796 #endif | 8788 #endif |
| 8797 } | 8789 } |
| 8798 | 8790 |
| 8799 } } // namespace v8::internal | 8791 } } // namespace v8::internal |
| OLD | NEW |