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

Unified Diff: src/type-info.cc

Issue 12764003: Added an Isolate parameter to some HashTable/Dictionary methods. TypeFeedbackOracle tweaks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: TypeFeedbackOracle Created 7 years, 9 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') | test/cctest/test-weakmaps.cc » ('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 857a55dac56f878da46eac87c75c57fcc3bb462f..6ac05547aac55a6091c33d531c4f07c26b2d5e72 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -62,10 +62,10 @@ TypeInfo TypeInfo::TypeFromValue(Handle<Object> value) {
TypeFeedbackOracle::TypeFeedbackOracle(Handle<Code> code,
Handle<Context> native_context,
Isolate* isolate,
- Zone* zone) {
- native_context_ = native_context;
- isolate_ = isolate;
- zone_ = zone;
+ Zone* zone)
+ : native_context_(native_context),
+ isolate_(isolate),
+ zone_(zone) {
BuildDictionary(code);
ASSERT(reinterpret_cast<Address>(*dictionary_.location()) != kHandleZapValue);
}
@@ -167,7 +167,7 @@ bool TypeFeedbackOracle::CallNewIsMonomorphic(CallNew* expr) {
if (info->IsSmi()) {
ASSERT(static_cast<ElementsKind>(Smi::cast(*info)->value()) <=
LAST_FAST_ELEMENTS_KIND);
- return Isolate::Current()->global_context()->array_function();
+ return isolate_->global_context()->array_function();
}
return info->IsJSFunction();
}
@@ -310,8 +310,7 @@ Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget(CallNew* expr) {
if (info->IsSmi()) {
ASSERT(static_cast<ElementsKind>(Smi::cast(*info)->value()) <=
LAST_FAST_ELEMENTS_KIND);
- return Handle<JSFunction>(Isolate::Current()->global_context()->
- array_function());
+ return Handle<JSFunction>(isolate_->global_context()->array_function());
} else {
return Handle<JSFunction>::cast(info);
}
@@ -638,7 +637,7 @@ byte TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId ast_id) {
void TypeFeedbackOracle::BuildDictionary(Handle<Code> code) {
AssertNoAllocation no_allocation;
ZoneList<RelocInfo> infos(16, zone());
- HandleScope scope(code->GetIsolate());
+ HandleScope scope(isolate_);
GetRelocInfos(code, &infos);
CreateDictionary(code, &infos);
ProcessRelocInfos(&infos);
« no previous file with comments | « src/type-info.h ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698