#include "src/frames.h"
#include "src/frames-inl.h"
+#include "src/ostreams.h"
#include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move
#include "src/scopes.h"
#define RECURSE(call) \
do { \
- ASSERT(!visitor->HasStackOverflow()); \
+ DCHECK(!visitor->HasStackOverflow()); \
call; \
if (visitor->HasStackOverflow()) return; \
} while (false)
#ifdef OBJECT_PRINT
static void PrintObserved(Variable* var, Object* value, Type* type) {
- PrintF(" observed %s ", var->IsParameter() ? "param" : "local");
- var->name()->Print();
- PrintF(" : ");
- value->ShortPrint();
- PrintF(" -> ");
- type->TypePrint();
+ OFStream os(stdout);
+ os << " observed " << (var->IsParameter() ? "param" : "local") << " ";
+ var->name()->Print(os);
+ os << " : " << Brief(value) << " -> ";
+ type->PrintTo(os);
+ os << endl;
}
#endif // OBJECT_PRINT
Scope* scope = info_->scope();
// Assert that the frame on the stack belongs to the function we want to OSR.
- ASSERT_EQ(*info_->closure(), frame->function());
+ DCHECK_EQ(*info_->closure(), frame->function());
int params = scope->num_parameters();
int locals = scope->StackLocalCount();
#define RECURSE(call) \
do { \
- ASSERT(!HasStackOverflow()); \
+ DCHECK(!HasStackOverflow()); \
call; \
if (HasStackOverflow()) return; \
} while (false)
if (!expr->IsUninitialized()) {
if (prop->key()->IsPropertyName()) {
Literal* lit_key = prop->key()->AsLiteral();
- ASSERT(lit_key != NULL && lit_key->value()->IsString());
+ DCHECK(lit_key != NULL && lit_key->value()->IsString());
Handle<String> name = Handle<String>::cast(lit_key->value());
oracle()->AssignmentReceiverTypes(id, name, expr->GetReceiverTypes());
} else {
if (!expr->IsUninitialized()) {
if (expr->key()->IsPropertyName()) {
Literal* lit_key = expr->key()->AsLiteral();
- ASSERT(lit_key != NULL && lit_key->value()->IsString());
+ DCHECK(lit_key != NULL && lit_key->value()->IsString());
Handle<String> name = Handle<String>::cast(lit_key->value());
- bool is_prototype;
- oracle()->PropertyReceiverTypes(
- id, name, expr->GetReceiverTypes(), &is_prototype);
- expr->set_is_function_prototype(is_prototype);
+ oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes());
} else {
bool is_string;
oracle()->KeyedPropertyReceiverTypes(