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

Side by Side Diff: src/code-stubs.cc

Issue 26805004: Fix potential deopt-loop introduced in r17143. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 left_state_ = GENERIC; 577 left_state_ = GENERIC;
578 } else if (!has_int_result() && op_ != Token::SHR && 578 } else if (!has_int_result() && op_ != Token::SHR &&
579 max_input <= NUMBER && max_input > result_state_) { 579 max_input <= NUMBER && max_input > result_state_) {
580 result_state_ = max_input; 580 result_state_ = max_input;
581 } 581 }
582 582
583 ASSERT(result_state_ <= (has_int_result() ? INT32 : NUMBER) || 583 ASSERT(result_state_ <= (has_int_result() ? INT32 : NUMBER) ||
584 op_ == Token::ADD); 584 op_ == Token::ADD);
585 585
586 if (old_state == GetExtraICState()) { 586 if (old_state == GetExtraICState()) {
587 // Since the fpu is to precise, we might bail out on numbers which 587 // Tagged operations can lead to non-truncating HChanges
588 // actually would truncate with 64 bit precision. 588 if (left->IsUndefined()) {
589 ASSERT(!CpuFeatures::IsSupported(SSE2) && 589 left_state_ = GENERIC;
590 result_state_ <= INT32); 590 } else if (right->IsUndefined()) {
591 result_state_ = NUMBER; 591 right_state_ = GENERIC;
592 } else {
593 // Since the fpu is to precise, we might bail out on numbers which
594 // actually would truncate with 64 bit precision.
595 ASSERT(!CpuFeatures::IsSupported(SSE2) &&
596 result_state_ <= INT32);
597 result_state_ = NUMBER;
598 }
592 } 599 }
593 } 600 }
594 601
595 602
596 void BinaryOpStub::UpdateStatus(Handle<Object> object, 603 void BinaryOpStub::UpdateStatus(Handle<Object> object,
597 State* state) { 604 State* state) {
598 v8::internal::TypeInfo type = v8::internal::TypeInfo::FromValue(object); 605 v8::internal::TypeInfo type = v8::internal::TypeInfo::FromValue(object);
599 if (object->IsUndefined()) { 606 if (object->IsUndefined()) {
600 // Undefined will be automatically truncated for us by HChange. 607 // Undefined will be automatically truncated for us by HChange.
601 type = (op_ == Token::BIT_AND || op_ == Token::BIT_OR || 608 type = (op_ == Token::BIT_AND || op_ == Token::BIT_OR ||
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 InstallDescriptor(isolate, &stub3); 1159 InstallDescriptor(isolate, &stub3);
1153 } 1160 }
1154 1161
1155 InternalArrayConstructorStub::InternalArrayConstructorStub( 1162 InternalArrayConstructorStub::InternalArrayConstructorStub(
1156 Isolate* isolate) { 1163 Isolate* isolate) {
1157 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1164 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1158 } 1165 }
1159 1166
1160 1167
1161 } } // namespace v8::internal 1168 } } // 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