| 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 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3316 | 3316 |
| 3317 #undef DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR | 3317 #undef DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR |
| 3318 | 3318 |
| 3319 | 3319 |
| 3320 HInstruction* HStringAdd::New( | 3320 HInstruction* HStringAdd::New( |
| 3321 Zone* zone, HValue* context, HValue* left, HValue* right) { | 3321 Zone* zone, HValue* context, HValue* left, HValue* right) { |
| 3322 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) { | 3322 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) { |
| 3323 HConstant* c_right = HConstant::cast(right); | 3323 HConstant* c_right = HConstant::cast(right); |
| 3324 HConstant* c_left = HConstant::cast(left); | 3324 HConstant* c_left = HConstant::cast(left); |
| 3325 if (c_left->HasStringValue() && c_right->HasStringValue()) { | 3325 if (c_left->HasStringValue() && c_right->HasStringValue()) { |
| 3326 Factory* factory = Isolate::Current()->factory(); | 3326 Factory* factory = zone->isolate()->factory(); |
| 3327 return new(zone) HConstant(factory->NewConsString(c_left->StringValue(), | 3327 return new(zone) HConstant(factory->NewConsString(c_left->StringValue(), |
| 3328 c_right->StringValue()), | 3328 c_right->StringValue()), |
| 3329 Representation::Tagged()); | 3329 Representation::Tagged()); |
| 3330 } | 3330 } |
| 3331 } | 3331 } |
| 3332 return new(zone) HStringAdd(context, left, right); | 3332 return new(zone) HStringAdd(context, left, right); |
| 3333 } | 3333 } |
| 3334 | 3334 |
| 3335 | 3335 |
| 3336 HInstruction* HStringCharFromCode::New( | 3336 HInstruction* HStringCharFromCode::New( |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3866 case kBackingStore: | 3866 case kBackingStore: |
| 3867 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 3867 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); |
| 3868 stream->Add("[backing-store]"); | 3868 stream->Add("[backing-store]"); |
| 3869 break; | 3869 break; |
| 3870 } | 3870 } |
| 3871 | 3871 |
| 3872 stream->Add("@%d", offset()); | 3872 stream->Add("@%d", offset()); |
| 3873 } | 3873 } |
| 3874 | 3874 |
| 3875 } } // namespace v8::internal | 3875 } } // namespace v8::internal |
| OLD | NEW |