Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: src/factory.h

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed PodArray::copy_out Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/factory.h
diff --git a/src/factory.h b/src/factory.h
index 6a64e93f7d44431090614267ba7ef1d92e20bd3d..68845d21cca265d53e4d6ad047c468372a0a9ef3 100644
--- a/src/factory.h
+++ b/src/factory.h
@@ -333,6 +333,13 @@ class V8_EXPORT_PRIVATE Factory final {
Handle<ByteArray> NewByteArray(int length,
PretenureFlag pretenure = NOT_TENURED);
+ template <class T>
+ Handle<PodArray<T>> NewPodArray(int length,
Michael Starzinger 2016/11/03 12:41:44 How would you call about not adding a new factory
+ PretenureFlag pretenure = NOT_TENURED) {
+ return Handle<PodArray<T>>::cast(
+ NewByteArray(length * sizeof(T), pretenure));
+ }
+
Handle<BytecodeArray> NewBytecodeArray(int length, const byte* raw_bytecodes,
int frame_size, int parameter_count,
Handle<FixedArray> constant_pool);

Powered by Google App Engine
This is Rietveld 408576698