Permalink
Browse files

Merge branch 'upstream' of git://github.com/leto/parrot into gsoc_nci

  • Loading branch information...
2 parents 00c5b85 + 55fab15 commit beb5efd1605c513a41cd05cfeffda6a6d9ab2ba9 @ashgti committed Jul 14, 2010
Showing with 29,992 additions and 28,540 deletions.
  1. +13 −0 DEPRECATED.pod
  2. +1 −3 MANIFEST
  3. +6 −1 MANIFEST.SKIP
  4. +5 −0 NEWS
  5. +1 −1 README
  6. +2 −4 compilers/imcc/pbc.c
  7. +14 −5 compilers/opsc/src/Ops/Trans/C.pm
  8. +34 −4 compilers/pct/src/PAST/Compiler.pir
  9. +0 −8 compilers/pct/src/PAST/Node.pir
  10. +0 −4 compilers/pct/src/POST/Node.pir
  11. +7 −6 compilers/pirc/src/pircapi.c
  12. +1 −1 config/gen/core_pmcs.pm
  13. +5 −1 config/gen/makefiles/editor.in
  14. +4 −1 config/gen/makefiles/root.in
  15. +2 −0 config/gen/opengl.pm
  16. +0 −1 config/gen/platform.pm
  17. +11 −9 config/gen/platform/ansi/dl.c
  18. +4 −2 config/gen/platform/ansi/exec.c
  19. +6 −3 config/gen/platform/ansi/time.c
  20. +0 −201 config/gen/platform/darwin/memalign.c
  21. +14 −2 config/gen/platform/generic/dl.c
  22. +3 −3 config/gen/platform/generic/env.c
  23. +15 −4 config/gen/platform/generic/exec.c
  24. +5 −11 config/gen/platform/generic/math.c
  25. +0 −94 config/gen/platform/generic/memalign.c
  26. +62 −1 config/gen/platform/generic/stat.c
  27. +14 −2 config/gen/platform/generic/time.c
  28. +5 −3 config/gen/platform/netbsd/math.c
  29. +5 −3 config/gen/platform/openbsd/math.c
  30. +5 −3 config/gen/platform/solaris/math.c
  31. +14 −2 config/gen/platform/solaris/time.c
  32. +10 −4 docs/project/release_manager_guide.pod
  33. +11 −4 editor/README.pod
  34. +0 −1 editor/filetype_parrot.vim
  35. +1 −0 editor/mk_skeleton.pir
  36. +2 −0 examples/compilers/japhc.c
  37. +1 −0 examples/pir/make_hello_pbc.pir
  38. +781 −758 ext/nqp-rx/src/stage0/HLL-s0.pir
  39. +18,888 −18,445 ext/nqp-rx/src/stage0/NQP-s0.pir
  40. +7,991 −7,912 ext/nqp-rx/src/stage0/P6Regex-s0.pir
  41. +16 −0 ext/nqp-rx/src/stage0/nqp-setting.nqp
  42. +99 −161 include/parrot/context.h
  43. +9 −0 include/parrot/dynext.h
  44. +9 −2 include/parrot/extend.h
  45. +45 −24 include/parrot/hash.h
  46. +2 −2 lib/Parrot/Configure/Options/Conf/File.pm
  47. +1 −0 lib/Parrot/Test.pm
  48. +11 −10 lib/Parrot/Test/Util/Runloop.pm
  49. +1 −1 lib/Pod/Simple/Search.pm
  50. BIN ports/fedora/2.5.0/parrot.desk.in.tar.gz
  51. +19 −0 ports/fedora/2.5.0/parrot.patch
  52. +372 −0 ports/fedora/2.5.0/parrot.spec
  53. +6 −15 runtime/parrot/library/P6object.pir
  54. +3 −2 runtime/parrot/library/Pg.pir
  55. +0 −1 runtime/parrot/library/SDL.pir
  56. +18 −28 src/call/args.c
  57. +26 −35 src/call/context.c
  58. +77 −57 src/call/context_accessors.c
  59. +14 −7 src/call/pcc.c
  60. +32 −6 src/dynext.c
  61. +3 −1 src/dynpmc/gziphandle.pmc
  62. +1 −1 src/dynpmc/rational.pmc
  63. +10 −2 src/extend.c
  64. +79 −57 src/hash.c
  65. +2 −2 src/io/api.c
  66. +122 −52 src/nci_test.c
  67. +1 −1 src/oo.c
  68. +4 −8 src/ops/core.ops
  69. +234 −235 src/ops/core_ops.c
  70. +11 −9 src/ops/object.ops
  71. +1 −1 src/packdump.c
  72. +3 −2 src/packfile.c
  73. +42 −36 src/pmc/callcontext.pmc
  74. +83 −15 src/pmc/class.pmc
  75. +13 −12 src/pmc/default.pmc
  76. +5 −3 src/pmc/filehandle.pmc
  77. +12 −5 src/pmc/fixedintegerarray.pmc
  78. +29 −3 src/pmc/handle.pmc
  79. +1 −1 src/pmc/hash.pmc
  80. +13 −6 src/pmc/hashiterator.pmc
  81. +1 −1 src/pmc/lexinfo.pmc
  82. +97 −53 src/pmc/object.pmc
  83. +9 −8 src/pmc/orderedhashiterator.pmc
  84. +6 −26 src/pmc/pmcproxy.pmc
  85. +2 −0 src/pmc/stringhandle.pmc
  86. +43 −4 src/pmc/sub.pmc
  87. +1 −1 src/pmc/unmanagedstruct.pmc
  88. +7 −5 src/pmc_freeze.c
  89. +1 −1 src/runcore/profiling.c
  90. +12 −0 src/string/charset/ascii.c
  91. +9 −0 src/string/charset/binary.c
  92. +4 −0 src/string/charset/iso-8859-1.c
  93. +8 −0 src/string/charset/unicode.c
  94. +0 −22 t/codingstd/c_function_docs.t
  95. +7 −4 t/configure/017-revision_from_cache.t
  96. +7 −4 t/configure/018-revision_to_cache.t
  97. +11 −4 t/configure/061-revision_from_cache.t
  98. +5 −3 t/dynpmc/gziphandle.t
  99. BIN t/examples/pir.t
  100. +4 −2 t/library/pcre.t
  101. +21 −1 t/pmc/arrayiterator.t
  102. +65 −63 t/pmc/exception.t
  103. +51 −1 t/pmc/exceptionhandler.t
  104. +5 −1 t/pmc/exporter.t
  105. +103 −1 t/pmc/filehandle.t
  106. +3 −1 t/pmc/hash.t
  107. +40 −3 t/pmc/hashiterator.t
  108. +83 −10 t/pmc/orderedhashiterator.t
  109. +5 −0 t/pmc/stringhandle.t
  110. +2 −1 t/postconfigure/05-trace.t
  111. +1 −1 t/steps/auto/format-01.t
  112. +3 −3 t/steps/auto/inline-01.t
  113. +1 −1 t/steps/init/hints-01.t
  114. +0 −1 t/tools/pbc_disassemble.t
  115. +1 −2 t/tools/pbc_dump.t
  116. +1 −1 t/tools/pmc2cutils/05-gen_c.t
  117. +1 −1 tools/dev/nci_thunk_gen.pir
View
@@ -141,12 +141,25 @@ things that aren't really logical ops (don't do that!).
L<https://trac.parrot.org/parrot/ticket/1655>
+=item Method is_tty in PMCs derived from Handle [eligible in 2.7]
+
+Use isatty instead.
+
+L<https://trac.parrot.org/parrot/ticket/1689>
+
=back
=head1 Opcodes
=over 4
+=item open and close opcodes will be removed [eligible in 2.7]
+
+L<https://trac.parrot.org/parrot/ticket/1697>
+
+These opcodes will be removed. The open/close methods on File or
+the FileHandle PMC should be used instead.
+
=item get_addr and set_addr [eligible in 1.5]
L<https://trac.parrot.org/parrot/ticket/218>
View
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Jun 20 14:27:22 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Jun 29 22:56:50 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -278,7 +278,6 @@ config/gen/platform/ansi/time.c []
config/gen/platform/cygwin/math.c []
config/gen/platform/darwin/begin.c []
config/gen/platform/darwin/hires_timer.c []
-config/gen/platform/darwin/memalign.c []
config/gen/platform/generic/dl.c []
config/gen/platform/generic/dl.h []
config/gen/platform/generic/env.c []
@@ -288,7 +287,6 @@ config/gen/platform/generic/io.h []
config/gen/platform/generic/itimer.c []
config/gen/platform/generic/math.c []
config/gen/platform/generic/math.h []
-config/gen/platform/generic/memalign.c []
config/gen/platform/generic/memexec.c []
config/gen/platform/generic/platform_limits.h []
config/gen/platform/generic/signal.c []
View
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Thu May 27 15:25:37 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Jun 24 14:06:33 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -69,6 +69,8 @@
^config_lib\.pir/
^cover_db$
^cover_db/
+^generated_hello\.pbc$
+^generated_hello\.pbc/
^install_config\.fpmc$
^install_config\.fpmc/
^installable.*$
@@ -624,6 +626,9 @@
# generated from svn:ignore of 'runtime/parrot/library/Test/Builder/'
^runtime/parrot/library/Test/Builder/.*\.pbc$
^runtime/parrot/library/Test/Builder/.*\.pbc/
+# generated from svn:ignore of 'runtime/parrot/library/URI/'
+^runtime/parrot/library/URI/.*\.pbc$
+^runtime/parrot/library/URI/.*\.pbc/
# generated from svn:ignore of 'runtime/parrot/library/YAML/'
^runtime/parrot/library/YAML/.*\.pbc$
^runtime/parrot/library/YAML/.*\.pbc/
View
@@ -1,5 +1,10 @@
# $Id$
+New in 2.6.0
+- Platforms
+ + The Fedora package 'parrot-devel' install the files for syntax-highlighting
+ and automatic indenting for the vim editor.
+
New in 2.5.0
- Core
+ Added ByteBuffer PMC to allow direct byte manipulation
View
@@ -79,7 +79,7 @@ You can install Parrot with:
By default, this installs in /usr/local, with the Parrot executable in
/usr/local/bin. If you want to install Parrot into another location use:
- perl Configure.pl --prefix=/Users/foo/parrot-0.7.0
+ perl Configure.pl --prefix=/home/joe/bird
make install
But please note that dynamic libs will not be found for non-standard
@@ -901,7 +901,6 @@ IMCC_string_from_reg(PARROT_INTERP, ARGIN(const SymReg *r))
const CHARSET *s_charset;
const ENCODING *s_encoding = NULL;
const ENCODING *src_encoding;
- const char *charset;
#define MAX_NAME 31
char charset_name[MAX_NAME + 1];
char encoding_name[MAX_NAME + 1];
@@ -2090,18 +2089,17 @@ int
e_pbc_end_sub(PARROT_INTERP, SHIM(void *param), ARGIN(IMC_Unit *unit))
{
ASSERT_ARGS(e_pbc_end_sub)
- Instruction *ins;
+ Instruction *ins = unit->instructions;
int pragma;
- if (!unit->instructions)
+ if (!ins)
return 0;
/*
* if the sub was marked IMMEDIATE, we run it now
* This is *dangerous*: all possible global state can be messed
* up, e.g. when that sub starts loading bytecode
*/
- ins = unit->instructions;
/* we run only PCC subs */
if (!ins->symregs[0] || !ins->symregs[0]->pcc_sub)
@@ -95,7 +95,7 @@ method goto_offset($offset) { "return (opcode_t *)cur_opcode + $offset"; }
method expr_address($addr) { $addr; }
-method expr_offset($offset) { "cur_opcode + $offset"; }
+method expr_offset($offset) { " cur_opcode + $offset"; }
=begin
@@ -299,7 +299,10 @@ static void hop_deinit(PARROT_INTERP);
* returns >= 0 (found idx into info_table), -1 if not
*/
-static size_t hash_str(const char *str) {
+PARROT_PURE_FUNCTION
+static
+size_t hash_str(ARGIN(const char *str))
+{
size_t key = 0;
const char *s = str;
@@ -311,7 +314,8 @@ static size_t hash_str(const char *str) {
return key;
}
-static void store_op(PARROT_INTERP, op_info_t *info, int full) {
+static void store_op(PARROT_INTERP, op_info_t *info, int full)
+{
HOP * const p = mem_gc_allocate_zeroed_typed(interp, HOP);
const size_t hidx =
hash_str(full ? info->full_name : info->name) % OP_HASH_SIZE;
@@ -320,7 +324,9 @@ static void store_op(PARROT_INTERP, op_info_t *info, int full) {
p->next = hop[hidx];
hop[hidx] = p;
}
-static int get_op(PARROT_INTERP, const char * name, int full) {
+
+static int get_op(PARROT_INTERP, const char * name, int full)
+{
const HOP * p;
const size_t hidx = hash_str(name) % OP_HASH_SIZE;
if (!hop) {
@@ -333,7 +339,9 @@ static int get_op(PARROT_INTERP, const char * name, int full) {
}
return -1;
}
-static void hop_init(PARROT_INTERP) {
+
+static void hop_init(PARROT_INTERP)
+{
size_t i;
op_info_t * const info = [[BS]]op_lib.op_info_table;
/* store full names */
@@ -344,6 +352,7 @@ static void hop_init(PARROT_INTERP) {
if (get_op(interp, info[i].name, 0) == -1)
store_op(interp, info + i, 0);
}
+
static void hop_deinit(PARROT_INTERP)
{
if (hop) {
@@ -18,6 +18,7 @@ what sorts of conversions are allowed (or desired). The
basic flags are:
P,S,I,N PMC, string, int, or num register
+ Q keyed PMC, next flag indicates type of key
s string register or constant
i int register or constant
n num register or constant
@@ -27,6 +28,7 @@ basic flags are:
+ PMC, int register, num register, or numeric constant
~ PMC, string register, or string constant
: argument (same as '*'), possibly with :named or :flat
+ 0-9 use the nth input operand as the output result of this operation
These flags are used to describe signatures and desired return
types for various operations. For example, if an opcode is
@@ -67,11 +69,13 @@ any value type.
piropsig['concat'] = 'PP~'
piropsig['copy'] = '0PP'
piropsig['defined'] = 'IP'
+ piropsig['delete'] = 'vQ*'
piropsig['die'] = 'v~'
piropsig['div'] = 'PP+'
piropsig['does'] = 'IPs'
piropsig['downcase'] = 'Ss'
piropsig['elements'] = 'IP'
+ piropsig['exists'] = 'IQ*'
piropsig['exit'] = 'vi'
piropsig['fdiv'] = 'PP+'
piropsig['find_codepoint'] = 'Is'
@@ -430,6 +434,7 @@ third and subsequent children can be any value they wish.
sigidx = 1
rtype = substr signature, sigidx, 1
iter_loop:
+ if rtype == 'Q' goto keyed_pos
unless iter goto iter_end
.local pmc cpast, cpost
cpast = shift iter
@@ -472,6 +477,31 @@ third and subsequent children can be any value they wish.
inc sigidx
rtype = substr signature, sigidx, 1
goto iter_loop
+ keyed_pos:
+ # rtype is 'Q', so construct a keyed pmc argument
+ # first, get the base PMC
+ unless iter goto iter_end
+ cpast = shift iter
+ cpost = self.'as_post'(cpast, 'rtype'=>'P')
+ cpost = self.'coerce'(cpost, 'P')
+ # now process the key arg
+ unless iter goto iter_end
+ .local pmc kpast, kpost
+ kpast = shift iter
+ inc sigidx
+ rtype = substr signature, sigidx, 1
+ kpost = self.'as_post'(kpast, 'rtype'=>rtype)
+ kpost = self.'coerce'(kpost, rtype)
+ ops.'push'(kpost)
+ ops.'push'(cpost)
+ # now construct the keyed PMC
+ $S0 = cpost
+ concat $S0, '['
+ $S1 = kpost
+ concat $S0, $S1
+ concat $S0, ']'
+ push posargs, $S0
+ goto iter_rtype
iter_end:
.return (ops, posargs, namedargs)
.end
@@ -1101,8 +1131,8 @@ a 'pasttype' of 'pirop'.
signature = 'vP'
have_signature:
- .local pmc ops
- ops = self.'post_children'(node, 'signature'=>signature)
+ .local pmc ops, posargs
+ (ops, posargs) = self.'post_children'(node, 'signature'=>signature)
.local pmc arglist
arglist = ops.'list'()
@@ -1118,10 +1148,10 @@ a 'pasttype' of 'pirop'.
.local string result
result = self.'uniquereg'($S0)
ops.'result'(result)
- ops.'push_pirop'(pirop, result, arglist :flat)
+ ops.'push_pirop'(pirop, result, posargs :flat)
.return (ops)
pirop_void:
- ops.'push_pirop'(pirop, arglist :flat)
+ ops.'push_pirop'(pirop, posargs :flat)
.return (ops)
.end
@@ -406,14 +406,6 @@ PIR opcodes that PAST "knows" about is in F<POST.pir>.
Get/set whether this node is an lvalue, or treats its first
child as an lvalue (e.g., for assignment).
-=cut
-
-.sub 'lvalue' :method
- .param pmc value :optional
- .param int has_value :opt_flag
- .tailcall self.'attr'('lvalue', value, has_value)
-.end
-
=item inline([STRING code])
Get/set the code to be used for inline PIR when C<pasttype> is
@@ -46,10 +46,6 @@ C<PCT::Node> (see F<compilers/pct/src/PCT/Node.pir>).
=over 4
-=item result([value])
-
-Get/set
-
=cut
.namespace [ 'POST';'Node' ]
@@ -17,6 +17,9 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
/*
@@ -72,16 +75,14 @@ open_file(ARGIN(char const * const filename), ARGIN(char const * const mode))
=item C<void parse_file(PARROT_INTERP, int flexdebug, FILE *infile, char * const
filename, int flags, int thr_id, unsigned macro_size, char * const outputfile)>
-=cut
-
This will be the proper declaration after testing for thread-safety:
void parse_file(int flexdebug, FILE *infile, char * const filename, int flags,
char * const outputfile)
-*/
-
+=cut
+*/
void
parse_file(PARROT_INTERP, int flexdebug, ARGIN(FILE *infile),
@@ -260,6 +261,8 @@ parse_string(PARROT_INTERP, ARGIN(char *pirstring), int flags, int pasminput,
=item C<PackFile_ByteCode * pirc_compile_file(PARROT_INTERP, const char
*filename, STRING **error_message)>
+Returns NULL.
+
=cut
*/
@@ -274,8 +277,6 @@ pirc_compile_file(SHIM_INTERP, SHIM(const char *filename),
}
-/* HEADERIZER END: static */
-
/*
@@ -76,7 +76,7 @@ END_H
END_H
print {$OUT} coda();
- close $OUT or die "Can't close file: $!";;
+ close $OUT or die "Can't close file: $!";
move_if_diff( "$file.tmp", $file );
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2009, Parrot Foundation.
+# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$
#IF(win32):VIM_DIR = $(USERPROFILE)/vimfiles
@@ -13,6 +13,9 @@ CP = @cp@
MKPATH = @mkpath@
RM_F = @rm_f@
+SKEL_FILE_DIR = `$(PERL) -e 'print "$(SKELETON)" || "$(VIM_DIR)"'`
+LINE = "au BufNewFile *.pir 0r $(SKEL_FILE_DIR)/skeleton.pir"
+
default: all
all: pir.vim imc.kate skeleton.pir
@@ -49,6 +52,7 @@ vim-install: pir.vim skeleton.pir
$(CP) pmc.vim "$(VIM_SYN_DIR)"
$(MKPATH) "$(VIM_FT_DIR)"
$(CP) filetype_parrot.vim "$(VIM_FT_DIR)/parrot.vim"
+ echo $(LINE) >> "$(VIM_FT_DIR)/parrot.vim"
$(MKPATH) "$(VIM_IN_DIR)"
$(CP) indent_pir.vim "$(VIM_IN_DIR)/pir.vim"
Oops, something went wrong.

0 comments on commit beb5efd

Please sign in to comment.