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