Unconditionally run the verifier on hhas files; fix various errors @override-unit-failures

Esse commit está contido em:
Jordan DeLong
2013-06-03 20:10:14 -07:00
commit de Sara Golemon
commit 82095e9227
8 arquivos alterados com 58 adições e 10 exclusões
+2 -1
Ver Arquivo
@@ -2654,7 +2654,8 @@ Unit* UnitEmitter::create() {
static const bool kVerifyVerbose = getenv("HHVM_VERIFY_VERBOSE");
const bool doVerify = kAlwaysVerify ||
(kVerifyNonSystem && !u->filepath()->empty() &&
!boost::ends_with(u->filepath()->data(), "systemlib.php"));
!boost::ends_with(u->filepath()->data(), "systemlib.php")) ||
boost::ends_with(u->filepath()->data(), "hhas");
if (doVerify) {
Verifier::checkUnit(u, kVerifyVerbose);
}
+2 -2
Ver Arquivo
@@ -13,6 +13,7 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
*/
#include "hphp/runtime/vm/verifier/pretty.h"
#include <iostream>
#include <iomanip>
@@ -20,7 +21,6 @@
#include "hphp/runtime/vm/repo.h"
#include "hphp/runtime/vm/verifier/util.h"
#include "hphp/runtime/vm/verifier/pretty.h"
#include "hphp/runtime/vm/verifier/cfg.h"
namespace HPHP {
@@ -149,7 +149,7 @@ void verify_error(const char* fmt, ...) {
va_start(args, fmt);
vsnprintf(buf, sizeof buf, fmt, args);
va_end(args);
printf("Verification: %s", buf);
fprintf(stderr, "Verification: %s", buf);
}
}} // namespace HPHP::VM
+4
Ver Arquivo
@@ -17,6 +17,10 @@
#ifndef incl_HPHP_VM_VERIFIER_PRETTY_H_
#define incl_HPHP_VM_VERIFIER_PRETTY_H_
#include <string>
#include "hphp/runtime/vm/core_types.h"
namespace HPHP {
class Func;
+1 -1
Ver Arquivo
@@ -54,7 +54,7 @@
.function main() {
FPushFuncD 0 "ArrayMember"
FCall 0
PopC
PopR
Array @my_array
SetL $arr
+4 -1
Ver Arquivo
@@ -46,7 +46,10 @@
.class [interface] IDunno {
.default_ctor;
.method [public abstract] abs_method {}
.method [public abstract] abs_method {
String "Pure virtual method called"
Fatal 1
}
}
.class [interface] IDunno2 { .default_ctor; }
+3 -3
Ver Arquivo
@@ -89,15 +89,15 @@ fail:
.function main() {
FPushFuncD 0 "case_three"
FCall 0
PopC
PopR
FPushFuncD 0 "with_obj"
FCall 0
PopC
PopR
FPushFuncD 0 "case_default"
FCall 0
PopC
PopR
String "Done\n"
Print
+9 -1
Ver Arquivo
@@ -4,6 +4,7 @@
.main {
FPushFuncD 1 "set_error_handler"
String "thrower"
FPassC 0
FCall 1
PopR
@@ -32,6 +33,7 @@ handler:
.function thrower() {
FPushCtorD 1 "Exception"
String "hi"
FPassC 0
FCall 1
PopR
Throw
@@ -71,7 +73,7 @@ handler:
.function make_obj($id) {
FPushCtorD 1 "DtorPrinter"
CGetL $id
FPassL 0 $id
FCall 1
PopR
RetC
@@ -87,17 +89,23 @@ handler:
.function test_unwind_dirty_stack_regs() {
FPushFuncD 1 "make_obj"
Int 0
FPassC 0
FCall 1
UnboxR
SetL $k_0
PopC
FPushFuncD 1 "make_obj"
Int 1
FPassC 0
FCall 1
UnboxR
SetL $k_1
PopC
FPushFuncD 1 "make_obj"
Int 2
FPassC 0
FCall 1
UnboxR
SetL $k_2
PopC
+33 -1
Ver Arquivo
@@ -4,6 +4,7 @@
.main {
FPushFuncD 1 "set_error_handler"
String "thrower"
FPassC 0
FCall 1
PopR
@@ -32,6 +33,7 @@ handler:
.function thrower() {
FPushCtorD 1 "Exception"
String "hi"
FPassC 0
FCall 1
PopR
Throw
@@ -71,7 +73,7 @@ handler:
.function make_obj($id) {
FPushCtorD 1 "DtorPrinter"
CGetL $id
FPassL 0 $id
FCall 1
PopR
RetC
@@ -87,77 +89,107 @@ handler:
.function test_unwind_dirty_stack_regs() {
FPushFuncD 1 "make_obj"
Int 0
FPassC 0
FCall 1
UnboxR
SetL $k_0
PopC
FPushFuncD 1 "make_obj"
Int 1
FPassC 0
FCall 1
UnboxR
SetL $k_1
PopC
FPushFuncD 1 "make_obj"
Int 2
FPassC 0
FCall 1
UnboxR
SetL $k_2
PopC
FPushFuncD 1 "make_obj"
Int 3
FPassC 0
FCall 1
UnboxR
SetL $k_3
PopC
FPushFuncD 1 "make_obj"
Int 4
FPassC 0
FCall 1
UnboxR
SetL $k_4
PopC
FPushFuncD 1 "make_obj"
Int 5
FPassC 0
FCall 1
UnboxR
SetL $k_5
PopC
FPushFuncD 1 "make_obj"
Int 6
FPassC 0
FCall 1
UnboxR
SetL $k_6
PopC
FPushFuncD 1 "make_obj"
Int 7
FPassC 0
FCall 1
UnboxR
SetL $k_7
PopC
FPushFuncD 1 "make_obj"
Int 8
FPassC 0
FCall 1
UnboxR
SetL $k_8
PopC
FPushFuncD 1 "make_obj"
Int 9
FPassC 0
FCall 1
UnboxR
SetL $k_9
PopC
FPushFuncD 1 "make_obj"
Int 10
FPassC 0
FCall 1
UnboxR
SetL $k_10
PopC
FPushFuncD 1 "make_obj"
Int 11
FPassC 0
FCall 1
UnboxR
SetL $k_11
PopC
FPushFuncD 1 "make_obj"
Int 12
FPassC 0
FCall 1
UnboxR
SetL $k_12
PopC
FPushFuncD 1 "make_obj"
Int 13
FPassC 0
FCall 1
UnboxR
SetL $k_13
PopC
FPushFuncD 1 "make_obj"
Int 14
FPassC 0
FCall 1
UnboxR
SetL $k_14
PopC