Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix conflict

  • Loading branch information...
commit 6eb1def92ac97fd7b87dae93c77961ffa1c023ab 2 parents 7ae065a + 68ee5a9
@Whiteknight Whiteknight authored
View
12 compilers/pct/src/PAST/Compiler.pir
@@ -854,23 +854,11 @@ Return the POST representation of a C<PAST::Block>.
## pir-encode name and namespace
.local string blockreg, blockref
blockreg = self.'uniquereg'('P')
- if ns goto block_ns
blockref = concat ".const 'Sub' ", blockreg
blockref = concat blockref, ' = '
$P0 = bpost.'subid'()
$S0 = self.'escape'($P0)
blockref = concat blockref, $S0
- goto have_blockref
- block_ns:
- $P0 = get_hll_global ['POST'], 'Compiler'
- blockref = concat 'get_hll_global ', blockreg
- $S0 = $P0.'key_pir'(ns)
- blockref = concat blockref, ', '
- blockref = concat blockref, $S0
- $S0 = self.'escape'(name)
- blockref = concat blockref, ', '
- blockref = concat blockref, $S0
- have_blockref:
## determine the outer POST::Sub for the new one
.local pmc outerpost
View
4 runtime/parrot/library/Archive/Tar.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2011, Parrot Foundation.
=head1 NAME
@@ -8,7 +8,7 @@ Archive/Tar
Partial port of Archive::Tar (version 1.60)
-See L<http://search.cpan.org/~bingos/Archive-Tar/>
+See L<http://search.cpan.org/dist/Archive-Tar/>
=cut
View
4 runtime/parrot/library/Archive/Zip.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2011, Parrot Foundation.
=head1 NAME
@@ -8,7 +8,7 @@ Archive/Zip
Partial port of Archive::Zip (version 1.30)
-See L<http://search.cpan.org/~adamk/Archive-Zip/>
+See L<http://search.cpan.org/dist/Archive-Zip/>
=cut
View
4 runtime/parrot/library/HTTP/Message.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2011, Parrot Foundation.
=head1 NAME
@@ -7,7 +7,7 @@ LWP - The World-Wide Web library for Parrot
=head2 DESCRIPTION
Simplified port of LWP (version 5.834)
-see http://search.cpan.org/~gaas/libwww-perl/
+see http://search.cpan.org/dist/libwww-perl/
=head3 HTTP;Date
View
4 runtime/parrot/library/LWP/Protocol.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2011, Parrot Foundation.
=head1 NAME
@@ -7,7 +7,7 @@ LWP - The World-Wide Web library for Parrot
=head2 DESCRIPTION
Simplified port of LWP (version 5.834)
-see http://search.cpan.org/~gaas/libwww-perl/
+see http://search.cpan.org/dist/libwww-perl/
=head3 Class LWP;Protocol
View
6 runtime/parrot/library/LWP/UserAgent.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2011, Parrot Foundation.
=head1 NAME
@@ -6,8 +6,8 @@ LWP - The World-Wide Web library for Parrot
=head2 DESCRIPTION
-Simplified port of LWP (version 5.834)
-see http://search.cpan.org/~gaas/libwww-perl/
+Simplified port of LWP::UserAgent (version 5.834)
+see http://search.cpan.org/dist/libwww-perl/
=head3 Class LWP;UserAgent
View
26 runtime/parrot/library/NCI/Utils.pir
@@ -12,11 +12,11 @@ NCI/Utils.pir - Utility functions to make Parrot NCI work easier
use FooTK:from<parrot>;
sub MAIN(*@ARGS is rw) {
- # Call toolkit's init function, overwriting @ARGS with mangled copy
+ # Call toolkit's init function, overwriting @ARGS with mangled copy
@ARGS = call_toolkit_init(&fooInit, @ARGS, $*PROGRAM_NAME);
- # Alternately, you can save both the original @ARGS and mangled copy
- my @mangled_args = call_toolkit_init(&fooInit, @ARGS);
+ # Alternately, you can save both the original @ARGS and mangled copy
+ my @mangled_args = call_toolkit_init(&fooInit, @ARGS);
# ...
}
@@ -26,20 +26,20 @@ NCI/Utils.pir - Utility functions to make Parrot NCI work easier
.param pmc argv
# Load this library and the NCI wrapper for a framework/toolkit
- load_bytecode 'NCI/Utils.pbc'
- load_bytecode 'FooTK.pbc'
+ load_bytecode 'NCI/Utils.pbc'
+ load_bytecode 'FooTK.pbc'
- # Find Subs for call_toolkit_init() and the toolkit's init function
+ # Find Subs for call_toolkit_init() and the toolkit's init function
.local pmc call_toolkit_init, fooInit
- call_toolkit_init = get_global ['NCI';'Utils'], 'call_toolkit_init'
- fooInit = get_global ['FooTK'], 'fooInit'
+ call_toolkit_init = get_global ['NCI';'Utils'], 'call_toolkit_init'
+ fooInit = get_global ['FooTK'], 'fooInit'
- # Call toolkit's init function, overwriting argv with mangled copy
- argv = call_toolkit_init(fooInit, argv)
+ # Call toolkit's init function, overwriting argv with mangled copy
+ argv = call_toolkit_init(fooInit, argv)
- # Alternately, you can save both the original argv and mangled copy
- .local pmc mangled_argv
- mangled_argv = call_toolkit_init(fooInit, argv)
+ # Alternately, you can save both the original argv and mangled copy
+ .local pmc mangled_argv
+ mangled_argv = call_toolkit_init(fooInit, argv)
# ...
.end
View
2  runtime/parrot/library/Stream/Sub.pir
@@ -19,7 +19,7 @@ version 0.1
...
.sub _test :method
- self."write"( "hello, world" )
+ self."write"( "hello, world" )
.end
=head1 DESCRIPTION
View
4 runtime/parrot/library/Stream/Writer.pir
@@ -21,8 +21,8 @@ version 0.1
...
.sub _reader :method
- .local string str
- str = self."read"()
+ .local string str
+ str = self."read"()
.end
=head1 DESCRIPTION
View
6 runtime/parrot/library/TAP/Harness.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2011, Parrot Foundation.
=head1 NAME
@@ -9,8 +9,8 @@ TAP/Harness
Simplified port of TAP::Harness (version 3.21)
and TAP::Harness::Archive (version 0.14)
-See L<http://search.cpan.org/~andya/Test-Harness/>
-end L<http://search.cpan.org/~wonko/TAP-Harness-Archive/>.
+See L<http://search.cpan.org/dist/Test-Harness/>
+end L<http://search.cpan.org/dist/TAP-Harness-Archive/>.
=head3 Class TAP;Harness
View
4 runtime/parrot/library/TAP/Parser.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2011, Parrot Foundation.
=head1 NAME
@@ -8,7 +8,7 @@ TAP/Parser
Simplified port of TAP::Parser (version 3.21)
-See L<http://search.cpan.org/~andya/Test-Harness/>
+See L<http://search.cpan.org/dist/Test-Harness/>
=head3 Class TAP;Parser;Result
View
5 src/dynoplibs/io.ops
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, Parrot Foundation.
+ * Copyright (C) 2010-2011, Parrot Foundation.
** io.ops
*/
@@ -182,8 +182,7 @@ op tell(out INT, invar PMC) :base_io {
op tell(out INT, out INT, invar PMC) :base_io {
if ($3) {
- PIOOFF_T pos;
- pos = Parrot_io_tell_handle(interp, $3);
+ const PIOOFF_T pos = Parrot_io_tell_handle(interp, $3);
$1 = (INTVAL)(pos >> 31);
$2 = (INTVAL)(pos & 0xffffffff);
}
View
4 src/dynoplibs/trans.ops
@@ -172,7 +172,7 @@ Set $1 to the base 2 logarithm of $2.
=cut
op log2(out NUM, in NUM) :base_math {
- FLOATVAL temp = log((FLOATVAL)2.0);
+ const FLOATVAL temp = log((FLOATVAL)2.0);
$1 = log((FLOATVAL)$2) / temp;
}
@@ -326,7 +326,7 @@ inline op pow(out NUM, in NUM, in INT) :base_core {
=head1 COPYRIGHT
-Copyright (C) 2010-2010, Parrot Foundation.
+Copyright (C) 2010-2011, Parrot Foundation.
=head1 LICENSE
View
20 src/embed.c
@@ -454,6 +454,9 @@ Parrot_load_bytecode_file(PARROT_INTERP, ARGIN(const char *filename))
return 0;
Parrot_pf_set_current_packfile(interp, pf);
return 1;
+#else
+ UNUSED(interp);
+ UNUSED(filename);
#endif
return 0;
}
@@ -576,7 +579,7 @@ set_current_sub(PARROT_INTERP)
*/
for (i = 0; i < ct->pmc.const_count; i++) {
- PMC *sub_pmc = ct->pmc.constants[i];
+ PMC * const sub_pmc = ct->pmc.constants[i];
if (VTABLE_isa(interp, sub_pmc, SUB)) {
Parrot_Sub_attributes *sub;
@@ -730,7 +733,7 @@ print_constant_table(PARROT_INTERP, ARGIN(PMC *output))
Parrot_io_fprintf(interp, output, "STR_CONST(%d): %S\n", i, ct->str.constants[i]);
for (i = 0; i < ct->pmc.const_count; i++) {
- PMC *c = ct->pmc.constants[i];
+ PMC * const c = ct->pmc.constants[i];
Parrot_io_fprintf(interp, output, "PMC_CONST(%d): ", i);
switch (c->vtable->base_type) {
@@ -906,22 +909,25 @@ Parrot_compile_string(PARROT_INTERP, Parrot_String type, ARGIN(const char *code)
ARGOUT(Parrot_String *error))
{
ASSERT_ARGS(Parrot_compile_string)
- PMC * compiler = Parrot_get_compiler(interp, type);
+ PMC * const compiler = Parrot_get_compiler(interp, type);
+ /* XXX error is not being set */
if (PMC_IS_NULL(compiler)) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
"Could not find compiler %Ss", type);
}
else {
+ PMC *result;
STRING * const code_s = Parrot_str_new(interp, code, 0);
- PMC * result = PMCNULL;
- imc_info_t * imcc = (imc_info_t*) VTABLE_get_pointer(interp, compiler);
- INTVAL is_pasm = VTABLE_get_integer(interp, compiler);
+ imc_info_t * imcc = (imc_info_t*) VTABLE_get_pointer(interp, compiler);
+ const INTVAL is_pasm = VTABLE_get_integer(interp, compiler);
+
Parrot_block_GC_mark(interp);
result = imcc_compile_string(imcc, code_s, is_pasm);
if (PMC_IS_NULL(result)) {
STRING * const msg = imcc_last_error_message(imcc);
- INTVAL code = imcc_last_error_code(imcc);
+ const INTVAL code = imcc_last_error_code(imcc);
+
Parrot_unblock_GC_mark(interp);
Parrot_ex_throw_from_c_args(interp, NULL, code, "%Ss", msg);
}
View
14 src/ops/core.ops
@@ -504,8 +504,8 @@ op set_returns(inconst PMC) :flow {
op get_results(inconst PMC) :flow {
opcode_t * const raw_params = CUR_OPCODE;
PMC * const signature = $1;
- PMC *ctx = CURRENT_CONTEXT(interp);
- PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
+ PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
INTVAL argc;
@@ -1275,7 +1275,7 @@ inline op loadlib(out PMC, in STR, in PMC) {
op dlfunc(out PMC, invar PMC, in STR, in STR) {
void *dl_handle = NULL;
- void *ptr = NULL;
+ void *ptr;
funcptr_t p;
if (!PMC_IS_NULL($2)
@@ -1288,7 +1288,7 @@ op dlfunc(out PMC, invar PMC, in STR, in STR) {
p = D2FPTR(ptr);
if (p == NULLfunc) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
"Symbol '%Ss' not found: %s\n", $3, err ? err : "unknown reason");
$1 = Parrot_pmc_new(interp, enum_class_Undef);
@@ -1301,7 +1301,7 @@ op dlfunc(out PMC, invar PMC, in STR, in STR) {
op dlfunc(out PMC, invar PMC, in STR, invar PMC) {
void *dl_handle = NULL;
- void *ptr = NULL;
+ void *ptr;
funcptr_t p;
if (!PMC_IS_NULL($2)
@@ -1314,7 +1314,7 @@ op dlfunc(out PMC, invar PMC, in STR, invar PMC) {
p = D2FPTR(ptr);
if (p == NULLfunc) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
"Symbol '%Ss' not found: %s\n", $3, err ? err : "unknown reason");
$1 = Parrot_pmc_new(interp, enum_class_Undef);
@@ -1327,7 +1327,7 @@ op dlfunc(out PMC, invar PMC, in STR, invar PMC) {
op dlvar(out PMC, invar PMC, in STR) {
void * dl_handle = NULL;
- void * p = NULL;
+ void * p;
if (!PMC_IS_NULL($2)
&& $2->vtable->base_type == enum_class_ParrotLibrary
View
2  src/ops/math.ops
@@ -342,7 +342,7 @@ inline op fdiv(out INT, in INT, in INT) :base_core {
}
inline op fdiv(out NUM, in NUM, in NUM) :base_core {
- FLOATVAL den = $3;
+ const FLOATVAL den = $3;
if (FLOAT_IS_ZERO(den)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_DIV_BY_ZERO,
View
3  src/ops/object.ops
@@ -1,6 +1,5 @@
/*
-
object.ops
*/
@@ -107,7 +106,7 @@ op callmethod(invar PMC, in STR, invar PMC) :object_base :flow {
opcode_t * const next = expr NEXT();
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
- opcode_t *dest = NULL;
+ opcode_t *dest;
PMC * signature = Parrot_pcc_get_signature(interp,
CURRENT_CONTEXT(interp));
View
4 src/ops/set.ops
@@ -404,7 +404,7 @@ inline op copy(inout PMC, invar PMC) :base_mem {
/* Preserve the metadata on the destination. */
PMC * const meta = VTABLE_getprops(interp, $1);
/* We have to preserve GC flags of original PMC */
- Parrot_UInt gc_flags = $1->flags & PObj_GC_all_FLAGS;
+ const Parrot_UInt gc_flags = $1->flags & PObj_GC_all_FLAGS;
/* avoid leaks and unreachable memory by destroying the destination PMC */
Parrot_pmc_destroy(interp, $1);
@@ -490,7 +490,7 @@ inline op null(out NUM) :base_core {
=head1 COPYRIGHT
-Copyright (C) 2001-2010, Parrot Foundation.
+Copyright (C) 2001-2011, Parrot Foundation.
=head1 LICENSE
View
11 src/ops/var.ops
@@ -150,7 +150,8 @@ op find_caller_lex(out PMC, in STR) {
if (!PMC_IS_NULL(lex_pad)) {
result = VTABLE_get_pmc_keyed_str(interp, lex_pad, lex_name);
}
- if (!result) result = PMCNULL;
+ if (!result)
+ result = PMCNULL;
}
$1 = result;
}
@@ -456,7 +457,7 @@ errors settings. See B<errorson>.
op find_name(out PMC, in STR) {
if (!$2) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
+ opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
"Tried to find null name");
goto ADDRESS(handler);
@@ -473,8 +474,8 @@ found.
=cut
inline op find_sub_not_null(out PMC, in STR) :base_core {
- opcode_t *dest = expr NEXT();
- PMC *sub = Parrot_ns_find_named_item(interp, $2, dest);
+ opcode_t * const dest = expr NEXT();
+ PMC * const sub = Parrot_ns_find_named_item(interp, $2, dest);
if (PMC_IS_NULL(sub)) {
opcode_t *handler;
@@ -493,7 +494,7 @@ inline op find_sub_not_null(out PMC, in STR) :base_core {
=head1 COPYRIGHT
-Copyright (C) 2001-2010, Parrot Foundation.
+Copyright (C) 2001-2011, Parrot Foundation.
=head1 LICENSE
Please sign in to comment.
Something went wrong with that request. Please try again.