summaryrefslogtreecommitdiff
path: root/defs
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 21:17:06 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 21:17:06 +0000
commit07ac58747f84412ea476b911fd25219093c581ed (patch)
tree6d1a97aa0c4f5e55f767ea4f602da32b894a393c /defs
parentd6f5e30df87b4dfa4d66d8f4cb74da7dde949e8d (diff)
downloadbundler-07ac58747f84412ea476b911fd25219093c581ed.tar.gz
* compile.c (iseq_compile_each): emit opt_str_freeze if the #freeze
method is called on a static string literal with no arguments. * defs/id.def (firstline): add freeze so idFreeze is available * insns.def (opt_str_freeze): add opt_str_freeze instruction which pushes a frozen string literal without allocating a new object if String#freeze is not overriden * string.c (Init_String): define String#freeze * vm.c (vm_init_redefined_flag): define BOP_FREEZE on String class as a basic operation * vm_insnhelper.h: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'defs')
-rw-r--r--defs/id.def1
1 files changed, 1 insertions, 0 deletions
diff --git a/defs/id.def b/defs/id.def
index 57c0ae9f14..53ed3775ad 100644
--- a/defs/id.def
+++ b/defs/id.def
@@ -1,5 +1,6 @@
# -*- mode: ruby; coding: us-ascii -*-
firstline, predefined = __LINE__+1, %[\
+ freeze
inspect
intern
object_id