Revision: 12979
Author: [email protected]
Date: Fri Nov 16 00:38:11 2012
Log: Removed a bunch of GetExistingThreadLocal calls by threading the
Isolate.
For Octane, the number of calls go down from 7341629 to 1947880, i.e. they
are
reduced by more than 73%. TLS access is not especially cheap, so this
exercise
seems worthwhile.
Review URL: https://codereview.chromium.org/11412007
http://code.google.com/p/v8/source/detail?r=12979
Modified:
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/arm/full-codegen-arm.cc
/branches/bleeding_edge/src/factory.cc
/branches/bleeding_edge/src/handles.h
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
/branches/bleeding_edge/src/ic-inl.h
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/objects.h
/branches/bleeding_edge/src/parser.cc
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/src/stub-cache.cc
/branches/bleeding_edge/src/type-info.cc
/branches/bleeding_edge/src/variables.h
/branches/bleeding_edge/src/x64/full-codegen-x64.cc
=======================================
--- /branches/bleeding_edge/src/api.cc Tue Nov 13 04:27:03 2012
+++ /branches/bleeding_edge/src/api.cc Fri Nov 16 00:38:11 2012
@@ -905,7 +905,7 @@
}
// Allocate a new handle on the previous handle block.
- i::Handle<i::Object> handle(result);
+ i::Handle<i::Object> handle(result, isolate_);
return handle.location();
}
@@ -3414,7 +3414,7 @@
i::Handle<i::JSObject> self = Utils::OpenHandle(this);
i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
i::Handle<i::String> key_symbol = FACTORY->LookupSymbol(key_obj);
- i::Handle<i::Object> result(self->GetHiddenProperty(*key_symbol));
+ i::Handle<i::Object> result(self->GetHiddenProperty(*key_symbol),
isolate);
if (result->IsUndefined()) return v8::Local<v8::Value>();
return Utils::ToLocal(result);
}
@@ -4649,13 +4649,14 @@
v8::Local<v8::Object> Context::Global() {
- if (IsDeadCheck(i::Isolate::Current(), "v8::Context::Global()")) {
+ i::Isolate* isolate = i::Isolate::Current();
+ if (IsDeadCheck(isolate, "v8::Context::Global()")) {
return Local<v8::Object>();
}
i::Object** ctx = reinterpret_cast<i::Object**>(this);
i::Handle<i::Context> context =
i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
- i::Handle<i::Object> global(context->global_proxy());
+ i::Handle<i::Object> global(context->global_proxy(), isolate);
return Utils::ToLocal(i::Handle<i::JSObject>::cast(global));
}
=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Thu Nov 15 05:31:27
2012
+++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Fri Nov 16 00:38:11
2012
@@ -130,7 +130,7 @@
handler_table_ =
isolate()->factory()->NewFixedArray(function()->handler_count(),
TENURED);
profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell(
- Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget)));
+ Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
SetFunctionPosition(function());
Comment cmnt(masm_, "[ function compiled by full code generator");
@@ -2377,7 +2377,7 @@
VariableProxy* proxy = callee->AsVariableProxy();
Property* property = callee->AsProperty();
- if (proxy != NULL && proxy->var()->is_possibly_eval()) {
+ if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
// In a call to eval, we first call %ResolvePossiblyDirectEval to
// resolve the function we need to call and the receiver of the
// call. Then we call the resolved function using the given
=======================================
--- /branches/bleeding_edge/src/factory.cc Thu Nov 15 05:31:27 2012
+++ /branches/bleeding_edge/src/factory.cc Fri Nov 16 00:38:11 2012
@@ -1367,7 +1367,7 @@
// Check to see whether there is a matching element in the cache.
Handle<MapCache> cache =
Handle<MapCache>(MapCache::cast(context->map_cache()));
- Handle<Object> result = Handle<Object>(cache->Lookup(*keys));
+ Handle<Object> result = Handle<Object>(cache->Lookup(*keys), isolate());
if (result->IsMap()) return Handle<Map>::cast(result);
// Create a new map and add it to the cache.
Handle<Map> map =
@@ -1419,7 +1419,7 @@
bool* pending_exception) {
// Configure the instance by adding the properties specified by the
// instance template.
- Handle<Object> instance_template =
Handle<Object>(desc->instance_template());
+ Handle<Object> instance_template(desc->instance_template(), isolate());
if (!instance_template->IsUndefined()) {
Execution::ConfigureInstance(instance,
instance_template,
=======================================
--- /branches/bleeding_edge/src/handles.h Mon Nov 12 04:34:18 2012
+++ /branches/bleeding_edge/src/handles.h Fri Nov 16 00:38:11 2012
@@ -97,8 +97,8 @@
// Convenience wrapper.
template<class T>
-inline Handle<T> handle(T* t) {
- return Handle<T>(t);
+inline Handle<T> handle(T* t, Isolate* isolate) {
+ return Handle<T>(t, isolate);
}
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Wed Nov 14 07:59:45 2012
+++ /branches/bleeding_edge/src/hydrogen.cc Fri Nov 16 00:38:11 2012
@@ -3237,9 +3237,8 @@
// optimization. Disable optimistic LICM in that case.
Handle<Code> unoptimized_code(info()->shared_info()->code());
ASSERT(unoptimized_code->kind() == Code::FUNCTION);
- Handle<Object> maybe_type_info(unoptimized_code->type_feedback_info());
Handle<TypeFeedbackInfo> type_info(
- Handle<TypeFeedbackInfo>::cast(maybe_type_info));
+ TypeFeedbackInfo::cast(unoptimized_code->type_feedback_info()));
int checksum = type_info->own_type_change_checksum();
int composite_checksum =
graph()->update_type_change_checksum(checksum);
graph()->set_use_optimistic_licm(
@@ -7115,9 +7114,8 @@
inlined_count_ += nodes_added;
ASSERT(unoptimized_code->kind() == Code::FUNCTION);
- Handle<Object> maybe_type_info(unoptimized_code->type_feedback_info());
Handle<TypeFeedbackInfo> type_info(
- Handle<TypeFeedbackInfo>::cast(maybe_type_info));
+ TypeFeedbackInfo::cast(unoptimized_code->type_feedback_info()));
graph()->update_type_change_checksum(type_info->own_type_change_checksum());
TraceInline(target, caller, NULL);
@@ -7642,7 +7640,7 @@
VariableProxy* proxy = expr->expression()->AsVariableProxy();
bool global_call = proxy != NULL && proxy->var()->IsUnallocated();
- if (proxy != NULL && proxy->var()->is_possibly_eval()) {
+ if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
return Bailout("possible direct call to eval");
}
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Thu Nov 15
05:31:27 2012
+++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Fri Nov 16
00:38:11 2012
@@ -119,7 +119,7 @@
handler_table_ =
isolate()->factory()->NewFixedArray(function()->handler_count(),
TENURED);
profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell(
- Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget)));
+ Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
SetFunctionPosition(function());
Comment cmnt(masm_, "[ function compiled by full code generator");
@@ -2329,7 +2329,7 @@
VariableProxy* proxy = callee->AsVariableProxy();
Property* property = callee->AsProperty();
- if (proxy != NULL && proxy->var()->is_possibly_eval()) {
+ if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
// In a call to eval, we first call %ResolvePossiblyDirectEval to
// resolve the function we need to call and the receiver of the call.
// Then we call the resolved function using the given arguments.
=======================================
--- /branches/bleeding_edge/src/ic-inl.h Thu Oct 18 05:21:42 2012
+++ /branches/bleeding_edge/src/ic-inl.h Fri Nov 16 00:38:11 2012
@@ -43,7 +43,8 @@
Address result = Assembler::target_address_from_return_address(pc());
#ifdef ENABLE_DEBUGGER_SUPPORT
- Debug* debug = Isolate::Current()->debug();
+ ASSERT(Isolate::Current() == isolate());
+ Debug* debug = isolate()->debug();
// First check if any break points are active if not just return the
address
// of the call.
if (!debug->has_break_points()) return result;
=======================================
--- /branches/bleeding_edge/src/ic.cc Wed Nov 14 07:59:45 2012
+++ /branches/bleeding_edge/src/ic.cc Fri Nov 16 00:38:11 2012
@@ -310,7 +310,8 @@
if (FLAG_type_info_threshold == 0 && !FLAG_watch_ic_patching) {
return;
}
- Code* host = target->GetHeap()->isolate()->
+ Isolate* isolate = target->GetHeap()->isolate();
+ Code* host = isolate->
inner_pointer_to_code_cache()->GetCacheEntry(address)->code;
if (host->kind() != Code::FUNCTION) return;
@@ -333,7 +334,7 @@
}
if (FLAG_watch_ic_patching) {
host->set_profiler_ticks(0);
- Isolate::Current()->runtime_profiler()->NotifyICChanged();
+ isolate->runtime_profiler()->NotifyICChanged();
}
// TODO(2029): When an optimized function is patched, it would
// be nice to propagate the corresponding type information to its
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Thu Nov 15
05:31:27 2012
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Fri Nov 16
00:38:11 2012
@@ -139,7 +139,7 @@
handler_table_ =
isolate()->factory()->NewFixedArray(function()->handler_count(),
TENURED);
profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell(
- Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget)));
+ Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
SetFunctionPosition(function());
Comment cmnt(masm_, "[ function compiled by full code generator");
@@ -2405,7 +2405,7 @@
VariableProxy* proxy = callee->AsVariableProxy();
Property* property = callee->AsProperty();
- if (proxy != NULL && proxy->var()->is_possibly_eval()) {
+ if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
// In a call to eval, we first call %ResolvePossiblyDirectEval to
// resolve the function we need to call and the receiver of the
// call. Then we call the resolved function using the given
=======================================
--- /branches/bleeding_edge/src/objects.cc Thu Nov 15 05:31:27 2012
+++ /branches/bleeding_edge/src/objects.cc Fri Nov 16 00:38:11 2012
@@ -1678,6 +1678,7 @@
ASSERT(!IsJSGlobalProxy());
Map* map_of_this = map();
Heap* heap = GetHeap();
+ Isolate* isolate = heap->isolate();
MaybeObject* result;
if (extensibility_check == PERFORM_EXTENSIBILITY_CHECK &&
!map_of_this->is_extensible()) {
@@ -1685,7 +1686,7 @@
return value;
} else {
Handle<Object> args[1] = {Handle<String>(name)};
- return heap->isolate()->Throw(
+ return isolate->Throw(
*FACTORY->NewTypeError("object_not_extensible",
HandleVector(args, 1)));
}
@@ -1715,11 +1716,13 @@
}
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
if (FLAG_harmony_observation && map()->is_observed()) {
- EnqueueChangeRecord(handle(this), "new", handle(name),
- handle(heap->the_hole_value()));
+ EnqueueChangeRecord(handle(this, isolate),
+ "new",
+ handle(name, isolate),
+ handle(heap->the_hole_value(), isolate));
}
return *hresult;
@@ -2855,6 +2858,7 @@
StrictModeFlag strict_mode,
StoreFromKeyed store_mode) {
Heap* heap = GetHeap();
+ Isolate* isolate = heap->isolate();
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
AssertNoContextChange ncc;
@@ -2873,7 +2877,7 @@
// Check access rights if needed.
if (IsAccessCheckNeeded()) {
- if (!heap->isolate()->MayNamedAccess(this, name_raw, v8::ACCESS_SET)) {
+ if (!isolate->MayNamedAccess(this, name_raw, v8::ACCESS_SET)) {
return SetPropertyWithFailedAccessCheck(
lookup, name_raw, value_raw, true, strict_mode);
}
@@ -2889,10 +2893,10 @@
// From this point on everything needs to be handlified, because
// SetPropertyViaPrototypes might call back into JavaScript.
- HandleScope scope(GetIsolate());
+ HandleScope scope(isolate);
Handle<JSObject> self(this);
Handle<String> name(name_raw);
- Handle<Object> value(value_raw);
+ Handle<Object> value(value_raw, isolate);
if (!lookup->IsProperty() && !self->IsJSContextExtensionObject()) {
bool done = false;
@@ -2910,16 +2914,16 @@
if (lookup->IsProperty() && lookup->IsReadOnly()) {
if (strict_mode == kStrictMode) {
Handle<Object> args[] = { name, self };
- return
heap->isolate()->Throw(*heap->isolate()->factory()->NewTypeError(
+ return isolate->Throw(*isolate->factory()->NewTypeError(
"strict_read_only_property", HandleVector(args,
ARRAY_SIZE(args))));
} else {
return *value;
}
}
- Handle<Object> old_value(heap->the_hole_value());
+ Handle<Object> old_value(heap->the_hole_value(), isolate);
if (FLAG_harmony_observation && map()->is_observed()) {
- old_value = handle(lookup->GetLazyValue());
+ old_value = handle(lookup->GetLazyValue(), isolate);
}
// This is a real property that is not read-only, or it is a
@@ -2997,13 +3001,13 @@
}
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
if (FLAG_harmony_observation && map()->is_observed()) {
if (lookup->IsTransition()) {
EnqueueChangeRecord(self, "new", name, old_value);
} else {
- LookupResult new_lookup(self->GetIsolate());
+ LookupResult new_lookup(isolate);
self->LocalLookup(*name, &new_lookup);
ASSERT(!new_lookup.GetLazyValue()->IsTheHole());
if (!new_lookup.GetLazyValue()->SameValue(*old_value)) {
@@ -3076,15 +3080,15 @@
}
// From this point on everything needs to be handlified.
- HandleScope scope(GetIsolate());
+ HandleScope scope(isolate);
Handle<JSObject> self(this);
Handle<String> name(name_raw);
- Handle<Object> value(value_raw);
+ Handle<Object> value(value_raw, isolate);
- Handle<Object> old_value(isolate->heap()->the_hole_value());
+ Handle<Object> old_value(isolate->heap()->the_hole_value(), isolate);
PropertyAttributes old_attributes = ABSENT;
if (FLAG_harmony_observation && map()->is_observed()) {
- old_value = handle(lookup.GetLazyValue());
+ old_value = handle(lookup.GetLazyValue(), isolate);
old_attributes = lookup.GetAttributes();
}
@@ -3146,7 +3150,7 @@
}
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
if (FLAG_harmony_observation && map()->is_observed()) {
if (lookup.IsTransition()) {
@@ -4153,7 +4157,7 @@
}
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
if (FLAG_harmony_observation && map()->is_observed()) {
if (preexists && !self->HasLocalElement(index))
@@ -4218,7 +4222,7 @@
Handle<Object> old_value(isolate->heap()->the_hole_value());
if (FLAG_harmony_observation && map()->is_observed()) {
- old_value = handle(lookup.GetLazyValue());
+ old_value = handle(lookup.GetLazyValue(), isolate);
}
MaybeObject* result;
@@ -4240,7 +4244,7 @@
}
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
if (FLAG_harmony_observation && map()->is_observed()) {
if (!self->HasLocalProperty(*hname))
@@ -4878,7 +4882,7 @@
if (!CanSetCallback(name_raw)) return isolate->heap()->undefined_value();
// From this point on everything needs to be handlified.
- HandleScope scope(GetIsolate());
+ HandleScope scope(isolate);
Handle<JSObject> self(this);
Handle<String> name(name_raw);
Handle<Object> getter(getter_raw);
@@ -4899,7 +4903,7 @@
LookupResult lookup(isolate);
LocalLookup(*name, &lookup);
preexists = lookup.IsProperty();
- if (preexists) old_value = handle(lookup.GetLazyValue());
+ if (preexists) old_value = handle(lookup.GetLazyValue(), isolate);
}
}
@@ -4908,7 +4912,7 @@
self->DefinePropertyAccessor(*name, *getter, *setter, attributes);
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
if (FLAG_harmony_observation && map()->is_observed()) {
const char* type = preexists ? "reconfigured" : "new";
@@ -9414,7 +9418,7 @@
MaybeObject* result =
self->GetElementsAccessor()->SetLength(*self, *new_length_handle);
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
CHECK(self->length()->ToArrayIndex(&new_length));
if (old_length != new_length) {
@@ -10375,7 +10379,7 @@
// Don't allow element properties to be redefined for external arrays.
if (HasExternalArrayElements() && set_mode == DEFINE_PROPERTY) {
Handle<Object> number = isolate->factory()->NewNumberFromUint(index);
- Handle<Object> args[] = { handle(this), number };
+ Handle<Object> args[] = { handle(this, isolate), number };
Handle<Object> error = isolate->factory()->NewTypeError(
"redef_external_array_element", HandleVector(args,
ARRAY_SIZE(args)));
return isolate->Throw(*error);
@@ -10410,7 +10414,7 @@
old_value = Object::GetElement(self, index);
} else if (self->IsJSArray()) {
// Store old array length in case adding an element grows the array.
- old_length = handle(Handle<JSArray>::cast(self)->length());
+ old_length = handle(Handle<JSArray>::cast(self)->length(), isolate);
}
// Check for lookup interceptor
@@ -10421,7 +10425,7 @@
index, *value, attributes, strict_mode, check_prototype, set_mode);
Handle<Object> hresult;
- if (!result->ToHandle(&hresult)) return result;
+ if (!result->ToHandle(&hresult, isolate)) return result;
Handle<String> name = isolate->factory()->Uint32ToString(index);
PropertyAttributes new_attributes =
self->GetLocalElementAttribute(index);
=======================================
--- /branches/bleeding_edge/src/objects.h Thu Nov 15 05:31:27 2012
+++ /branches/bleeding_edge/src/objects.h Fri Nov 16 00:38:11 2012
@@ -789,9 +789,9 @@
}
template<typename T>
- inline bool ToHandle(Handle<T>* obj) {
+ inline bool ToHandle(Handle<T>* obj, Isolate* isolate) {
if (IsFailure()) return false;
- *obj = handle(T::cast(reinterpret_cast<Object*>(this)));
+ *obj = handle(T::cast(reinterpret_cast<Object*>(this)), isolate);
return true;
}
=======================================
--- /branches/bleeding_edge/src/parser.cc Thu Nov 15 04:19:14 2012
+++ /branches/bleeding_edge/src/parser.cc Fri Nov 16 00:38:11 2012
@@ -3203,7 +3203,8 @@
if (op == Token::NOT) {
// Convert the literal to a boolean condition and negate it.
bool condition = literal->ToBoolean()->IsTrue();
- Handle<Object> result(isolate()->heap()->ToBoolean(!condition));
+ Handle<Object> result(isolate()->heap()->ToBoolean(!condition),
+ isolate());
return factory()->NewLiteral(result);
} else if (literal->IsNumber()) {
// Compute some expressions involving only number literals.
=======================================
--- /branches/bleeding_edge/src/runtime.cc Thu Nov 15 05:31:27 2012
+++ /branches/bleeding_edge/src/runtime.cc Fri Nov 16 00:38:11 2012
@@ -3153,7 +3153,7 @@
// Shortcut for simple non-regexp global replacements
if (is_global &&
regexp->TypeTag() == JSRegExp::ATOM) {
- Handle<String> empty_string(HEAP->empty_string());
+ Handle<String> empty_string = isolate->factory()->empty_string();
if (subject->HasOnlyAsciiChars()) {
return StringReplaceAtomRegExpWithString<SeqOneByteString>(
isolate,
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc Tue Nov 13 03:07:04 2012
+++ /branches/bleeding_edge/src/stub-cache.cc Fri Nov 16 00:38:11 2012
@@ -120,7 +120,8 @@
// name specific if there are global objects involved.
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::NONEXISTENT);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*cache_name,
flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*cache_name,
flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
LoadStubCompiler compiler(isolate_);
@@ -139,7 +140,8 @@
PropertyIndex field_index) {
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC,
Code::FIELD);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
LoadStubCompiler compiler(isolate_);
@@ -160,7 +162,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::CALLBACKS);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
LoadStubCompiler compiler(isolate_);
@@ -180,7 +183,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::CALLBACKS);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
LoadStubCompiler compiler(isolate_);
@@ -200,7 +204,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::LOAD_IC,
Code::CONSTANT_FUNCTION);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
LoadStubCompiler compiler(isolate_);
@@ -219,7 +224,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::INTERCEPTOR);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
LoadStubCompiler compiler(isolate_);
@@ -245,7 +251,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::NORMAL);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
LoadStubCompiler compiler(isolate_);
@@ -265,7 +272,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::FIELD);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedLoadStubCompiler compiler(isolate_);
@@ -285,7 +293,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC,
Code::CONSTANT_FUNCTION);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedLoadStubCompiler compiler(isolate_);
@@ -304,7 +313,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC,
Code::INTERCEPTOR);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedLoadStubCompiler compiler(isolate_);
@@ -324,7 +334,8 @@
ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP);
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedLoadStubCompiler compiler(isolate_);
@@ -341,7 +352,8 @@
Handle<JSArray>
receiver) {
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedLoadStubCompiler compiler(isolate_);
@@ -358,7 +370,7 @@
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS);
Handle<Map> map(receiver->map());
- Handle<Object> probe(map->FindInCodeCache(*name, flags));
+ Handle<Object> probe(map->FindInCodeCache(*name, flags), isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedLoadStubCompiler compiler(isolate_);
@@ -375,7 +387,8 @@
Handle<JSFunction> receiver) {
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedLoadStubCompiler compiler(isolate_);
@@ -396,7 +409,8 @@
(transition.is_null()) ? Code::FIELD : Code::MAP_TRANSITION;
Code::Flags flags = Code::ComputeMonomorphicFlags(
Code::STORE_IC, type, strict_mode);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
StoreStubCompiler compiler(isolate_, strict_mode);
@@ -438,7 +452,7 @@
UNREACHABLE();
break;
}
- Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags),
isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
Handle<Code> code;
@@ -490,7 +504,8 @@
StrictModeFlag strict_mode) {
Code::Flags flags = Code::ComputeMonomorphicFlags(
Code::STORE_IC, Code::NORMAL, strict_mode);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
StoreStubCompiler compiler(isolate_, strict_mode);
@@ -510,7 +525,8 @@
ASSERT(v8::ToCData<Address>(callback->setter()) != 0);
Code::Flags flags = Code::ComputeMonomorphicFlags(
Code::STORE_IC, Code::CALLBACKS, strict_mode);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
StoreStubCompiler compiler(isolate_, strict_mode);
@@ -530,7 +546,8 @@
StrictModeFlag strict_mode) {
Code::Flags flags = Code::ComputeMonomorphicFlags(
Code::STORE_IC, Code::CALLBACKS, strict_mode);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
StoreStubCompiler compiler(isolate_, strict_mode);
@@ -548,7 +565,8 @@
StrictModeFlag
strict_mode) {
Code::Flags flags = Code::ComputeMonomorphicFlags(
Code::STORE_IC, Code::INTERCEPTOR, strict_mode);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
StoreStubCompiler compiler(isolate_, strict_mode);
@@ -568,7 +586,8 @@
(transition.is_null()) ? Code::FIELD : Code::MAP_TRANSITION;
Code::Flags flags = Code::ComputeMonomorphicFlags(
Code::KEYED_STORE_IC, type, strict_mode);
- Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
KeyedStoreStubCompiler compiler(isolate(), strict_mode,
@@ -610,7 +629,8 @@
Code::Flags flags =
Code::ComputeMonomorphicFlags(kind, Code::CONSTANT_FUNCTION,
extra_state,
cache_holder, argc);
- Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
CallStubCompiler compiler(isolate_, argc, kind, extra_state,
cache_holder);
@@ -648,7 +668,8 @@
Code::Flags flags =
Code::ComputeMonomorphicFlags(kind, Code::FIELD, extra_state,
cache_holder, argc);
- Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
CallStubCompiler compiler(isolate_, argc, kind, extra_state,
cache_holder);
@@ -685,7 +706,8 @@
Code::Flags flags =
Code::ComputeMonomorphicFlags(kind, Code::INTERCEPTOR, extra_state,
cache_holder, argc);
- Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
CallStubCompiler compiler(isolate(), argc, kind, extra_state,
cache_holder);
@@ -715,7 +737,8 @@
Code::Flags flags =
Code::ComputeMonomorphicFlags(kind, Code::NORMAL, extra_state,
cache_holder, argc);
- Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags));
+ Handle<Object> probe(map_holder->map()->FindInCodeCache(*name, flags),
+ isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
CallStubCompiler compiler(isolate(), argc, kind, extra_state,
cache_holder);
=======================================
--- /branches/bleeding_edge/src/type-info.cc Wed Nov 14 07:59:45 2012
+++ /branches/bleeding_edge/src/type-info.cc Fri Nov 16 00:38:11 2012
@@ -79,7 +79,7 @@
Handle<Object> TypeFeedbackOracle::GetInfo(TypeFeedbackId ast_id) {
int entry = dictionary_->FindEntry(IdToKey(ast_id));
return entry != UnseededNumberDictionary::kNotFound
- ? Handle<Object>(dictionary_->ValueAt(entry))
+ ? Handle<Object>(dictionary_->ValueAt(entry), isolate_)
: Handle<Object>::cast(isolate_->factory()->undefined_value());
}
=======================================
--- /branches/bleeding_edge/src/variables.h Wed Aug 29 02:19:53 2012
+++ /branches/bleeding_edge/src/variables.h Fri Nov 16 00:38:11 2012
@@ -130,8 +130,8 @@
bool is_arguments() const { return kind_ == ARGUMENTS; }
// True if the variable is named eval and not known to be shadowed.
- bool is_possibly_eval() const {
- return IsVariable(FACTORY->eval_symbol());
+ bool is_possibly_eval(Isolate* isolate) const {
+ return IsVariable(isolate->factory()->eval_symbol());
}
Variable* local_if_not_shadowed() const {
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Thu Nov 15 05:31:27
2012
+++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Fri Nov 16 00:38:11
2012
@@ -119,7 +119,7 @@
handler_table_ =
isolate()->factory()->NewFixedArray(function()->handler_count(),
TENURED);
profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell(
- Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget)));
+ Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
SetFunctionPosition(function());
Comment cmnt(masm_, "[ function compiled by full code generator");
@@ -2304,7 +2304,7 @@
VariableProxy* proxy = callee->AsVariableProxy();
Property* property = callee->AsProperty();
- if (proxy != NULL && proxy->var()->is_possibly_eval()) {
+ if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
// In a call to eval, we first call %ResolvePossiblyDirectEval to
// resolve the function we need to call and the receiver of the call.
// Then we call the resolved function using the given arguments.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev