| 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 8904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8915 // argument to the construct call. | 8915 // argument to the construct call. |
| 8916 bool use_call_new_array = FLAG_optimize_constructed_arrays && | 8916 bool use_call_new_array = FLAG_optimize_constructed_arrays && |
| 8917 !(expr->target().is_null()) && | 8917 !(expr->target().is_null()) && |
| 8918 *(expr->target()) == isolate()->global_context()->array_function(); | 8918 *(expr->target()) == isolate()->global_context()->array_function(); |
| 8919 | 8919 |
| 8920 CHECK_ALIVE(VisitArgument(expr->expression())); | 8920 CHECK_ALIVE(VisitArgument(expr->expression())); |
| 8921 HValue* constructor = HPushArgument::cast(Top())->argument(); | 8921 HValue* constructor = HPushArgument::cast(Top())->argument(); |
| 8922 CHECK_ALIVE(VisitArgumentList(expr->arguments())); | 8922 CHECK_ALIVE(VisitArgumentList(expr->arguments())); |
| 8923 HCallNew* call; | 8923 HCallNew* call; |
| 8924 if (use_call_new_array) { | 8924 if (use_call_new_array) { |
| 8925 Handle<JSGlobalPropertyCell> cell = expr->allocation_info_cell(); | 8925 Handle<Cell> cell = expr->allocation_info_cell(); |
| 8926 call = new(zone()) HCallNewArray(context, constructor, argument_count, | 8926 call = new(zone()) HCallNewArray(context, constructor, argument_count, |
| 8927 cell); | 8927 cell); |
| 8928 } else { | 8928 } else { |
| 8929 call = new(zone()) HCallNew(context, constructor, argument_count); | 8929 call = new(zone()) HCallNew(context, constructor, argument_count); |
| 8930 } | 8930 } |
| 8931 Drop(argument_count); | 8931 Drop(argument_count); |
| 8932 call->set_position(expr->position()); | 8932 call->set_position(expr->position()); |
| 8933 return ast_context()->ReturnInstruction(call, expr->id()); | 8933 return ast_context()->ReturnInstruction(call, expr->id()); |
| 8934 } | 8934 } |
| 8935 } | 8935 } |
| (...skipping 2664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11600 } | 11600 } |
| 11601 } | 11601 } |
| 11602 | 11602 |
| 11603 #ifdef DEBUG | 11603 #ifdef DEBUG |
| 11604 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11604 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 11605 if (allocator_ != NULL) allocator_->Verify(); | 11605 if (allocator_ != NULL) allocator_->Verify(); |
| 11606 #endif | 11606 #endif |
| 11607 } | 11607 } |
| 11608 | 11608 |
| 11609 } } // namespace v8::internal | 11609 } } // namespace v8::internal |
| OLD | NEW |