cvs: php-benchmarks /benchcli/tests/j4p5 jsc.php jsrt.php
| From: | Alexander Hjalmarsson | Date: | Mon, 06 Jul 2009 16:15:09 +0000 |
| Subject: | cvs: php-benchmarks /benchcli/tests/j4p5 jsc.php jsrt.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-65192@lists.php.net to get a copy of this message | ||
hjalle Mon Jul 6 16:15:09 2009 UTC
Modified files:
/php-benchmarks/benchcli/tests/j4p5 jsc.php jsrt.php
Log:
Fixed notices and warning
http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/j4p5/jsc.php?r1=1.1&r2=1.2&diff_format=u
Index: php-benchmarks/benchcli/tests/j4p5/jsc.php
diff -u php-benchmarks/benchcli/tests/j4p5/jsc.php:1.1
php-benchmarks/benchcli/tests/j4p5/jsc.php:1.2
--- php-benchmarks/benchcli/tests/j4p5/jsc.php:1.1 Tue Jun 2 13:22:21 2009
+++ php-benchmarks/benchcli/tests/j4p5/jsc.php Mon Jul 6 16:15:09 2009
@@ -601,10 +601,10 @@
list($this->expr, $this->code) = func_get_args();
}
function emit($w=0) {
- if ($this->expr == 0) {
- $o = " default:\n";
+ if (!is_object($this->expr) && $this->expr == 0) {
+ $o = " default:\n";
} else {
- $o = " case
(js_bool(jsrt::expr_strict_equal(\$".$this->e.",".$this->expr->emit(1)."))):\n";
+ $o = " case
(js_bool(jsrt::expr_strict_equal(\$".$this->e.",".$this->expr->emit(1)."))):\n";
}
foreach ($this->code as $code) {
$o .= " ".trim(str_replace("\n", "\n ",
$code->emit(1)))."\n";
http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/j4p5/jsrt.php?r1=1.1&r2=1.2&diff_format=u
Index: php-benchmarks/benchcli/tests/j4p5/jsrt.php
diff -u php-benchmarks/benchcli/tests/j4p5/jsrt.php:1.1
php-benchmarks/benchcli/tests/j4p5/jsrt.php:1.2
--- php-benchmarks/benchcli/tests/j4p5/jsrt.php:1.1 Tue Jun 2 13:22:21 2009
+++ php-benchmarks/benchcli/tests/j4p5/jsrt.php Mon Jul 6 16:15:09 2009
@@ -48,7 +48,9 @@
static $proto_urierror;
static function start_once() {
- if (get_class(jsrt::$global)=="js_object") return;
+ if (!is_null(jsrt::$global)) {
+ if (get_class(jsrt::$global)=="js_object") return;
+ }
jsrt::start();
}