11#include " arguments.hpp"
2- #include " bytecode_verification .hpp"
2+ #include " bytecode_verifier .hpp"
33#include " call_frame.hpp"
44#include " configuration.hpp"
55#include " instruments/timing.hpp"
@@ -112,9 +112,7 @@ namespace rubinius {
112112 return as<Fixnum>(lines ()->at (fin+1 ))->to_native ();
113113 }
114114
115- MachineCode* CompiledCode::internalize (STATE,
116- const char ** reason, int * ip)
117- {
115+ MachineCode* CompiledCode::internalize (STATE) {
118116 MachineCode* mcode = machine_code ();
119117
120118 atomic::memory_barrier ();
@@ -129,13 +127,8 @@ namespace rubinius {
129127 mcode = self->machine_code ();
130128 if (!mcode) {
131129 {
132- BytecodeVerification bv (self);
133- if (!bv.verify (state)) {
134- if (reason) *reason = bv.failure_reason ();
135- if (ip) *ip = bv.failure_ip ();
136- std::cerr << " Error validating bytecode: " << bv.failure_reason () << " \n " ;
137- return 0 ;
138- }
130+ BytecodeVerifier bytecode_verifier (self);
131+ bytecode_verifier.verify (state);
139132 }
140133
141134 mcode = new MachineCode (state, self);
@@ -197,18 +190,12 @@ namespace rubinius {
197190 {
198191 CompiledCode* code = as<CompiledCode>(exec);
199192 if (code->execute == default_executor) {
200- const char * reason = 0 ;
201- int ip = -1 ;
202-
203193 OnStack<5 > os (state, code, exec, mod, args.recv_location (), args.block_location ());
204194
205195 memory::VariableRootBuffer vrb (state->vm ()->current_root_buffers (),
206196 &args.arguments_location (), args.total ());
207197
208- if (!code->internalize (state, &reason, &ip)) {
209- Exception::bytecode_error (state, code, ip, reason);
210- return 0 ;
211- }
198+ if (!code->internalize (state)) return 0 ;
212199 }
213200
214201 return code->execute (state, exec, mod, args);
0 commit comments