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 10513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10524 // Support for direct calls from JavaScript to native RegExp code. | 10524 // Support for direct calls from JavaScript to native RegExp code. |
10525 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { | 10525 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { |
10526 ASSERT_EQ(4, call->arguments()->length()); | 10526 ASSERT_EQ(4, call->arguments()->length()); |
10527 CHECK_ALIVE(VisitArgumentList(call->arguments())); | 10527 CHECK_ALIVE(VisitArgumentList(call->arguments())); |
10528 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4); | 10528 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4); |
10529 Drop(4); | 10529 Drop(4); |
10530 return ast_context()->ReturnInstruction(result, call->id()); | 10530 return ast_context()->ReturnInstruction(result, call->id()); |
10531 } | 10531 } |
10532 | 10532 |
10533 | 10533 |
| 10534 void HOptimizedGraphBuilder::GenerateDoubleLo(CallRuntime* call) { |
| 10535 ASSERT_EQ(1, call->arguments()->length()); |
| 10536 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 10537 HValue* value = Pop(); |
| 10538 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::LOW); |
| 10539 return ast_context()->ReturnInstruction(result, call->id()); |
| 10540 } |
| 10541 |
| 10542 |
| 10543 void HOptimizedGraphBuilder::GenerateDoubleHi(CallRuntime* call) { |
| 10544 ASSERT_EQ(1, call->arguments()->length()); |
| 10545 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 10546 HValue* value = Pop(); |
| 10547 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::HIGH); |
| 10548 return ast_context()->ReturnInstruction(result, call->id()); |
| 10549 } |
| 10550 |
| 10551 |
| 10552 void HOptimizedGraphBuilder::GenerateConstructDouble(CallRuntime* call) { |
| 10553 ASSERT_EQ(2, call->arguments()->length()); |
| 10554 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 10555 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
| 10556 HValue* lo = Pop(); |
| 10557 HValue* hi = Pop(); |
| 10558 HInstruction* result = NewUncasted<HConstructDouble>(hi, lo); |
| 10559 return ast_context()->ReturnInstruction(result, call->id()); |
| 10560 } |
| 10561 |
| 10562 |
10534 // Construct a RegExp exec result with two in-object properties. | 10563 // Construct a RegExp exec result with two in-object properties. |
10535 void HOptimizedGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) { | 10564 void HOptimizedGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) { |
10536 ASSERT_EQ(3, call->arguments()->length()); | 10565 ASSERT_EQ(3, call->arguments()->length()); |
10537 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10566 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
10538 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 10567 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
10539 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 10568 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
10540 HValue* input = Pop(); | 10569 HValue* input = Pop(); |
10541 HValue* index = Pop(); | 10570 HValue* index = Pop(); |
10542 HValue* length = Pop(); | 10571 HValue* length = Pop(); |
10543 HValue* result = BuildRegExpConstructResult(length, index, input); | 10572 HValue* result = BuildRegExpConstructResult(length, index, input); |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11298 if (ShouldProduceTraceOutput()) { | 11327 if (ShouldProduceTraceOutput()) { |
11299 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11328 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11300 } | 11329 } |
11301 | 11330 |
11302 #ifdef DEBUG | 11331 #ifdef DEBUG |
11303 graph_->Verify(false); // No full verify. | 11332 graph_->Verify(false); // No full verify. |
11304 #endif | 11333 #endif |
11305 } | 11334 } |
11306 | 11335 |
11307 } } // namespace v8::internal | 11336 } } // namespace v8::internal |
OLD | NEW |