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 10356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10367 | 10367 |
10368 // Check if object is a JSValue. | 10368 // Check if object is a JSValue. |
10369 IfBuilder if_objectisvalue(this); | 10369 IfBuilder if_objectisvalue(this); |
10370 if_objectisvalue.If<HHasInstanceTypeAndBranch>(object, JS_VALUE_TYPE); | 10370 if_objectisvalue.If<HHasInstanceTypeAndBranch>(object, JS_VALUE_TYPE); |
10371 if_objectisvalue.Then(); | 10371 if_objectisvalue.Then(); |
10372 { | 10372 { |
10373 // Create in-object property store to kValueOffset. | 10373 // Create in-object property store to kValueOffset. |
10374 Add<HStoreNamedField>(object, | 10374 Add<HStoreNamedField>(object, |
10375 HObjectAccess::ForObservableJSObjectOffset(JSValue::kValueOffset), | 10375 HObjectAccess::ForObservableJSObjectOffset(JSValue::kValueOffset), |
10376 value); | 10376 value); |
| 10377 if (!ast_context()->IsEffect()) { |
| 10378 Push(value); |
| 10379 } |
10377 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 10380 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
10378 } | 10381 } |
10379 if_objectisvalue.Else(); | 10382 if_objectisvalue.Else(); |
10380 { | 10383 { |
10381 // Nothing to do in this case. | 10384 // Nothing to do in this case. |
| 10385 if (!ast_context()->IsEffect()) { |
| 10386 Push(value); |
| 10387 } |
10382 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 10388 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
10383 } | 10389 } |
10384 if_objectisvalue.End(); | 10390 if_objectisvalue.End(); |
| 10391 if (!ast_context()->IsEffect()) { |
| 10392 Drop(1); |
| 10393 } |
10385 return ast_context()->ReturnValue(value); | 10394 return ast_context()->ReturnValue(value); |
10386 } | 10395 } |
10387 | 10396 |
10388 | 10397 |
10389 // Fast support for charCodeAt(n). | 10398 // Fast support for charCodeAt(n). |
10390 void HOptimizedGraphBuilder::GenerateStringCharCodeAt(CallRuntime* call) { | 10399 void HOptimizedGraphBuilder::GenerateStringCharCodeAt(CallRuntime* call) { |
10391 ASSERT(call->arguments()->length() == 2); | 10400 ASSERT(call->arguments()->length() == 2); |
10392 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10401 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
10393 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 10402 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
10394 HValue* index = Pop(); | 10403 HValue* index = Pop(); |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11239 if (ShouldProduceTraceOutput()) { | 11248 if (ShouldProduceTraceOutput()) { |
11240 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11249 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11241 } | 11250 } |
11242 | 11251 |
11243 #ifdef DEBUG | 11252 #ifdef DEBUG |
11244 graph_->Verify(false); // No full verify. | 11253 graph_->Verify(false); // No full verify. |
11245 #endif | 11254 #endif |
11246 } | 11255 } |
11247 | 11256 |
11248 } } // namespace v8::internal | 11257 } } // namespace v8::internal |
OLD | NEW |