[前][次][番号順一覧][スレッド一覧]

ruby-changes:58483

From: Lourens <ko1@a...>
Date: Tue, 29 Oct 2019 11:31:10 +0900 (JST)
Subject: [ruby-changes:58483] 65744fb19e (master): Right size the iseq coverage branches tmp array - initializes with 5 elements

https://git.ruby-lang.org/ruby.git/commit/?id=65744fb19e

From 65744fb19efa7786c6b528d81328b641ea2e7cd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lourens=20Naud=C3=A9?= <lourens@b...>
Date: Mon, 21 Oct 2019 22:31:44 +0100
Subject: Right size the iseq coverage branches tmp array - initializes with 5
 elements


diff --git a/compile.c b/compile.c
index a478324..0b90a36 100644
--- a/compile.c
+++ b/compile.c
@@ -273,7 +273,7 @@ const ID rb_iseq_shared_exc_local_tbl[] = {idERROR_INFO}; https://github.com/ruby/ruby/blob/trunk/compile.c#L273
 	  ISEQ_BRANCH_COVERAGE(iseq) && \
 	  (first_line) > 0) { \
 	  VALUE structure = RARRAY_AREF(ISEQ_BRANCH_COVERAGE(iseq), 0); \
-	  branches = rb_ary_tmp_new(0); \
+	  branches = rb_ary_tmp_new(5); \
 	  rb_ary_push(structure, branches); \
 	  rb_ary_push(branches, ID2SYM(rb_intern(type))); \
 	  rb_ary_push(branches, INT2FIX(first_line)); \
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]