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

Side by Side Diff: src/hydrogen.cc

Issue 189823003: Reland "Introduce intrinsics for double values in Javascript." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « src/full-codegen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10491 matching lines...) Expand 10 before | Expand all | Expand 10 after
10502 // Support for direct calls from JavaScript to native RegExp code. 10502 // Support for direct calls from JavaScript to native RegExp code.
10503 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { 10503 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
10504 ASSERT_EQ(4, call->arguments()->length()); 10504 ASSERT_EQ(4, call->arguments()->length());
10505 CHECK_ALIVE(VisitExpressions(call->arguments())); 10505 CHECK_ALIVE(VisitExpressions(call->arguments()));
10506 PushArgumentsFromEnvironment(call->arguments()->length()); 10506 PushArgumentsFromEnvironment(call->arguments()->length());
10507 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4); 10507 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4);
10508 return ast_context()->ReturnInstruction(result, call->id()); 10508 return ast_context()->ReturnInstruction(result, call->id());
10509 } 10509 }
10510 10510
10511 10511
10512 void HOptimizedGraphBuilder::GenerateDoubleLo(CallRuntime* call) {
10513 ASSERT_EQ(1, call->arguments()->length());
10514 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10515 HValue* value = Pop();
10516 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::LOW);
10517 return ast_context()->ReturnInstruction(result, call->id());
10518 }
10519
10520
10521 void HOptimizedGraphBuilder::GenerateDoubleHi(CallRuntime* call) {
10522 ASSERT_EQ(1, call->arguments()->length());
10523 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10524 HValue* value = Pop();
10525 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::HIGH);
10526 return ast_context()->ReturnInstruction(result, call->id());
10527 }
10528
10529
10530 void HOptimizedGraphBuilder::GenerateConstructDouble(CallRuntime* call) {
10531 ASSERT_EQ(2, call->arguments()->length());
10532 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10533 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
10534 HValue* lo = Pop();
10535 HValue* hi = Pop();
10536 HInstruction* result = NewUncasted<HConstructDouble>(hi, lo);
10537 return ast_context()->ReturnInstruction(result, call->id());
10538 }
10539
10540
10512 // Construct a RegExp exec result with two in-object properties. 10541 // Construct a RegExp exec result with two in-object properties.
10513 void HOptimizedGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) { 10542 void HOptimizedGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) {
10514 ASSERT_EQ(3, call->arguments()->length()); 10543 ASSERT_EQ(3, call->arguments()->length());
10515 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 10544 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10516 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 10545 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
10517 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); 10546 CHECK_ALIVE(VisitForValue(call->arguments()->at(2)));
10518 HValue* input = Pop(); 10547 HValue* input = Pop();
10519 HValue* index = Pop(); 10548 HValue* index = Pop();
10520 HValue* length = Pop(); 10549 HValue* length = Pop();
10521 HValue* result = BuildRegExpConstructResult(length, index, input); 10550 HValue* result = BuildRegExpConstructResult(length, index, input);
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
11273 if (ShouldProduceTraceOutput()) { 11302 if (ShouldProduceTraceOutput()) {
11274 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11303 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11275 } 11304 }
11276 11305
11277 #ifdef DEBUG 11306 #ifdef DEBUG
11278 graph_->Verify(false); // No full verify. 11307 graph_->Verify(false); // No full verify.
11279 #endif 11308 #endif
11280 } 11309 }
11281 11310
11282 } } // namespace v8::internal 11311 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698