| 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 8855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8866 Handle<JSFunction> array_function( | 8866 Handle<JSFunction> array_function( |
| 8867 isolate()->global_context()->array_function(), isolate()); | 8867 isolate()->global_context()->array_function(), isolate()); |
| 8868 CHECK_ALIVE(VisitArgument(expr->expression())); | 8868 CHECK_ALIVE(VisitArgument(expr->expression())); |
| 8869 HValue* constructor = HPushArgument::cast(Top())->argument(); | 8869 HValue* constructor = HPushArgument::cast(Top())->argument(); |
| 8870 CHECK_ALIVE(VisitArgumentList(expr->arguments())); | 8870 CHECK_ALIVE(VisitArgumentList(expr->arguments())); |
| 8871 HCallNew* call; | 8871 HCallNew* call; |
| 8872 if (expr->target().is_identical_to(array_function)) { | 8872 if (expr->target().is_identical_to(array_function)) { |
| 8873 Handle<Cell> cell = expr->allocation_info_cell(); | 8873 Handle<Cell> cell = expr->allocation_info_cell(); |
| 8874 AddInstruction(new(zone()) HCheckFunction(constructor, array_function)); | 8874 AddInstruction(new(zone()) HCheckFunction(constructor, array_function)); |
| 8875 call = new(zone()) HCallNewArray(context, constructor, argument_count, | 8875 call = new(zone()) HCallNewArray(context, constructor, argument_count, |
| 8876 cell); | 8876 cell, expr->elements_kind()); |
| 8877 } else { | 8877 } else { |
| 8878 call = new(zone()) HCallNew(context, constructor, argument_count); | 8878 call = new(zone()) HCallNew(context, constructor, argument_count); |
| 8879 } | 8879 } |
| 8880 Drop(argument_count); | 8880 Drop(argument_count); |
| 8881 call->set_position(expr->position()); | 8881 call->set_position(expr->position()); |
| 8882 return ast_context()->ReturnInstruction(call, expr->id()); | 8882 return ast_context()->ReturnInstruction(call, expr->id()); |
| 8883 } | 8883 } |
| 8884 } | 8884 } |
| 8885 | 8885 |
| 8886 | 8886 |
| (...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11538 if (ShouldProduceTraceOutput()) { | 11538 if (ShouldProduceTraceOutput()) { |
| 11539 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11539 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11540 } | 11540 } |
| 11541 | 11541 |
| 11542 #ifdef DEBUG | 11542 #ifdef DEBUG |
| 11543 graph_->Verify(false); // No full verify. | 11543 graph_->Verify(false); // No full verify. |
| 11544 #endif | 11544 #endif |
| 11545 } | 11545 } |
| 11546 | 11546 |
| 11547 } } // namespace v8::internal | 11547 } } // namespace v8::internal |
| OLD | NEW |