| 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 3122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3133 target_shared->set_length(source_shared->length()); | 3133 target_shared->set_length(source_shared->length()); |
| 3134 target_shared->set_formal_parameter_count( | 3134 target_shared->set_formal_parameter_count( |
| 3135 source_shared->formal_parameter_count()); | 3135 source_shared->formal_parameter_count()); |
| 3136 target_shared->set_script(source_shared->script()); | 3136 target_shared->set_script(source_shared->script()); |
| 3137 target_shared->set_start_position_and_type( | 3137 target_shared->set_start_position_and_type( |
| 3138 source_shared->start_position_and_type()); | 3138 source_shared->start_position_and_type()); |
| 3139 target_shared->set_end_position(source_shared->end_position()); | 3139 target_shared->set_end_position(source_shared->end_position()); |
| 3140 bool was_native = target_shared->native(); | 3140 bool was_native = target_shared->native(); |
| 3141 target_shared->set_compiler_hints(source_shared->compiler_hints()); | 3141 target_shared->set_compiler_hints(source_shared->compiler_hints()); |
| 3142 target_shared->set_native(was_native); | 3142 target_shared->set_native(was_native); |
| 3143 target_shared->set_profiler_ticks(source_shared->profiler_ticks()); |
| 3143 | 3144 |
| 3144 // Set the code of the target function. | 3145 // Set the code of the target function. |
| 3145 target->ReplaceCode(source_shared->code()); | 3146 target->ReplaceCode(source_shared->code()); |
| 3146 ASSERT(target->next_function_link()->IsUndefined()); | 3147 ASSERT(target->next_function_link()->IsUndefined()); |
| 3147 | 3148 |
| 3148 // Make sure we get a fresh copy of the literal vector to avoid cross | 3149 // Make sure we get a fresh copy of the literal vector to avoid cross |
| 3149 // context contamination. | 3150 // context contamination. |
| 3150 Handle<Context> context(source->context()); | 3151 Handle<Context> context(source->context()); |
| 3151 int number_of_literals = source->NumberOfLiterals(); | 3152 int number_of_literals = source->NumberOfLiterals(); |
| 3152 Handle<FixedArray> literals = | 3153 Handle<FixedArray> literals = |
| (...skipping 11991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15144 } | 15145 } |
| 15145 return NULL; | 15146 return NULL; |
| 15146 } | 15147 } |
| 15147 | 15148 |
| 15148 | 15149 |
| 15149 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15150 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15150 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15151 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15151 } | 15152 } |
| 15152 | 15153 |
| 15153 } } // namespace v8::internal | 15154 } } // namespace v8::internal |
| OLD | NEW |