OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 code->instruction_start(), | 190 code->instruction_start(), |
191 code->instruction_size()); | 191 code->instruction_size()); |
192 } | 192 } |
193 } | 193 } |
194 #endif | 194 #endif |
195 | 195 |
196 // Allocate function. | 196 // Allocate function. |
197 Handle<JSFunction> fun = | 197 Handle<JSFunction> fun = |
198 Factory::NewFunctionBoilerplate(lit->name(), | 198 Factory::NewFunctionBoilerplate(lit->name(), |
199 lit->materialized_literal_count(), | 199 lit->materialized_literal_count(), |
200 lit->contains_array_literal(), | |
201 code); | 200 code); |
202 | 201 |
203 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position()); | 202 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position()); |
204 CodeGenerator::SetFunctionInfo(fun, lit, true, script); | 203 CodeGenerator::SetFunctionInfo(fun, lit, true, script); |
205 | 204 |
206 // Hint to the runtime system used when allocating space for initial | 205 // Hint to the runtime system used when allocating space for initial |
207 // property space by setting the expected number of properties for | 206 // property space by setting the expected number of properties for |
208 // the instances of the function. | 207 // the instances of the function. |
209 SetExpectedNofPropertiesFromEstimate(fun, lit->expected_property_count()); | 208 SetExpectedNofPropertiesFromEstimate(fun, lit->expected_property_count()); |
210 | 209 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 lit->has_only_simple_this_property_assignments(), | 410 lit->has_only_simple_this_property_assignments(), |
412 *lit->this_property_assignments()); | 411 *lit->this_property_assignments()); |
413 | 412 |
414 // Check the function has compiled code. | 413 // Check the function has compiled code. |
415 ASSERT(shared->is_compiled()); | 414 ASSERT(shared->is_compiled()); |
416 return true; | 415 return true; |
417 } | 416 } |
418 | 417 |
419 | 418 |
420 } } // namespace v8::internal | 419 } } // namespace v8::internal |
OLD | NEW |