| 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 7447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7458 ASSERT_EQ(1, call->arguments()->length()); | 7458 ASSERT_EQ(1, call->arguments()->length()); |
| 7459 CHECK_ALIVE(VisitArgumentList(call->arguments())); | 7459 CHECK_ALIVE(VisitArgumentList(call->arguments())); |
| 7460 HValue* context = environment()->LookupContext(); | 7460 HValue* context = environment()->LookupContext(); |
| 7461 HCallStub* result = | 7461 HCallStub* result = |
| 7462 new(zone()) HCallStub(context, CodeStub::NumberToString, 1); | 7462 new(zone()) HCallStub(context, CodeStub::NumberToString, 1); |
| 7463 Drop(1); | 7463 Drop(1); |
| 7464 return ast_context()->ReturnInstruction(result, call->id()); | 7464 return ast_context()->ReturnInstruction(result, call->id()); |
| 7465 } | 7465 } |
| 7466 | 7466 |
| 7467 | 7467 |
| 7468 // Fast swapping of elements. Takes three expressions, the object and two | |
| 7469 // indices. This should only be used if the indices are known to be | |
| 7470 // non-negative and within bounds of the elements array at the call site. | |
| 7471 void HGraphBuilder::GenerateSwapElements(CallRuntime* call) { | |
| 7472 return Bailout("inlined runtime function: SwapElements"); | |
| 7473 } | |
| 7474 | |
| 7475 | |
| 7476 // Fast call for custom callbacks. | 7468 // Fast call for custom callbacks. |
| 7477 void HGraphBuilder::GenerateCallFunction(CallRuntime* call) { | 7469 void HGraphBuilder::GenerateCallFunction(CallRuntime* call) { |
| 7478 // 1 ~ The function to call is not itself an argument to the call. | 7470 // 1 ~ The function to call is not itself an argument to the call. |
| 7479 int arg_count = call->arguments()->length() - 1; | 7471 int arg_count = call->arguments()->length() - 1; |
| 7480 ASSERT(arg_count >= 1); // There's always at least a receiver. | 7472 ASSERT(arg_count >= 1); // There's always at least a receiver. |
| 7481 | 7473 |
| 7482 for (int i = 0; i < arg_count; ++i) { | 7474 for (int i = 0; i < arg_count; ++i) { |
| 7483 CHECK_ALIVE(VisitArgument(call->arguments()->at(i))); | 7475 CHECK_ALIVE(VisitArgument(call->arguments()->at(i))); |
| 7484 } | 7476 } |
| 7485 CHECK_ALIVE(VisitForValue(call->arguments()->last())); | 7477 CHECK_ALIVE(VisitForValue(call->arguments()->last())); |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8190 } | 8182 } |
| 8191 } | 8183 } |
| 8192 | 8184 |
| 8193 #ifdef DEBUG | 8185 #ifdef DEBUG |
| 8194 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 8186 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 8195 if (allocator_ != NULL) allocator_->Verify(); | 8187 if (allocator_ != NULL) allocator_->Verify(); |
| 8196 #endif | 8188 #endif |
| 8197 } | 8189 } |
| 8198 | 8190 |
| 8199 } } // namespace v8::internal | 8191 } } // namespace v8::internal |
| OLD | NEW |