OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 int literals_array_size = number_of_literals; | 1214 int literals_array_size = number_of_literals; |
1215 // If the function contains object, regexp or array literals, | 1215 // If the function contains object, regexp or array literals, |
1216 // allocate extra space for a literals array prefix containing the | 1216 // allocate extra space for a literals array prefix containing the |
1217 // context. | 1217 // context. |
1218 if (number_of_literals > 0) { | 1218 if (number_of_literals > 0) { |
1219 literals_array_size += JSFunction::kLiteralsPrefixSize; | 1219 literals_array_size += JSFunction::kLiteralsPrefixSize; |
1220 } | 1220 } |
1221 shared->set_num_literals(literals_array_size); | 1221 shared->set_num_literals(literals_array_size); |
1222 if (is_generator) { | 1222 if (is_generator) { |
1223 shared->set_instance_class_name(isolate()->heap()->Generator_string()); | 1223 shared->set_instance_class_name(isolate()->heap()->Generator_string()); |
| 1224 shared->DisableOptimization("generator"); |
1224 } | 1225 } |
1225 return shared; | 1226 return shared; |
1226 } | 1227 } |
1227 | 1228 |
1228 | 1229 |
1229 Handle<JSMessageObject> Factory::NewJSMessageObject( | 1230 Handle<JSMessageObject> Factory::NewJSMessageObject( |
1230 Handle<String> type, | 1231 Handle<String> type, |
1231 Handle<JSArray> arguments, | 1232 Handle<JSArray> arguments, |
1232 int start_position, | 1233 int start_position, |
1233 int end_position, | 1234 int end_position, |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 return Handle<Object>::null(); | 1612 return Handle<Object>::null(); |
1612 } | 1613 } |
1613 | 1614 |
1614 | 1615 |
1615 Handle<Object> Factory::ToBoolean(bool value) { | 1616 Handle<Object> Factory::ToBoolean(bool value) { |
1616 return value ? true_value() : false_value(); | 1617 return value ? true_value() : false_value(); |
1617 } | 1618 } |
1618 | 1619 |
1619 | 1620 |
1620 } } // namespace v8::internal | 1621 } } // namespace v8::internal |
OLD | NEW |