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 6046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6057 AddInstruction(new(zone()) HPushArgument(AddInstruction( | 6057 AddInstruction(new(zone()) HPushArgument(AddInstruction( |
6058 new(zone()) HConstant(constants)))); | 6058 new(zone()) HConstant(constants)))); |
6059 | 6059 |
6060 Runtime::FunctionId function_id = (expr->depth() > 1) | 6060 Runtime::FunctionId function_id = (expr->depth() > 1) |
6061 ? Runtime::kCreateArrayLiteral : Runtime::kCreateArrayLiteralShallow; | 6061 ? Runtime::kCreateArrayLiteral : Runtime::kCreateArrayLiteralShallow; |
6062 literal = AddInstruction( | 6062 literal = AddInstruction( |
6063 new(zone()) HCallRuntime(context, | 6063 new(zone()) HCallRuntime(context, |
6064 isolate()->factory()->empty_string(), | 6064 isolate()->factory()->empty_string(), |
6065 Runtime::FunctionForId(function_id), | 6065 Runtime::FunctionForId(function_id), |
6066 3)); | 6066 3)); |
6067 | |
6068 // De-opt if elements kind changed from boilerplate_elements_kind | |
Yang
2013/06/19 13:40:30
add a period at the end of the comment.
mvstanton
2013/06/19 13:46:51
Done.
| |
6069 Handle<Map> map = Handle<Map>(original_boilerplate_object->map(), | |
6070 isolate()); | |
6071 AddInstruction(HCheckMaps::New(literal, map, zone())); | |
6067 } | 6072 } |
6068 | 6073 |
6069 // The array is expected in the bailout environment during computation | 6074 // The array is expected in the bailout environment during computation |
6070 // of the property values and is the value of the entire expression. | 6075 // of the property values and is the value of the entire expression. |
6071 Push(literal); | 6076 Push(literal); |
6072 // The literal index is on the stack, too. | 6077 // The literal index is on the stack, too. |
6073 Push(AddInstruction(new(zone()) HConstant(expr->literal_index()))); | 6078 Push(AddInstruction(new(zone()) HConstant(expr->literal_index()))); |
6074 | 6079 |
6075 HInstruction* elements = NULL; | 6080 HInstruction* elements = NULL; |
6076 | 6081 |
(...skipping 5570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11647 } | 11652 } |
11648 } | 11653 } |
11649 | 11654 |
11650 #ifdef DEBUG | 11655 #ifdef DEBUG |
11651 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11656 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
11652 if (allocator_ != NULL) allocator_->Verify(); | 11657 if (allocator_ != NULL) allocator_->Verify(); |
11653 #endif | 11658 #endif |
11654 } | 11659 } |
11655 | 11660 |
11656 } } // namespace v8::internal | 11661 } } // namespace v8::internal |
OLD | NEW |