OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3011 expr->flags(), | 3011 expr->flags(), |
3012 expr->literal_index()); | 3012 expr->literal_index()); |
3013 ast_context()->ReturnInstruction(instr, expr->id()); | 3013 ast_context()->ReturnInstruction(instr, expr->id()); |
3014 } | 3014 } |
3015 | 3015 |
3016 | 3016 |
3017 void HGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) { | 3017 void HGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) { |
3018 HObjectLiteral* literal = (new HObjectLiteral(expr->constant_properties(), | 3018 HObjectLiteral* literal = (new HObjectLiteral(expr->constant_properties(), |
3019 expr->fast_elements(), | 3019 expr->fast_elements(), |
3020 expr->literal_index(), | 3020 expr->literal_index(), |
3021 expr->depth())); | 3021 expr->depth(), |
| 3022 expr->has_function())); |
3022 // The object is expected in the bailout environment during computation | 3023 // The object is expected in the bailout environment during computation |
3023 // of the property values and is the value of the entire expression. | 3024 // of the property values and is the value of the entire expression. |
3024 PushAndAdd(literal); | 3025 PushAndAdd(literal); |
3025 | 3026 |
3026 expr->CalculateEmitStore(); | 3027 expr->CalculateEmitStore(); |
3027 | 3028 |
3028 for (int i = 0; i < expr->properties()->length(); i++) { | 3029 for (int i = 0; i < expr->properties()->length(); i++) { |
3029 ObjectLiteral::Property* property = expr->properties()->at(i); | 3030 ObjectLiteral::Property* property = expr->properties()->at(i); |
3030 if (property->IsCompileTimeValue()) continue; | 3031 if (property->IsCompileTimeValue()) continue; |
3031 | 3032 |
(...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5894 } | 5895 } |
5895 } | 5896 } |
5896 | 5897 |
5897 #ifdef DEBUG | 5898 #ifdef DEBUG |
5898 if (graph_ != NULL) graph_->Verify(); | 5899 if (graph_ != NULL) graph_->Verify(); |
5899 if (allocator_ != NULL) allocator_->Verify(); | 5900 if (allocator_ != NULL) allocator_->Verify(); |
5900 #endif | 5901 #endif |
5901 } | 5902 } |
5902 | 5903 |
5903 } } // namespace v8::internal | 5904 } } // namespace v8::internal |
OLD | NEW |