Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: src/type-info.cc

Issue 14990014: Collect type feedback in separate pass and store it in AST (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Consistent check-alive Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/type-info.h ('k') | src/typing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index 1757bee767381c68ddafbae97e9457592514fe19..15455d2dc89783d846b74d17abe1f62aa146d605 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -180,10 +180,11 @@ bool TypeFeedbackOracle::ObjectLiteralStoreIsMonomorphic(
}
-bool TypeFeedbackOracle::IsForInFastCase(ForInStatement* stmt) {
+byte TypeFeedbackOracle::ForInType(ForInStatement* stmt) {
Handle<Object> value = GetInfo(stmt->ForInFeedbackId());
return value->IsSmi() &&
- Smi::cast(*value)->value() == TypeFeedbackCells::kForInFastCaseMarker;
+ Smi::cast(*value)->value() == TypeFeedbackCells::kForInFastCaseMarker
+ ? ForInStatement::FAST_FOR_IN : ForInStatement::SLOW_FOR_IN;
}
@@ -219,8 +220,8 @@ Handle<Map> TypeFeedbackOracle::StoreMonomorphicReceiverType(
Handle<Map> TypeFeedbackOracle::CompareNilMonomorphicReceiverType(
- TypeFeedbackId id) {
- Handle<Object> maybe_code = GetInfo(id);
+ CompareOperation* expr) {
+ Handle<Object> maybe_code = GetInfo(expr->CompareOperationFeedbackId());
if (maybe_code->IsCode()) {
Map* first_map = Handle<Code>::cast(maybe_code)->FindFirstMap();
if (first_map != NULL) return Handle<Map>(first_map);
@@ -287,31 +288,6 @@ CheckType TypeFeedbackOracle::GetCallCheckType(Call* expr) {
}
-Handle<JSObject> TypeFeedbackOracle::GetPrototypeForPrimitiveCheck(
- CheckType check) {
- JSFunction* function = NULL;
- switch (check) {
- case RECEIVER_MAP_CHECK:
- UNREACHABLE();
- break;
- case STRING_CHECK:
- function = native_context_->string_function();
- break;
- case SYMBOL_CHECK:
- function = native_context_->symbol_function();
- break;
- case NUMBER_CHECK:
- function = native_context_->number_function();
- break;
- case BOOLEAN_CHECK:
- function = native_context_->boolean_function();
- break;
- }
- ASSERT(function != NULL);
- return Handle<JSObject>(JSObject::cast(function->instance_prototype()));
-}
-
-
Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(Call* expr) {
return Handle<JSFunction>::cast(GetInfo(expr->CallFeedbackId()));
}
@@ -633,8 +609,8 @@ byte TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId id) {
}
-byte TypeFeedbackOracle::CompareNilTypes(TypeFeedbackId id) {
- Handle<Object> object = GetInfo(id);
+byte TypeFeedbackOracle::CompareNilTypes(CompareOperation* expr) {
+ Handle<Object> object = GetInfo(expr->CompareOperationFeedbackId());
if (object->IsCode() &&
Handle<Code>::cast(object)->is_compare_nil_ic_stub()) {
return Handle<Code>::cast(object)->compare_nil_state();
« no previous file with comments | « src/type-info.h ('k') | src/typing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698