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 4286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4297 HValue* rhs = environment()->arguments_environment()->Lookup(1); | 4297 HValue* rhs = environment()->arguments_environment()->Lookup(1); |
4298 AddLeaveInlined(rhs, state); | 4298 AddLeaveInlined(rhs, state); |
4299 } | 4299 } |
4300 } else { | 4300 } else { |
4301 // Return from a normal inlined function. Visit the subexpression in the | 4301 // Return from a normal inlined function. Visit the subexpression in the |
4302 // expression context of the call. | 4302 // expression context of the call. |
4303 if (context->IsTest()) { | 4303 if (context->IsTest()) { |
4304 TestContext* test = TestContext::cast(context); | 4304 TestContext* test = TestContext::cast(context); |
4305 VisitForControl(stmt->expression(), test->if_true(), test->if_false()); | 4305 VisitForControl(stmt->expression(), test->if_true(), test->if_false()); |
4306 } else if (context->IsEffect()) { | 4306 } else if (context->IsEffect()) { |
4307 CHECK_ALIVE(VisitForEffect(stmt->expression())); | 4307 // Visit in value context and ignore the result. This is needed to keep |
| 4308 // environment in sync with full-codegen since some visitors (e.g. |
| 4309 // VisitCountOperation) use the operand stack differently depending on |
| 4310 // context. |
| 4311 CHECK_ALIVE(VisitForValue(stmt->expression())); |
| 4312 Pop(); |
4308 Goto(function_return(), state); | 4313 Goto(function_return(), state); |
4309 } else { | 4314 } else { |
4310 ASSERT(context->IsValue()); | 4315 ASSERT(context->IsValue()); |
4311 CHECK_ALIVE(VisitForValue(stmt->expression())); | 4316 CHECK_ALIVE(VisitForValue(stmt->expression())); |
4312 AddLeaveInlined(Pop(), state); | 4317 AddLeaveInlined(Pop(), state); |
4313 } | 4318 } |
4314 } | 4319 } |
4315 set_current_block(NULL); | 4320 set_current_block(NULL); |
4316 } | 4321 } |
4317 | 4322 |
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6353 MapHandleList transition_target(maps->length()); | 6358 MapHandleList transition_target(maps->length()); |
6354 // Collect possible transition targets. | 6359 // Collect possible transition targets. |
6355 MapHandleList possible_transitioned_maps(maps->length()); | 6360 MapHandleList possible_transitioned_maps(maps->length()); |
6356 for (int i = 0; i < maps->length(); ++i) { | 6361 for (int i = 0; i < maps->length(); ++i) { |
6357 Handle<Map> map = maps->at(i); | 6362 Handle<Map> map = maps->at(i); |
6358 ElementsKind elements_kind = map->elements_kind(); | 6363 ElementsKind elements_kind = map->elements_kind(); |
6359 if (IsFastElementsKind(elements_kind) && | 6364 if (IsFastElementsKind(elements_kind) && |
6360 elements_kind != GetInitialFastElementsKind()) { | 6365 elements_kind != GetInitialFastElementsKind()) { |
6361 possible_transitioned_maps.Add(map); | 6366 possible_transitioned_maps.Add(map); |
6362 } | 6367 } |
| 6368 if (elements_kind == NON_STRICT_ARGUMENTS_ELEMENTS) { |
| 6369 HInstruction* result = |
| 6370 is_store ? BuildStoreKeyedGeneric(object, key, val) |
| 6371 : BuildLoadKeyedGeneric(object, key); |
| 6372 *has_side_effects = result->HasObservableSideEffects(); |
| 6373 return AddInstruction(result); |
| 6374 } |
6363 } | 6375 } |
6364 // Get transition target for each map (NULL == no transition). | 6376 // Get transition target for each map (NULL == no transition). |
6365 for (int i = 0; i < maps->length(); ++i) { | 6377 for (int i = 0; i < maps->length(); ++i) { |
6366 Handle<Map> map = maps->at(i); | 6378 Handle<Map> map = maps->at(i); |
6367 Handle<Map> transitioned_map = | 6379 Handle<Map> transitioned_map = |
6368 map->FindTransitionedMap(&possible_transitioned_maps); | 6380 map->FindTransitionedMap(&possible_transitioned_maps); |
6369 transition_target.Add(transitioned_map); | 6381 transition_target.Add(transitioned_map); |
6370 } | 6382 } |
6371 | 6383 |
6372 MapHandleList untransitionable_maps(maps->length()); | 6384 MapHandleList untransitionable_maps(maps->length()); |
(...skipping 4881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11254 if (ShouldProduceTraceOutput()) { | 11266 if (ShouldProduceTraceOutput()) { |
11255 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11267 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11256 } | 11268 } |
11257 | 11269 |
11258 #ifdef DEBUG | 11270 #ifdef DEBUG |
11259 graph_->Verify(false); // No full verify. | 11271 graph_->Verify(false); // No full verify. |
11260 #endif | 11272 #endif |
11261 } | 11273 } |
11262 | 11274 |
11263 } } // namespace v8::internal | 11275 } } // namespace v8::internal |
OLD | NEW |