OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 4175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4186 int flags = expr->fast_elements() | 4186 int flags = expr->fast_elements() |
4187 ? ObjectLiteral::kFastElements : ObjectLiteral::kNoFlags; | 4187 ? ObjectLiteral::kFastElements : ObjectLiteral::kNoFlags; |
4188 flags |= expr->has_function() | 4188 flags |= expr->has_function() |
4189 ? ObjectLiteral::kHasFunction : ObjectLiteral::kNoFlags; | 4189 ? ObjectLiteral::kHasFunction : ObjectLiteral::kNoFlags; |
4190 | 4190 |
4191 Add<HPushArgument>(Add<HConstant>(closure_literals)); | 4191 Add<HPushArgument>(Add<HConstant>(closure_literals)); |
4192 Add<HPushArgument>(Add<HConstant>(literal_index)); | 4192 Add<HPushArgument>(Add<HConstant>(literal_index)); |
4193 Add<HPushArgument>(Add<HConstant>(constant_properties)); | 4193 Add<HPushArgument>(Add<HConstant>(constant_properties)); |
4194 Add<HPushArgument>(Add<HConstant>(flags)); | 4194 Add<HPushArgument>(Add<HConstant>(flags)); |
4195 | 4195 |
4196 Runtime::FunctionId function_id = | 4196 Runtime::FunctionId function_id = Runtime::kCreateObjectLiteral; |
4197 (expr->depth() > 1 || expr->may_store_doubles()) | |
4198 ? Runtime::kCreateObjectLiteral : Runtime::kCreateObjectLiteralShallow; | |
4199 literal = Add<HCallRuntime>(isolate()->factory()->empty_string(), | 4197 literal = Add<HCallRuntime>(isolate()->factory()->empty_string(), |
4200 Runtime::FunctionForId(function_id), | 4198 Runtime::FunctionForId(function_id), |
4201 4); | 4199 4); |
4202 } | 4200 } |
4203 | 4201 |
4204 // The object is expected in the bailout environment during computation | 4202 // The object is expected in the bailout environment during computation |
4205 // of the property values and is the value of the entire expression. | 4203 // of the property values and is the value of the entire expression. |
4206 Push(literal); | 4204 Push(literal); |
4207 | 4205 |
4208 expr->CalculateEmitStore(zone()); | 4206 expr->CalculateEmitStore(zone()); |
(...skipping 5491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9700 if (ShouldProduceTraceOutput()) { | 9698 if (ShouldProduceTraceOutput()) { |
9701 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9699 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9702 } | 9700 } |
9703 | 9701 |
9704 #ifdef DEBUG | 9702 #ifdef DEBUG |
9705 graph_->Verify(false); // No full verify. | 9703 graph_->Verify(false); // No full verify. |
9706 #endif | 9704 #endif |
9707 } | 9705 } |
9708 | 9706 |
9709 } } // namespace v8::internal | 9707 } } // namespace v8::internal |
OLD | NEW |