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 8274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8285 Code* code = this->code(); | 8285 Code* code = this->code(); |
8286 if (IsCodeEquivalent(code, recompiled)) { | 8286 if (IsCodeEquivalent(code, recompiled)) { |
8287 // Copy the deoptimization data from the recompiled code. | 8287 // Copy the deoptimization data from the recompiled code. |
8288 code->set_deoptimization_data(recompiled->deoptimization_data()); | 8288 code->set_deoptimization_data(recompiled->deoptimization_data()); |
8289 code->set_has_deoptimization_support(true); | 8289 code->set_has_deoptimization_support(true); |
8290 } else { | 8290 } else { |
8291 // TODO(3025757): In case the recompiled isn't equivalent to the | 8291 // TODO(3025757): In case the recompiled isn't equivalent to the |
8292 // old code, we have to replace it. We should try to avoid this | 8292 // old code, we have to replace it. We should try to avoid this |
8293 // altogether because it flushes valuable type feedback by | 8293 // altogether because it flushes valuable type feedback by |
8294 // effectively resetting all IC state. | 8294 // effectively resetting all IC state. |
8295 set_code(recompiled); | 8295 ReplaceCode(recompiled); |
8296 } | 8296 } |
8297 ASSERT(has_deoptimization_support()); | 8297 ASSERT(has_deoptimization_support()); |
8298 } | 8298 } |
8299 | 8299 |
8300 | 8300 |
8301 void SharedFunctionInfo::DisableOptimization(const char* reason) { | 8301 void SharedFunctionInfo::DisableOptimization(const char* reason) { |
8302 // Disable optimization for the shared function info and mark the | 8302 // Disable optimization for the shared function info and mark the |
8303 // code as non-optimizable. The marker on the shared function info | 8303 // code as non-optimizable. The marker on the shared function info |
8304 // is there because we flush non-optimized code thereby loosing the | 8304 // is there because we flush non-optimized code thereby loosing the |
8305 // non-optimizable information for the code. When the code is | 8305 // non-optimizable information for the code. When the code is |
(...skipping 5474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13780 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13780 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13781 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13781 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13782 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13782 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13783 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13783 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13784 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13784 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13785 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13785 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13786 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13786 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13787 } | 13787 } |
13788 | 13788 |
13789 } } // namespace v8::internal | 13789 } } // namespace v8::internal |
OLD | NEW |