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

Unified Diff: src/ic.cc

Issue 12317141: Added Isolate parameter to CodeStub::GetCode(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed whitespace. Rebased. Created 7 years, 10 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/ic.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 77d5dc5ab9f6256f88027117cf8c0c7dd2704c71..ee46961769695b62b3e572c2274412748ecb97b0 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -822,10 +822,10 @@ MaybeObject* LoadIC::Load(State state,
stub = pre_monomorphic_stub();
} else if (state == PREMONOMORPHIC) {
StringLengthStub string_length_stub(kind(), !object->IsString());
- stub = string_length_stub.GetCode();
+ stub = string_length_stub.GetCode(isolate());
} else if (state == MONOMORPHIC && object->IsStringWrapper()) {
StringLengthStub string_length_stub(kind(), true);
- stub = string_length_stub.GetCode();
+ stub = string_length_stub.GetCode(isolate());
} else if (state != MEGAMORPHIC) {
ASSERT(state != GENERIC);
stub = megamorphic_stub();
@@ -851,7 +851,7 @@ MaybeObject* LoadIC::Load(State state,
stub = pre_monomorphic_stub();
} else if (state == PREMONOMORPHIC) {
ArrayLengthStub array_length_stub(kind());
- stub = array_length_stub.GetCode();
+ stub = array_length_stub.GetCode(isolate());
} else if (state != MEGAMORPHIC) {
ASSERT(state != GENERIC);
stub = megamorphic_stub();
@@ -874,7 +874,7 @@ MaybeObject* LoadIC::Load(State state,
stub = pre_monomorphic_stub();
} else if (state == PREMONOMORPHIC) {
FunctionPrototypeStub function_prototype_stub(kind());
- stub = function_prototype_stub.GetCode();
+ stub = function_prototype_stub.GetCode(isolate());
} else if (state != MEGAMORPHIC) {
ASSERT(state != GENERIC);
stub = megamorphic_stub();
@@ -1398,7 +1398,8 @@ MaybeObject* StoreIC::Store(State state,
name->Equals(isolate()->heap()->length_symbol()) &&
Handle<JSArray>::cast(receiver)->AllowsSetElementsLength() &&
receiver->HasFastProperties()) {
- Handle<Code> stub = StoreArrayLengthStub(kind(), strict_mode).GetCode();
+ Handle<Code> stub =
+ StoreArrayLengthStub(kind(), strict_mode).GetCode(isolate());
set_target(*stub);
TRACE_IC("StoreIC", name, state, *stub);
return receiver->SetProperty(*name, *value, NONE, strict_mode, store_mode);
@@ -2147,7 +2148,7 @@ RUNTIME_FUNCTION(MaybeObject*, UnaryOp_Patch) {
type = UnaryOpIC::ComputeNewType(type, previous_type);
UnaryOpStub stub(op, mode, type);
- Handle<Code> code = stub.GetCode();
+ Handle<Code> code = stub.GetCode(isolate);
if (!code.is_null()) {
if (FLAG_trace_ic) {
PrintF("[UnaryOpIC in ");
@@ -2275,7 +2276,7 @@ RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {
}
BinaryOpStub stub(key, new_left, new_right, result_type);
- Handle<Code> code = stub.GetCode();
+ Handle<Code> code = stub.GetCode(isolate);
if (!code.is_null()) {
#ifdef DEBUG
if (FLAG_trace_ic) {
@@ -2365,9 +2366,9 @@ Code* CompareIC::GetRawUninitialized(Token::Value op) {
}
-Handle<Code> CompareIC::GetUninitialized(Token::Value op) {
+Handle<Code> CompareIC::GetUninitialized(Isolate* isolate, Token::Value op) {
ICCompareStub stub(op, UNINITIALIZED, UNINITIALIZED, UNINITIALIZED);
- return stub.GetCode();
+ return stub.GetCode(isolate);
}
@@ -2494,7 +2495,7 @@ void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
if (state == KNOWN_OBJECTS) {
stub.set_known_map(Handle<Map>(Handle<JSObject>::cast(x)->map()));
}
- set_target(*stub.GetCode());
+ set_target(*stub.GetCode(isolate()));
#ifdef DEBUG
if (FLAG_trace_ic) {
@@ -2508,7 +2509,7 @@ void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
GetStateName(new_right),
GetStateName(state),
Token::Name(op_),
- static_cast<void*>(*stub.GetCode()));
+ static_cast<void*>(*stub.GetCode(isolate())));
}
#endif
@@ -2542,7 +2543,7 @@ RUNTIME_FUNCTION(MaybeObject*, ToBoolean_Patch) {
old_types.TraceTransition(new_types);
ToBooleanStub stub(tos, new_types);
- Handle<Code> code = stub.GetCode();
+ Handle<Code> code = stub.GetCode(isolate);
ToBooleanIC ic(isolate);
ic.patch(*code);
return Smi::FromInt(to_boolean_value ? 1 : 0);
« no previous file with comments | « src/ic.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698