[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r118013: * alloc.c (mark_overlay): Assume that overl
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r118013: * alloc.c (mark_overlay): Assume that overlay boundaries are |
Date: |
Thu, 02 Oct 2014 14:01:45 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 118013
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2014-10-02 18:01:27 +0400
message:
* alloc.c (mark_overlay): Assume that overlay boundaries are
always markers. Add comment.
* lread.c (read_internal_start): Use convenient validate_subarray.
Adjust docstring.
(Fread_from_string): Adjust docstring.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/alloc.c alloc.c-20091113204419-o5vbwnq5f7feedwu-252
src/lread.c lread.c-20091113204419-o5vbwnq5f7feedwu-266
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-10-02 12:27:19 +0000
+++ b/src/ChangeLog 2014-10-02 14:01:27 +0000
@@ -1,3 +1,11 @@
+2014-10-02 Dmitry Antipov <address@hidden>
+
+ * alloc.c (mark_overlay): Assume that overlay boundaries are
+ always markers. Add comment.
+ * lread.c (read_internal_start): Use convenient validate_subarray.
+ Adjust docstring.
+ (Fread_from_string): Adjust docstring.
+
2014-10-02 Stefan Monnier <address@hidden>
* lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2014-09-30 20:17:36 +0000
+++ b/src/alloc.c 2014-10-02 14:01:27 +0000
@@ -6015,8 +6015,9 @@
for (; ptr && !ptr->gcmarkbit; ptr = ptr->next)
{
ptr->gcmarkbit = 1;
- mark_object (ptr->start);
- mark_object (ptr->end);
+ /* These two are always markers and can be marked fast. */
+ XMARKER (ptr->start)->gcmarkbit = 1;
+ XMARKER (ptr->end)->gcmarkbit = 1;
mark_object (ptr->plist);
}
}
=== modified file 'src/lread.c'
--- a/src/lread.c 2014-10-01 03:28:16 +0000
+++ b/src/lread.c 2014-10-02 14:01:27 +0000
@@ -2096,9 +2096,10 @@
doc: /* Read one Lisp expression which is represented as text by STRING.
Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX).
FINAL-STRING-INDEX is an integer giving the position of the next
- remaining character in STRING.
-START and END optionally delimit a substring of STRING from which to read;
- they default to 0 and (length STRING) respectively. */)
+remaining character in STRING. START and END optionally delimit
+a substring of STRING from which to read; they default to 0 and
+(length STRING) respectively. Negative values are counted from
+the end of STRING. */)
(Lisp_Object string, Lisp_Object start, Lisp_Object end)
{
Lisp_Object ret;
@@ -2109,10 +2110,9 @@
}
/* Function to set up the global context we need in toplevel read
- calls. */
+ calls. START and END only used when STREAM is a string. */
static Lisp_Object
read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end)
-/* `start', `end' only used when stream is a string. */
{
Lisp_Object retval;
@@ -2134,25 +2134,9 @@
else
string = XCAR (stream);
- if (NILP (end))
- endval = SCHARS (string);
- else
- {
- CHECK_NUMBER (end);
- if (! (0 <= XINT (end) && XINT (end) <= SCHARS (string)))
- args_out_of_range (string, end);
- endval = XINT (end);
- }
+ validate_subarray (string, start, end, SCHARS (string),
+ &startval, &endval);
- if (NILP (start))
- startval = 0;
- else
- {
- CHECK_NUMBER (start);
- if (! (0 <= XINT (start) && XINT (start) <= endval))
- args_out_of_range (string, start);
- startval = XINT (start);
- }
read_from_string_index = startval;
read_from_string_index_byte = string_char_to_byte (string, startval);
read_from_string_limit = endval;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r118013: * alloc.c (mark_overlay): Assume that overlay boundaries are,
Dmitry Antipov <=