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 3208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3219 | 3219 |
3220 #undef DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR | 3220 #undef DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR |
3221 | 3221 |
3222 | 3222 |
3223 HInstruction* HStringAdd::New( | 3223 HInstruction* HStringAdd::New( |
3224 Zone* zone, HValue* context, HValue* left, HValue* right) { | 3224 Zone* zone, HValue* context, HValue* left, HValue* right) { |
3225 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) { | 3225 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) { |
3226 HConstant* c_right = HConstant::cast(right); | 3226 HConstant* c_right = HConstant::cast(right); |
3227 HConstant* c_left = HConstant::cast(left); | 3227 HConstant* c_left = HConstant::cast(left); |
3228 if (c_left->HasStringValue() && c_right->HasStringValue()) { | 3228 if (c_left->HasStringValue() && c_right->HasStringValue()) { |
3229 return new(zone) HConstant(FACTORY->NewConsString(c_left->StringValue(), | 3229 Factory* factory = Isolate::Current()->factory(); |
| 3230 return new(zone) HConstant(factory->NewConsString(c_left->StringValue(), |
3230 c_right->StringValue()), | 3231 c_right->StringValue()), |
3231 Representation::Tagged()); | 3232 Representation::Tagged()); |
3232 } | 3233 } |
3233 } | 3234 } |
3234 return new(zone) HStringAdd(context, left, right); | 3235 return new(zone) HStringAdd(context, left, right); |
3235 } | 3236 } |
3236 | 3237 |
3237 | 3238 |
3238 HInstruction* HStringCharFromCode::New( | 3239 HInstruction* HStringCharFromCode::New( |
3239 Zone* zone, HValue* context, HValue* char_code) { | 3240 Zone* zone, HValue* context, HValue* char_code) { |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3805 case kBackingStore: | 3806 case kBackingStore: |
3806 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 3807 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); |
3807 stream->Add("[backing-store]"); | 3808 stream->Add("[backing-store]"); |
3808 break; | 3809 break; |
3809 } | 3810 } |
3810 | 3811 |
3811 stream->Add("@%d", offset()); | 3812 stream->Add("@%d", offset()); |
3812 } | 3813 } |
3813 | 3814 |
3814 } } // namespace v8::internal | 3815 } } // namespace v8::internal |
OLD | NEW |