Chromium Code Reviews| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 | 348 |
| 349 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( | 349 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( |
| 350 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); | 350 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); |
| 351 | 351 |
| 352 // JS modules are pretenured. | 352 // JS modules are pretenured. |
| 353 Handle<JSModule> NewJSModule(Handle<Context> context, | 353 Handle<JSModule> NewJSModule(Handle<Context> context, |
| 354 Handle<ScopeInfo> scope_info); | 354 Handle<ScopeInfo> scope_info); |
| 355 | 355 |
| 356 // JS arrays are pretenured when allocated by the parser. | 356 // JS arrays are pretenured when allocated by the parser. |
| 357 Handle<JSArray> NewJSArray( | 357 Handle<JSArray> NewJSArray( |
| 358 ElementsKind elements_kind, | |
| 359 int length, | |
| 360 int capacity, | |
| 361 PretenureFlag pretenure = NOT_TENURED); | |
| 362 | |
| 363 Handle<JSArray> NewJSArray( | |
| 358 int capacity, | 364 int capacity, |
| 359 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, | 365 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, |
| 366 PretenureFlag pretenure = NOT_TENURED) { | |
| 367 return NewJSArray(elements_kind, 0, capacity, pretenure); | |
|
Yang
2014/03/20 15:21:41
Do we really need this wrapper?
Igor Sheludko
2014/03/21 09:49:39
The NewJSArray() without length was here for some
| |
| 368 } | |
| 369 | |
| 370 Handle<JSArray> NewJSArrayWithElements( | |
| 371 Handle<FixedArrayBase> elements, | |
| 372 ElementsKind elements_kind, | |
| 373 int length, | |
| 360 PretenureFlag pretenure = NOT_TENURED); | 374 PretenureFlag pretenure = NOT_TENURED); |
|
Yang
2014/03/20 15:21:41
Same here.
Igor Sheludko
2014/03/21 09:49:39
Same here for NewJSArrayWithElements(). To make th
| |
| 361 | 375 |
| 362 Handle<JSArray> NewJSArrayWithElements( | 376 Handle<JSArray> NewJSArrayWithElements( |
| 363 Handle<FixedArrayBase> elements, | 377 Handle<FixedArrayBase> elements, |
| 364 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, | 378 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, |
| 365 PretenureFlag pretenure = NOT_TENURED); | 379 PretenureFlag pretenure = NOT_TENURED); |
| 366 | 380 |
| 367 void NewJSArrayStorage( | 381 void NewJSArrayStorage( |
| 368 Handle<JSArray> array, | 382 Handle<JSArray> array, |
| 369 int length, | 383 int length, |
| 370 int capacity, | 384 int capacity, |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 617 isolate()); | 631 isolate()); |
| 618 } else { | 632 } else { |
| 619 return NewNumber(static_cast<double>(value), pretenure); | 633 return NewNumber(static_cast<double>(value), pretenure); |
| 620 } | 634 } |
| 621 } | 635 } |
| 622 | 636 |
| 623 | 637 |
| 624 } } // namespace v8::internal | 638 } } // namespace v8::internal |
| 625 | 639 |
| 626 #endif // V8_FACTORY_H_ | 640 #endif // V8_FACTORY_H_ |
| OLD | NEW |