move BoundsCheckEvent out of compiler.cpp

This commit is contained in:
Joshua Warner
2013-02-13 21:49:37 -07:00
parent d00950458f
commit be86d26512
6 changed files with 137 additions and 124 deletions

View File

@ -14,18 +14,14 @@
#include "codegen/compiler/value.h"
#include "codegen/compiler/site.h"
#include "codegen/compiler/resource.h"
#include "codegen/compiler/frame.h"
#include "codegen/compiler/promise.h"
namespace avian {
namespace codegen {
namespace compiler {
unsigned frameIndexToOffset(Context* c, unsigned frameIndex);
unsigned offsetToFrameIndex(Context* c, unsigned offset);
ResolvedPromise* resolved(Context* c, int64_t value);
int intersectFrameIndexes(int a, int b) {
if (a == NoFrameIndex or b == NoFrameIndex) return NoFrameIndex;
@ -120,7 +116,7 @@ Site* constantSite(Context* c, Promise* value) {
}
Site* constantSite(Context* c, int64_t value) {
return constantSite(c, resolved(c, value));
return constantSite(c, resolvedPromise(c, value));
}