| OLD | NEW | 
|     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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   563       right->ToInt32(&value) && can_encode_arg_value(value) && |   563       right->ToInt32(&value) && can_encode_arg_value(value) && | 
|   564       (left_state_ == SMI || left_state_ == INT32) && |   564       (left_state_ == SMI || left_state_ == INT32) && | 
|   565       (result_state_ == NONE || !fixed_right_arg_.has_value); |   565       (result_state_ == NONE || !fixed_right_arg_.has_value); | 
|   566  |   566  | 
|   567   fixed_right_arg_ = Maybe<int32_t>(new_has_fixed_right_arg, value); |   567   fixed_right_arg_ = Maybe<int32_t>(new_has_fixed_right_arg, value); | 
|   568  |   568  | 
|   569   if (result.has_value) UpdateStatus(result.value, &result_state_); |   569   if (result.has_value) UpdateStatus(result.value, &result_state_); | 
|   570  |   570  | 
|   571   State max_input = Max(left_state_, right_state_); |   571   State max_input = Max(left_state_, right_state_); | 
|   572  |   572  | 
|   573   // TODO(olivf) Instead of doing this normalization we should have a Hydrogen |   573   if (!has_int_result() && op_ != Token::SHR && | 
|   574   // version of the LookupNumberStringCache to avoid a converting StringAddStub. |   574       max_input <= NUMBER && max_input > result_state_) { | 
|   575   if (left_state_ == STRING && right_state_ < STRING) { |  | 
|   576     right_state_ = GENERIC; |  | 
|   577   } else if (right_state_ == STRING && left_state_ < STRING) { |  | 
|   578     left_state_ = GENERIC; |  | 
|   579   } else if (!has_int_result() && op_ != Token::SHR && |  | 
|   580              max_input <= NUMBER && max_input > result_state_) { |  | 
|   581     result_state_ = max_input; |   575     result_state_ = max_input; | 
|   582   } |   576   } | 
|   583  |   577  | 
|   584   ASSERT(result_state_ <= (has_int_result() ? INT32 : NUMBER) || |   578   ASSERT(result_state_ <= (has_int_result() ? INT32 : NUMBER) || | 
|   585          op_ == Token::ADD); |   579          op_ == Token::ADD); | 
|   586  |   580  | 
|   587   if (old_state == GetExtraICState()) { |   581   if (old_state == GetExtraICState()) { | 
|   588     // Tagged operations can lead to non-truncating HChanges |   582     // Tagged operations can lead to non-truncating HChanges | 
|   589     if (left->IsUndefined() || left->IsBoolean()) { |   583     if (left->IsUndefined() || left->IsBoolean()) { | 
|   590       left_state_ = GENERIC; |   584       left_state_ = GENERIC; | 
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1120 void ArrayConstructorStubBase::InstallDescriptors(Isolate* isolate) { |  1114 void ArrayConstructorStubBase::InstallDescriptors(Isolate* isolate) { | 
|  1121   ArrayNoArgumentConstructorStub stub1(GetInitialFastElementsKind()); |  1115   ArrayNoArgumentConstructorStub stub1(GetInitialFastElementsKind()); | 
|  1122   InstallDescriptor(isolate, &stub1); |  1116   InstallDescriptor(isolate, &stub1); | 
|  1123   ArraySingleArgumentConstructorStub stub2(GetInitialFastElementsKind()); |  1117   ArraySingleArgumentConstructorStub stub2(GetInitialFastElementsKind()); | 
|  1124   InstallDescriptor(isolate, &stub2); |  1118   InstallDescriptor(isolate, &stub2); | 
|  1125   ArrayNArgumentsConstructorStub stub3(GetInitialFastElementsKind()); |  1119   ArrayNArgumentsConstructorStub stub3(GetInitialFastElementsKind()); | 
|  1126   InstallDescriptor(isolate, &stub3); |  1120   InstallDescriptor(isolate, &stub3); | 
|  1127 } |  1121 } | 
|  1128  |  1122  | 
|  1129  |  1123  | 
 |  1124 void NumberToStringStub::InstallDescriptors(Isolate* isolate) { | 
 |  1125   NumberToStringStub stub; | 
 |  1126   InstallDescriptor(isolate, &stub); | 
 |  1127 } | 
 |  1128  | 
 |  1129  | 
|  1130 void FastNewClosureStub::InstallDescriptors(Isolate* isolate) { |  1130 void FastNewClosureStub::InstallDescriptors(Isolate* isolate) { | 
|  1131   FastNewClosureStub stub(STRICT_MODE, false); |  1131   FastNewClosureStub stub(STRICT_MODE, false); | 
|  1132   InstallDescriptor(isolate, &stub); |  1132   InstallDescriptor(isolate, &stub); | 
|  1133 } |  1133 } | 
|  1134  |  1134  | 
|  1135  |  1135  | 
|  1136 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) |  1136 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) | 
|  1137     : argument_count_(ANY) { |  1137     : argument_count_(ANY) { | 
|  1138   ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |  1138   ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 
|  1139 } |  1139 } | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
|  1163   InstallDescriptor(isolate, &stub3); |  1163   InstallDescriptor(isolate, &stub3); | 
|  1164 } |  1164 } | 
|  1165  |  1165  | 
|  1166 InternalArrayConstructorStub::InternalArrayConstructorStub( |  1166 InternalArrayConstructorStub::InternalArrayConstructorStub( | 
|  1167     Isolate* isolate) { |  1167     Isolate* isolate) { | 
|  1168   InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |  1168   InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 
|  1169 } |  1169 } | 
|  1170  |  1170  | 
|  1171  |  1171  | 
|  1172 } }  // namespace v8::internal |  1172 } }  // namespace v8::internal | 
| OLD | NEW |