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

Side by Side Diff: src/hydrogen.cc

Issue 189533008: Revert "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 10490 matching lines...) Expand 10 before | Expand all | Expand 10 after
10501 // Support for direct calls from JavaScript to native RegExp code. 10501 // Support for direct calls from JavaScript to native RegExp code.
10502 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { 10502 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
10503 ASSERT_EQ(4, call->arguments()->length()); 10503 ASSERT_EQ(4, call->arguments()->length());
10504 CHECK_ALIVE(VisitExpressions(call->arguments())); 10504 CHECK_ALIVE(VisitExpressions(call->arguments()));
10505 PushArgumentsFromEnvironment(call->arguments()->length()); 10505 PushArgumentsFromEnvironment(call->arguments()->length());
10506 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4); 10506 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4);
10507 return ast_context()->ReturnInstruction(result, call->id()); 10507 return ast_context()->ReturnInstruction(result, call->id());
10508 } 10508 }
10509 10509
10510 10510
10511 void HOptimizedGraphBuilder::GenerateDoubleLo(CallRuntime* call) {
10512 ASSERT_EQ(1, call->arguments()->length());
10513 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10514 HValue* value = Pop();
10515 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::LOW);
10516 return ast_context()->ReturnInstruction(result, call->id());
10517 }
10518
10519
10520 void HOptimizedGraphBuilder::GenerateDoubleHi(CallRuntime* call) {
10521 ASSERT_EQ(1, call->arguments()->length());
10522 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10523 HValue* value = Pop();
10524 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::HIGH);
10525 return ast_context()->ReturnInstruction(result, call->id());
10526 }
10527
10528
10529 void HOptimizedGraphBuilder::GenerateConstructDouble(CallRuntime* call) {
10530 ASSERT_EQ(2, call->arguments()->length());
10531 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10532 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
10533 HValue* lo = Pop();
10534 HValue* hi = Pop();
10535 HInstruction* result = NewUncasted<HConstructDouble>(hi, lo);
10536 return ast_context()->ReturnInstruction(result, call->id());
10537 }
10538
10539
10540 // Construct a RegExp exec result with two in-object properties. 10511 // Construct a RegExp exec result with two in-object properties.
10541 void HOptimizedGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) { 10512 void HOptimizedGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) {
10542 ASSERT_EQ(3, call->arguments()->length()); 10513 ASSERT_EQ(3, call->arguments()->length());
10543 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 10514 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
10544 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 10515 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
10545 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); 10516 CHECK_ALIVE(VisitForValue(call->arguments()->at(2)));
10546 HValue* input = Pop(); 10517 HValue* input = Pop();
10547 HValue* index = Pop(); 10518 HValue* index = Pop();
10548 HValue* length = Pop(); 10519 HValue* length = Pop();
10549 HValue* result = BuildRegExpConstructResult(length, index, input); 10520 HValue* result = BuildRegExpConstructResult(length, index, input);
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
11301 if (ShouldProduceTraceOutput()) { 11272 if (ShouldProduceTraceOutput()) {
11302 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11273 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11303 } 11274 }
11304 11275
11305 #ifdef DEBUG 11276 #ifdef DEBUG
11306 graph_->Verify(false); // No full verify. 11277 graph_->Verify(false); // No full verify.
11307 #endif 11278 #endif
11308 } 11279 }
11309 11280
11310 } } // namespace v8::internal 11281 } } // 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