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 10241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10252 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10252 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
10253 HValue* date = Pop(); | 10253 HValue* date = Pop(); |
10254 HDateField* result = New<HDateField>(date, index); | 10254 HDateField* result = New<HDateField>(date, index); |
10255 return ast_context()->ReturnInstruction(result, call->id()); | 10255 return ast_context()->ReturnInstruction(result, call->id()); |
10256 } | 10256 } |
10257 | 10257 |
10258 | 10258 |
10259 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( | 10259 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( |
10260 CallRuntime* call) { | 10260 CallRuntime* call) { |
10261 ASSERT(call->arguments()->length() == 3); | 10261 ASSERT(call->arguments()->length() == 3); |
10262 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10262 // We need to follow the evaluation order of full codegen. |
10263 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 10263 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
10264 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 10264 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
| 10265 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 10266 HValue* string = Pop(); |
10265 HValue* value = Pop(); | 10267 HValue* value = Pop(); |
10266 HValue* index = Pop(); | 10268 HValue* index = Pop(); |
10267 HValue* string = Pop(); | |
10268 Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, | 10269 Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, |
10269 index, value); | 10270 index, value); |
10270 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 10271 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
10271 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); | 10272 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |
10272 } | 10273 } |
10273 | 10274 |
10274 | 10275 |
10275 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( | 10276 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( |
10276 CallRuntime* call) { | 10277 CallRuntime* call) { |
10277 ASSERT(call->arguments()->length() == 3); | 10278 ASSERT(call->arguments()->length() == 3); |
10278 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10279 // We need to follow the evaluation order of full codegen. |
10279 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 10280 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
10280 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 10281 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
| 10282 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 10283 HValue* string = Pop(); |
10281 HValue* value = Pop(); | 10284 HValue* value = Pop(); |
10282 HValue* index = Pop(); | 10285 HValue* index = Pop(); |
10283 HValue* string = Pop(); | |
10284 Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string, | 10286 Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string, |
10285 index, value); | 10287 index, value); |
10286 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 10288 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
10287 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); | 10289 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |
10288 } | 10290 } |
10289 | 10291 |
10290 | 10292 |
10291 void HOptimizedGraphBuilder::GenerateSetValueOf(CallRuntime* call) { | 10293 void HOptimizedGraphBuilder::GenerateSetValueOf(CallRuntime* call) { |
10292 ASSERT(call->arguments()->length() == 2); | 10294 ASSERT(call->arguments()->length() == 2); |
10293 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10295 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11178 if (ShouldProduceTraceOutput()) { | 11180 if (ShouldProduceTraceOutput()) { |
11179 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11181 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11180 } | 11182 } |
11181 | 11183 |
11182 #ifdef DEBUG | 11184 #ifdef DEBUG |
11183 graph_->Verify(false); // No full verify. | 11185 graph_->Verify(false); // No full verify. |
11184 #endif | 11186 #endif |
11185 } | 11187 } |
11186 | 11188 |
11187 } } // namespace v8::internal | 11189 } } // namespace v8::internal |
OLD | NEW |