Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: src/hydrogen.cc

Issue 13844009: Actually implement the sqrt intrinsic in Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 10947 matching lines...) Expand 10 before | Expand all | Expand 10 after
10958 HValue* context = environment()->LookupContext(); 10958 HValue* context = environment()->LookupContext();
10959 HCallStub* result = 10959 HCallStub* result =
10960 new(zone()) HCallStub(context, CodeStub::TranscendentalCache, 1); 10960 new(zone()) HCallStub(context, CodeStub::TranscendentalCache, 1);
10961 result->set_transcendental_type(TranscendentalCache::LOG); 10961 result->set_transcendental_type(TranscendentalCache::LOG);
10962 Drop(1); 10962 Drop(1);
10963 return ast_context()->ReturnInstruction(result, call->id()); 10963 return ast_context()->ReturnInstruction(result, call->id());
10964 } 10964 }
10965 10965
10966 10966
10967 void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) { 10967 void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) {
10968 return Bailout("inlined runtime function: MathSqrt"); 10968 ASSERT(call->arguments()->length() == 1);
10969 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10970 HValue* value = Pop();
10971 HValue* context = environment()->LookupContext();
10972 HInstruction* result =
10973 HUnaryMathOperation::New(zone(), context, value, kMathSqrt);
10974 return ast_context()->ReturnInstruction(result, call->id());
tfarina 2013/04/16 01:23:19 why you return here, if the return type of Generat
Sven Panne 2013/04/16 06:11:16 There is no deep reason, just for consistency with
10969 } 10975 }
10970 10976
10971 10977
10972 // Check whether two RegExps are equivalent 10978 // Check whether two RegExps are equivalent
10973 void HOptimizedGraphBuilder::GenerateIsRegExpEquivalent(CallRuntime* call) { 10979 void HOptimizedGraphBuilder::GenerateIsRegExpEquivalent(CallRuntime* call) {
10974 return Bailout("inlined runtime function: IsRegExpEquivalent"); 10980 return Bailout("inlined runtime function: IsRegExpEquivalent");
10975 } 10981 }
10976 10982
10977 10983
10978 void HOptimizedGraphBuilder::GenerateGetCachedArrayIndex(CallRuntime* call) { 10984 void HOptimizedGraphBuilder::GenerateGetCachedArrayIndex(CallRuntime* call) {
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
11666 } 11672 }
11667 } 11673 }
11668 11674
11669 #ifdef DEBUG 11675 #ifdef DEBUG
11670 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11676 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11671 if (allocator_ != NULL) allocator_->Verify(); 11677 if (allocator_ != NULL) allocator_->Verify();
11672 #endif 11678 #endif
11673 } 11679 }
11674 11680
11675 } } // namespace v8::internal 11681 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698